From ac47c89a0c16f449c3d5abb866eb8d321bfd3415 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenberg <96974219+Jonathan-Rosenberg@users.noreply.github.com> Date: Sun, 26 Mar 2023 14:56:49 +0300 Subject: [PATCH] revert openapi-generator-cli version to 5.3.0 (#5572) --- Makefile | 2 +- clients/java/.github/workflows/maven.yml | 30 - clients/java/.openapi-generator/VERSION | 2 +- clients/java/README.md | 35 +- clients/java/api/openapi.yaml | 177 +- clients/java/build.gradle | 69 +- clients/java/build.sbt | 22 +- clients/java/docs/AccessKeyCredentials.md | 8 +- clients/java/docs/ActionRun.md | 26 +- clients/java/docs/ActionRunList.md | 8 +- clients/java/docs/ActionsApi.md | 138 +- clients/java/docs/AuthApi.md | 896 +-- clients/java/docs/AuthCapabilities.md | 8 +- clients/java/docs/AuthenticationToken.md | 8 +- clients/java/docs/BranchCreation.md | 8 +- clients/java/docs/BranchProtectionRule.md | 6 +- clients/java/docs/BranchesApi.md | 278 +- clients/java/docs/CherryPickCreation.md | 8 +- clients/java/docs/CommPrefsInput.md | 10 +- clients/java/docs/Commit.md | 18 +- clients/java/docs/CommitCreation.md | 10 +- clients/java/docs/CommitList.md | 8 +- clients/java/docs/CommitsApi.md | 110 +- clients/java/docs/ConfigApi.md | 104 +- clients/java/docs/Credentials.md | 8 +- clients/java/docs/CredentialsList.md | 8 +- clients/java/docs/CredentialsWithSecret.md | 10 +- clients/java/docs/CurrentUser.md | 6 +- .../docs/DeleteBranchProtectionRuleRequest.md | 13 - clients/java/docs/Diff.md | 34 +- clients/java/docs/DiffList.md | 8 +- clients/java/docs/Error.md | 6 +- clients/java/docs/ExperimentalApi.md | 44 +- clients/java/docs/FindMergeBaseResult.md | 10 +- clients/java/docs/ForgotPasswordRequest.md | 6 +- clients/java/docs/GarbageCollectionConfig.md | 6 +- .../docs/GarbageCollectionPrepareRequest.md | 6 +- .../docs/GarbageCollectionPrepareResponse.md | 10 +- clients/java/docs/GarbageCollectionRule.md | 8 +- clients/java/docs/GarbageCollectionRules.md | 8 +- clients/java/docs/Group.md | 8 +- clients/java/docs/GroupCreation.md | 6 +- clients/java/docs/GroupList.md | 8 +- clients/java/docs/HealthCheckApi.md | 12 +- clients/java/docs/HookRun.md | 24 +- clients/java/docs/HookRunList.md | 8 +- clients/java/docs/ImportApi.md | 72 +- clients/java/docs/ImportPagination.md | 10 +- .../java/docs/IngestRangeCreationResponse.md | 8 +- clients/java/docs/InlineObject1.md | 13 + clients/java/docs/LoginConfig.md | 26 +- clients/java/docs/LoginInformation.md | 8 +- clients/java/docs/Merge.md | 10 +- clients/java/docs/MergeResult.md | 8 +- clients/java/docs/MergeResultSummary.md | 12 +- clients/java/docs/MetaRangeCreation.md | 6 +- .../java/docs/MetaRangeCreationResponse.md | 6 +- clients/java/docs/MetadataApi.md | 98 +- clients/java/docs/NextStep.md | 6 +- clients/java/docs/ObjectCopyCreation.md | 8 +- clients/java/docs/ObjectError.md | 10 +- clients/java/docs/ObjectErrorList.md | 6 +- clients/java/docs/ObjectStageCreation.md | 16 +- clients/java/docs/ObjectStats.md | 28 +- clients/java/docs/ObjectStatsList.md | 8 +- clients/java/docs/ObjectsApi.md | 390 +- clients/java/docs/OtfDiffApi.md | 44 +- clients/java/docs/OtfDiffEntry.md | 24 +- clients/java/docs/OtfDiffList.md | 18 +- clients/java/docs/Pagination.md | 12 +- clients/java/docs/PathList.md | 6 +- clients/java/docs/Policy.md | 10 +- clients/java/docs/PolicyList.md | 8 +- .../java/docs/PrepareGCUncommittedRequest.md | 6 +- .../java/docs/PrepareGCUncommittedResponse.md | 10 +- clients/java/docs/RangeMetadata.md | 14 +- clients/java/docs/Ref.md | 8 +- clients/java/docs/RefList.md | 8 +- clients/java/docs/RefsApi.md | 226 +- clients/java/docs/RefsDump.md | 10 +- clients/java/docs/RepositoriesApi.md | 218 +- clients/java/docs/Repository.md | 12 +- clients/java/docs/RepositoryCreation.md | 10 +- clients/java/docs/RepositoryList.md | 8 +- clients/java/docs/ResetCreation.md | 18 +- clients/java/docs/RetentionApi.md | 154 +- clients/java/docs/RevertCreation.md | 8 +- clients/java/docs/Setup.md | 8 +- clients/java/docs/SetupState.md | 18 +- clients/java/docs/StageRangeCreation.md | 12 +- clients/java/docs/StagingApi.md | 78 +- clients/java/docs/StagingLocation.md | 10 +- clients/java/docs/StagingMetadata.md | 14 +- clients/java/docs/Statement.md | 18 +- clients/java/docs/StatisticsApi.md | 34 +- clients/java/docs/StatsEvent.md | 10 +- clients/java/docs/StatsEventsList.md | 6 +- clients/java/docs/StorageConfig.md | 18 +- clients/java/docs/StorageURI.md | 6 +- clients/java/docs/TagCreation.md | 8 +- clients/java/docs/TagsApi.md | 134 +- clients/java/docs/TemplatesApi.md | 36 +- .../java/docs/UnderlyingObjectProperties.md | 6 +- clients/java/docs/UpdatePasswordByToken.md | 10 +- clients/java/docs/User.md | 12 +- clients/java/docs/UserCreation.md | 8 +- clients/java/docs/UserList.md | 8 +- clients/java/docs/VersionConfig.md | 10 +- clients/java/pom.xml | 121 +- .../io/lakefs/clients/api/ActionsApi.java | 154 +- .../java/io/lakefs/clients/api/ApiClient.java | 313 +- .../io/lakefs/clients/api/ApiException.java | 79 +- .../io/lakefs/clients/api/ApiResponse.java | 21 +- .../java/io/lakefs/clients/api/AuthApi.java | 944 +-- .../io/lakefs/clients/api/BranchesApi.java | 282 +- .../io/lakefs/clients/api/CommitsApi.java | 119 +- .../java/io/lakefs/clients/api/ConfigApi.java | 173 +- .../lakefs/clients/api/ExperimentalApi.java | 60 +- .../io/lakefs/clients/api/HealthCheckApi.java | 45 +- .../java/io/lakefs/clients/api/ImportApi.java | 79 +- .../main/java/io/lakefs/clients/api/JSON.java | 157 +- .../io/lakefs/clients/api/MetadataApi.java | 118 +- .../io/lakefs/clients/api/ObjectsApi.java | 371 +- .../io/lakefs/clients/api/OtfDiffApi.java | 60 +- .../main/java/io/lakefs/clients/api/Pair.java | 4 + .../java/io/lakefs/clients/api/RefsApi.java | 221 +- .../lakefs/clients/api/RepositoriesApi.java | 253 +- .../io/lakefs/clients/api/RetentionApi.java | 163 +- .../clients/api/ServerConfiguration.java | 4 +- .../io/lakefs/clients/api/StagingApi.java | 90 +- .../io/lakefs/clients/api/StatisticsApi.java | 45 +- .../java/io/lakefs/clients/api/TagsApi.java | 144 +- .../io/lakefs/clients/api/TemplatesApi.java | 51 +- .../lakefs/clients/api/auth/ApiKeyAuth.java | 5 +- .../clients/api/auth/Authentication.java | 8 +- .../clients/api/auth/HttpBasicAuth.java | 5 +- .../clients/api/auth/HttpBearerAuth.java | 7 +- .../api/model/AbstractOpenApiSchema.java | 149 - .../api/model/AccessKeyCredentials.java | 127 +- .../lakefs/clients/api/model/ActionRun.java | 152 +- .../clients/api/model/ActionRunList.java | 135 +- .../clients/api/model/AuthCapabilities.java | 112 +- .../api/model/AuthenticationToken.java | 123 +- .../clients/api/model/BranchCreation.java | 127 +- .../api/model/BranchProtectionRule.java | 121 +- .../clients/api/model/CherryPickCreation.java | 123 +- .../clients/api/model/CommPrefsInput.java | 126 +- .../io/lakefs/clients/api/model/Commit.java | 159 +- .../clients/api/model/CommitCreation.java | 128 +- .../lakefs/clients/api/model/CommitList.java | 135 +- .../lakefs/clients/api/model/Credentials.java | 124 +- .../clients/api/model/CredentialsList.java | 135 +- .../api/model/CredentialsWithSecret.java | 130 +- .../lakefs/clients/api/model/CurrentUser.java | 120 +- .../DeleteBranchProtectionRuleRequest.java | 213 - .../io/lakefs/clients/api/model/Diff.java | 135 +- .../io/lakefs/clients/api/model/DiffList.java | 135 +- .../io/lakefs/clients/api/model/Error.java | 121 +- .../api/model/FindMergeBaseResult.java | 133 +- .../api/model/ForgotPasswordRequest.java | 121 +- .../api/model/GarbageCollectionConfig.java | 110 +- .../GarbageCollectionPrepareRequest.java | 113 +- .../GarbageCollectionPrepareResponse.java | 133 +- .../api/model/GarbageCollectionRule.java | 124 +- .../api/model/GarbageCollectionRules.java | 133 +- .../io/lakefs/clients/api/model/Group.java | 124 +- .../clients/api/model/GroupCreation.java | 121 +- .../lakefs/clients/api/model/GroupList.java | 135 +- .../io/lakefs/clients/api/model/HookRun.java | 146 +- .../lakefs/clients/api/model/HookRunList.java | 135 +- .../clients/api/model/ImportPagination.java | 129 +- .../model/IngestRangeCreationResponse.java | 120 +- .../clients/api/model/InlineObject1.java | 98 + .../lakefs/clients/api/model/LoginConfig.java | 158 +- .../clients/api/model/LoginInformation.java | 127 +- .../io/lakefs/clients/api/model/Merge.java | 123 +- .../lakefs/clients/api/model/MergeResult.java | 127 +- .../clients/api/model/MergeResultSummary.java | 116 +- .../clients/api/model/MetaRangeCreation.java | 130 +- .../api/model/MetaRangeCreationResponse.java | 113 +- .../io/lakefs/clients/api/model/NextStep.java | 121 +- .../clients/api/model/ObjectCopyCreation.java | 126 +- .../lakefs/clients/api/model/ObjectError.java | 129 +- .../clients/api/model/ObjectErrorList.java | 130 +- .../api/model/ObjectStageCreation.java | 142 +- .../lakefs/clients/api/model/ObjectStats.java | 154 +- .../clients/api/model/ObjectStatsList.java | 135 +- .../clients/api/model/OtfDiffEntry.java | 139 +- .../lakefs/clients/api/model/OtfDiffList.java | 135 +- .../lakefs/clients/api/model/Pagination.java | 130 +- .../io/lakefs/clients/api/model/PathList.java | 126 +- .../io/lakefs/clients/api/model/Policy.java | 138 +- .../lakefs/clients/api/model/PolicyList.java | 135 +- .../model/PrepareGCUncommittedRequest.java | 113 +- .../model/PrepareGCUncommittedResponse.java | 132 +- .../clients/api/model/RangeMetadata.java | 139 +- .../java/io/lakefs/clients/api/model/Ref.java | 127 +- .../io/lakefs/clients/api/model/RefList.java | 135 +- .../io/lakefs/clients/api/model/RefsDump.java | 133 +- .../lakefs/clients/api/model/Repository.java | 136 +- .../clients/api/model/RepositoryCreation.java | 132 +- .../clients/api/model/RepositoryList.java | 135 +- .../clients/api/model/ResetCreation.java | 126 +- .../clients/api/model/RevertCreation.java | 124 +- .../io/lakefs/clients/api/model/Setup.java | 127 +- .../lakefs/clients/api/model/SetupState.java | 119 +- .../clients/api/model/StageRangeCreation.java | 138 +- .../clients/api/model/StagingLocation.java | 132 +- .../clients/api/model/StagingMetadata.java | 140 +- .../lakefs/clients/api/model/Statement.java | 138 +- .../lakefs/clients/api/model/StatsEvent.java | 130 +- .../clients/api/model/StatsEventsList.java | 130 +- .../clients/api/model/StorageConfig.java | 147 +- .../lakefs/clients/api/model/StorageURI.java | 122 +- .../lakefs/clients/api/model/TagCreation.java | 127 +- .../api/model/UnderlyingObjectProperties.java | 113 +- .../api/model/UpdatePasswordByToken.java | 132 +- .../io/lakefs/clients/api/model/User.java | 134 +- .../clients/api/model/UserCreation.java | 123 +- .../io/lakefs/clients/api/model/UserList.java | 135 +- .../clients/api/model/VersionConfig.java | 120 +- .../io/lakefs/clients/api/ActionsApiTest.java | 43 +- .../io/lakefs/clients/api/AuthApiTest.java | 295 +- .../lakefs/clients/api/BranchesApiTest.java | 79 +- .../io/lakefs/clients/api/CommitsApiTest.java | 34 +- .../io/lakefs/clients/api/ConfigApiTest.java | 61 +- .../clients/api/ExperimentalApiTest.java | 16 +- .../clients/api/HealthCheckApiTest.java | 16 +- .../io/lakefs/clients/api/ImportApiTest.java | 25 +- .../lakefs/clients/api/MetadataApiTest.java | 34 +- .../io/lakefs/clients/api/ObjectsApiTest.java | 99 +- .../io/lakefs/clients/api/OtfDiffApiTest.java | 16 +- .../io/lakefs/clients/api/RefsApiTest.java | 61 +- .../clients/api/RepositoriesApiTest.java | 78 +- .../lakefs/clients/api/RetentionApiTest.java | 58 +- .../io/lakefs/clients/api/StagingApiTest.java | 23 +- .../lakefs/clients/api/StatisticsApiTest.java | 16 +- .../io/lakefs/clients/api/TagsApiTest.java | 43 +- .../lakefs/clients/api/TemplatesApiTest.java | 16 +- .../api/model/AccessKeyCredentialsTest.java | 7 +- .../clients/api/model/ActionRunListTest.java | 7 +- .../clients/api/model/ActionRunTest.java | 9 +- .../api/model/AuthCapabilitiesTest.java | 7 +- .../api/model/AuthenticationTokenTest.java | 7 +- .../clients/api/model/BranchCreationTest.java | 7 +- .../api/model/BranchProtectionRuleTest.java | 7 +- .../api/model/CherryPickCreationTest.java | 7 +- .../clients/api/model/CommPrefsInputTest.java | 7 +- .../clients/api/model/CommitCreationTest.java | 8 +- .../clients/api/model/CommitListTest.java | 7 +- .../lakefs/clients/api/model/CommitTest.java | 7 +- .../api/model/CredentialsListTest.java | 7 +- .../clients/api/model/CredentialsTest.java | 7 +- .../api/model/CredentialsWithSecretTest.java | 7 +- .../clients/api/model/CurrentUserTest.java | 7 +- .../clients/api/model/DiffListTest.java | 7 +- .../io/lakefs/clients/api/model/DiffTest.java | 7 +- .../lakefs/clients/api/model/ErrorTest.java | 7 +- .../api/model/FindMergeBaseResultTest.java | 7 +- .../api/model/ForgotPasswordRequestTest.java | 7 +- .../model/GarbageCollectionConfigTest.java | 7 +- .../GarbageCollectionPrepareRequestTest.java | 7 +- .../GarbageCollectionPrepareResponseTest.java | 7 +- .../api/model/GarbageCollectionRuleTest.java | 7 +- .../api/model/GarbageCollectionRulesTest.java | 7 +- .../clients/api/model/GroupCreationTest.java | 7 +- .../clients/api/model/GroupListTest.java | 7 +- .../lakefs/clients/api/model/GroupTest.java | 7 +- .../clients/api/model/HookRunListTest.java | 7 +- .../lakefs/clients/api/model/HookRunTest.java | 9 +- .../api/model/ImportPaginationTest.java | 7 +- .../IngestRangeCreationResponseTest.java | 7 +- ...equestTest.java => InlineObject1Test.java} | 19 +- .../clients/api/model/LoginConfigTest.java | 7 +- .../api/model/LoginInformationTest.java | 7 +- .../api/model/MergeResultSummaryTest.java | 7 +- .../clients/api/model/MergeResultTest.java | 7 +- .../lakefs/clients/api/model/MergeTest.java | 8 +- .../model/MetaRangeCreationResponseTest.java | 7 +- .../api/model/MetaRangeCreationTest.java | 7 +- .../clients/api/model/NextStepTest.java | 7 +- .../api/model/ObjectCopyCreationTest.java | 7 +- .../api/model/ObjectErrorListTest.java | 7 +- .../clients/api/model/ObjectErrorTest.java | 7 +- .../api/model/ObjectStageCreationTest.java | 8 +- .../api/model/ObjectStatsListTest.java | 7 +- .../clients/api/model/ObjectStatsTest.java | 8 +- .../clients/api/model/OtfDiffEntryTest.java | 7 +- .../clients/api/model/OtfDiffListTest.java | 7 +- .../clients/api/model/PaginationTest.java | 7 +- .../clients/api/model/PathListTest.java | 7 +- .../clients/api/model/PolicyListTest.java | 7 +- .../lakefs/clients/api/model/PolicyTest.java | 7 +- .../PrepareGCUncommittedRequestTest.java | 7 +- .../PrepareGCUncommittedResponseTest.java | 7 +- .../clients/api/model/RangeMetadataTest.java | 7 +- .../lakefs/clients/api/model/RefListTest.java | 7 +- .../io/lakefs/clients/api/model/RefTest.java | 7 +- .../clients/api/model/RefsDumpTest.java | 7 +- .../api/model/RepositoryCreationTest.java | 7 +- .../clients/api/model/RepositoryListTest.java | 7 +- .../clients/api/model/RepositoryTest.java | 7 +- .../clients/api/model/ResetCreationTest.java | 7 +- .../clients/api/model/RevertCreationTest.java | 7 +- .../clients/api/model/SetupStateTest.java | 7 +- .../lakefs/clients/api/model/SetupTest.java | 7 +- .../api/model/StageRangeCreationTest.java | 7 +- .../api/model/StagingLocationTest.java | 7 +- .../api/model/StagingMetadataTest.java | 8 +- .../clients/api/model/StatementTest.java | 7 +- .../clients/api/model/StatsEventTest.java | 7 +- .../api/model/StatsEventsListTest.java | 7 +- .../clients/api/model/StorageConfigTest.java | 7 +- .../clients/api/model/StorageURITest.java | 7 +- .../clients/api/model/TagCreationTest.java | 7 +- .../model/UnderlyingObjectPropertiesTest.java | 7 +- .../api/model/UpdatePasswordByTokenTest.java | 7 +- .../clients/api/model/UserCreationTest.java | 7 +- .../clients/api/model/UserListTest.java | 7 +- .../io/lakefs/clients/api/model/UserTest.java | 7 +- .../clients/api/model/VersionConfigTest.java | 7 +- clients/python/.gitignore | 1 - clients/python/.openapi-generator/FILES | 507 +- clients/python/.openapi-generator/VERSION | 2 +- clients/python/.travis.yml | 2 +- clients/python/README.md | 508 +- clients/python/docs/AccessKeyCredentials.md | 13 + clients/python/docs/ActionRun.md | 18 + clients/python/docs/ActionRunList.md | 13 + clients/python/docs/ActionsApi.md | 477 ++ clients/python/docs/AuthApi.md | 3437 +++++++++++ clients/python/docs/AuthCapabilities.md | 13 + clients/python/docs/AuthenticationToken.md | 13 + clients/python/docs/BranchCreation.md | 13 + clients/python/docs/BranchProtectionRule.md | 12 + clients/python/docs/BranchesApi.md | 940 +++ clients/python/docs/CherryPickCreation.md | 13 + clients/python/docs/CommPrefsInput.md | 14 + clients/python/docs/Commit.md | 18 + clients/python/docs/CommitCreation.md | 14 + clients/python/docs/CommitList.md | 13 + clients/python/docs/CommitsApi.md | 374 ++ clients/python/docs/ConfigApi.md | 533 ++ clients/python/docs/Credentials.md | 13 + clients/python/docs/CredentialsList.md | 13 + clients/python/docs/CredentialsWithSecret.md | 14 + clients/python/docs/CurrentUser.md | 12 + clients/python/docs/Diff.md | 15 + clients/python/docs/DiffList.md | 13 + clients/python/docs/Error.md | 12 + clients/python/docs/ExperimentalApi.md | 125 + clients/python/docs/FindMergeBaseResult.md | 14 + clients/python/docs/ForgotPasswordRequest.md | 12 + .../python/docs/GarbageCollectionConfig.md | 12 + .../docs/GarbageCollectionPrepareRequest.md | 12 + .../docs/GarbageCollectionPrepareResponse.md | 14 + clients/python/docs/GarbageCollectionRule.md | 13 + clients/python/docs/GarbageCollectionRules.md | 13 + clients/python/docs/Group.md | 13 + clients/python/docs/GroupCreation.md | 12 + clients/python/docs/GroupList.md | 13 + clients/python/docs/HealthCheckApi.md | 69 + clients/python/docs/HookRun.md | 17 + clients/python/docs/HookRunList.md | 13 + clients/python/docs/ImportApi.md | 248 + clients/python/docs/ImportPagination.md | 14 + .../docs/IngestRangeCreationResponse.md | 13 + clients/python/docs/InlineObject1.md | 12 + clients/python/docs/LoginConfig.md | 18 + clients/python/docs/LoginInformation.md | 13 + clients/python/docs/Merge.md | 14 + clients/python/docs/MergeResult.md | 13 + clients/python/docs/MergeResultSummary.md | 15 + clients/python/docs/MetaRangeCreation.md | 12 + .../python/docs/MetaRangeCreationResponse.md | 12 + clients/python/docs/MetadataApi.md | 349 ++ clients/python/docs/NextStep.md | 12 + clients/python/docs/ObjectCopyCreation.md | 13 + clients/python/docs/ObjectError.md | 14 + clients/python/docs/ObjectErrorList.md | 12 + clients/python/docs/ObjectStageCreation.md | 17 + clients/python/docs/ObjectStats.md | 19 + clients/python/docs/ObjectStatsList.md | 13 + clients/python/docs/ObjectUserMetadata.md | 11 + clients/python/docs/ObjectsApi.md | 1229 ++++ clients/python/docs/OtfDiffApi.md | 125 + clients/python/docs/OtfDiffEntry.md | 16 + clients/python/docs/OtfDiffList.md | 13 + clients/python/docs/Pagination.md | 15 + clients/python/docs/PathList.md | 12 + clients/python/docs/Policy.md | 14 + clients/python/docs/PolicyList.md | 13 + .../docs/PrepareGCUncommittedRequest.md | 12 + .../docs/PrepareGCUncommittedResponse.md | 14 + clients/python/docs/RangeMetadata.md | 16 + clients/python/docs/Ref.md | 13 + clients/python/docs/RefList.md | 13 + clients/python/docs/RefsApi.md | 742 +++ clients/python/docs/RefsDump.md | 14 + clients/python/docs/RepositoriesApi.md | 787 +++ clients/python/docs/Repository.md | 15 + clients/python/docs/RepositoryCreation.md | 14 + clients/python/docs/RepositoryList.md | 13 + clients/python/docs/ResetCreation.md | 13 + clients/python/docs/RetentionApi.md | 581 ++ clients/python/docs/RevertCreation.md | 13 + clients/python/docs/Setup.md | 13 + clients/python/docs/SetupState.md | 13 + clients/python/docs/StageRangeCreation.md | 15 + clients/python/docs/StagingApi.md | 263 + clients/python/docs/StagingLocation.md | 15 + clients/python/docs/StagingMetadata.md | 17 + clients/python/docs/Statement.md | 14 + clients/python/docs/StatisticsApi.md | 123 + clients/python/docs/StatsEvent.md | 14 + clients/python/docs/StatsEventsList.md | 12 + clients/python/docs/StorageConfig.md | 18 + clients/python/docs/StorageURI.md | 13 + clients/python/docs/TagCreation.md | 13 + clients/python/docs/TagsApi.md | 465 ++ clients/python/docs/TemplatesApi.md | 128 + .../python/docs/UnderlyingObjectProperties.md | 12 + clients/python/docs/UpdatePasswordByToken.md | 14 + clients/python/docs/User.md | 15 + clients/python/docs/UserCreation.md | 13 + clients/python/docs/UserList.md | 13 + clients/python/docs/VersionConfig.md | 14 + clients/python/docs/apis/tags/ActionsApi.md | 829 --- clients/python/docs/apis/tags/AuthApi.md | 5434 ----------------- clients/python/docs/apis/tags/BranchesApi.md | 1670 ----- clients/python/docs/apis/tags/CommitsApi.md | 694 --- clients/python/docs/apis/tags/ConfigApi.md | 693 --- .../python/docs/apis/tags/ExperimentalApi.md | 238 - .../python/docs/apis/tags/HealthCheckApi.md | 63 - clients/python/docs/apis/tags/MetadataApi.md | 609 -- .../python/docs/apis/tags/ModelImportApi.md | 429 -- clients/python/docs/apis/tags/ObjectsApi.md | 2581 -------- clients/python/docs/apis/tags/OtfDiffApi.md | 238 - clients/python/docs/apis/tags/RefsApi.md | 1387 ----- .../python/docs/apis/tags/RepositoriesApi.md | 1262 ---- clients/python/docs/apis/tags/RetentionApi.md | 925 --- clients/python/docs/apis/tags/StagingApi.md | 487 -- .../python/docs/apis/tags/StatisticsApi.md | 171 - clients/python/docs/apis/tags/TagsApi.md | 792 --- clients/python/docs/apis/tags/TemplatesApi.md | 220 - .../docs/models/AccessKeyCredentials.md | 16 - clients/python/docs/models/ActionRun.md | 21 - clients/python/docs/models/ActionRunList.md | 28 - .../python/docs/models/AuthCapabilities.md | 16 - .../python/docs/models/AuthenticationToken.md | 16 - clients/python/docs/models/BranchCreation.md | 16 - .../docs/models/BranchProtectionRule.md | 15 - .../python/docs/models/CherryPickCreation.md | 16 - clients/python/docs/models/CommPrefsInput.md | 17 - clients/python/docs/models/Commit.md | 45 - clients/python/docs/models/CommitCreation.md | 29 - clients/python/docs/models/CommitList.md | 28 - clients/python/docs/models/Credentials.md | 16 - clients/python/docs/models/CredentialsList.md | 28 - .../docs/models/CredentialsWithSecret.md | 17 - clients/python/docs/models/CurrentUser.md | 15 - clients/python/docs/models/Diff.md | 18 - clients/python/docs/models/DiffList.md | 28 - clients/python/docs/models/Error.md | 15 - .../python/docs/models/FindMergeBaseResult.md | 17 - .../docs/models/ForgotPasswordRequest.md | 15 - .../docs/models/GarbageCollectionConfig.md | 15 - .../models/GarbageCollectionPrepareRequest.md | 15 - .../GarbageCollectionPrepareResponse.md | 17 - .../docs/models/GarbageCollectionRule.md | 16 - .../docs/models/GarbageCollectionRules.md | 28 - clients/python/docs/models/Group.md | 16 - clients/python/docs/models/GroupCreation.md | 15 - clients/python/docs/models/GroupList.md | 28 - clients/python/docs/models/HookRun.md | 20 - clients/python/docs/models/HookRunList.md | 28 - .../python/docs/models/ImportPagination.md | 17 - .../models/IngestRangeCreationResponse.md | 16 - clients/python/docs/models/LoginConfig.md | 35 - .../python/docs/models/LoginInformation.md | 16 - clients/python/docs/models/Merge.md | 29 - clients/python/docs/models/MergeResult.md | 16 - .../python/docs/models/MergeResultSummary.md | 18 - .../python/docs/models/MetaRangeCreation.md | 27 - .../docs/models/MetaRangeCreationResponse.md | 15 - clients/python/docs/models/NextStep.md | 15 - .../python/docs/models/ObjectCopyCreation.md | 16 - clients/python/docs/models/ObjectError.md | 17 - clients/python/docs/models/ObjectErrorList.md | 27 - .../python/docs/models/ObjectStageCreation.md | 20 - clients/python/docs/models/ObjectStats.md | 22 - clients/python/docs/models/ObjectStatsList.md | 28 - .../python/docs/models/ObjectUserMetadata.md | 14 - clients/python/docs/models/OtfDiffEntry.md | 28 - clients/python/docs/models/OtfDiffList.md | 28 - clients/python/docs/models/Pagination.md | 18 - clients/python/docs/models/PathList.md | 27 - clients/python/docs/models/Policy.md | 29 - clients/python/docs/models/PolicyList.md | 28 - .../models/PrepareGCUncommittedRequest.md | 15 - .../models/PrepareGCUncommittedResponse.md | 17 - clients/python/docs/models/RangeMetadata.md | 19 - clients/python/docs/models/Ref.md | 16 - clients/python/docs/models/RefList.md | 28 - clients/python/docs/models/RefsDump.md | 17 - clients/python/docs/models/Repository.md | 18 - .../python/docs/models/RepositoryCreation.md | 17 - clients/python/docs/models/RepositoryList.md | 28 - clients/python/docs/models/ResetCreation.md | 16 - clients/python/docs/models/RevertCreation.md | 16 - clients/python/docs/models/Setup.md | 16 - clients/python/docs/models/SetupState.md | 16 - .../python/docs/models/StageRangeCreation.md | 18 - clients/python/docs/models/StagingLocation.md | 19 - clients/python/docs/models/StagingMetadata.md | 33 - clients/python/docs/models/Statement.md | 29 - clients/python/docs/models/StatsEvent.md | 17 - clients/python/docs/models/StatsEventsList.md | 27 - clients/python/docs/models/StorageConfig.md | 21 - clients/python/docs/models/StorageURI.md | 17 - clients/python/docs/models/TagCreation.md | 16 - .../docs/models/UnderlyingObjectProperties.md | 15 - .../docs/models/UpdatePasswordByToken.md | 17 - clients/python/docs/models/User.md | 18 - clients/python/docs/models/UserCreation.md | 16 - clients/python/docs/models/UserList.md | 28 - clients/python/docs/models/VersionConfig.md | 17 - clients/python/lakefs_client/__init__.py | 3 +- clients/python/lakefs_client/api/__init__.py | 3 + .../python/lakefs_client/api/actions_api.py | 611 ++ clients/python/lakefs_client/api/auth_api.py | 4091 +++++++++++++ .../python/lakefs_client/api/branches_api.py | 1166 ++++ .../python/lakefs_client/api/commits_api.py | 467 ++ .../python/lakefs_client/api/config_api.py | 706 +++ .../lakefs_client/api/experimental_api.py | 200 + .../lakefs_client/api/health_check_api.py | 139 + .../python/lakefs_client/api/import_api.py | 305 + .../python/lakefs_client/api/metadata_api.py | 436 ++ .../python/lakefs_client/api/objects_api.py | 1571 +++++ .../python/lakefs_client/api/otf_diff_api.py | 200 + clients/python/lakefs_client/api/refs_api.py | 933 +++ .../lakefs_client/api/repositories_api.py | 925 +++ .../python/lakefs_client/api/retention_api.py | 669 ++ .../python/lakefs_client/api/staging_api.py | 340 ++ .../lakefs_client/api/statistics_api.py | 161 + clients/python/lakefs_client/api/tags_api.py | 577 ++ .../python/lakefs_client/api/templates_api.py | 167 + clients/python/lakefs_client/api_client.py | 1939 ++---- clients/python/lakefs_client/apis/__init__.py | 37 +- .../python/lakefs_client/apis/path_to_api.py | 212 - .../lakefs_client/apis/paths/__init__.py | 3 - .../apis/paths/auth_capabilities.py | 7 - .../lakefs_client/apis/paths/auth_groups.py | 9 - .../apis/paths/auth_groups_group_id.py | 9 - .../paths/auth_groups_group_id_members.py | 7 - .../auth_groups_group_id_members_user_id.py | 9 - .../paths/auth_groups_group_id_policies.py | 7 - ...auth_groups_group_id_policies_policy_id.py | 9 - .../lakefs_client/apis/paths/auth_login.py | 7 - .../lakefs_client/apis/paths/auth_password.py | 7 - .../apis/paths/auth_password_forgot.py | 7 - .../lakefs_client/apis/paths/auth_policies.py | 9 - .../apis/paths/auth_policies_policy_id.py | 11 - .../lakefs_client/apis/paths/auth_users.py | 9 - .../apis/paths/auth_users_user_id.py | 9 - .../paths/auth_users_user_id_credentials.py | 9 - ...users_user_id_credentials_access_key_id.py | 9 - .../apis/paths/auth_users_user_id_groups.py | 7 - .../apis/paths/auth_users_user_id_policies.py | 7 - .../auth_users_user_id_policies_policy_id.py | 9 - .../apis/paths/config_garbage_collection.py | 7 - .../apis/paths/config_storage.py | 7 - .../apis/paths/config_version.py | 7 - .../lakefs_client/apis/paths/healthcheck.py | 7 - .../lakefs_client/apis/paths/repositories.py | 9 - .../apis/paths/repositories_repository.py | 9 - .../repositories_repository_actions_runs.py | 7 - ...sitories_repository_actions_runs_run_id.py | 7 - ...es_repository_actions_runs_run_id_hooks.py | 7 - ...ns_runs_run_id_hooks_hook_run_id_output.py | 7 - ...positories_repository_branch_protection.py | 11 - .../paths/repositories_repository_branches.py | 9 - ...repositories_repository_branches_branch.py | 11 - ..._repository_branches_branch_cherry_pick.py | 7 - ...ries_repository_branches_branch_commits.py | 9 - ...itories_repository_branches_branch_diff.py | 7 - ...ries_repository_branches_branch_objects.py | 11 - ...repository_branches_branch_objects_copy.py | 7 - ...pository_branches_branch_objects_delete.py | 7 - ...ories_repository_branches_branch_revert.py | 7 - ...ository_branches_branch_staging_backing.py | 9 - ...sitories_repository_branches_metaranges.py | 7 - ...repositories_repository_branches_ranges.py | 7 - ...positories_repository_commits_commit_id.py | 7 - ...ositories_repository_gc_prepare_commits.py | 7 - ...tories_repository_gc_prepare_uncommited.py | 7 - .../paths/repositories_repository_gc_rules.py | 11 - ...pository_metadata_meta_range_meta_range.py | 7 - ...itories_repository_metadata_range_range.py | 7 - ...sitory_otf_refs_left_ref_diff_right_ref.py | 7 - ...sitories_repository_refs_branch_symlink.py | 7 - .../repositories_repository_refs_dump.py | 7 - ...repository_refs_left_ref_diff_right_ref.py | 7 - ...epositories_repository_refs_ref_commits.py | 7 - ...epositories_repository_refs_ref_objects.py | 9 - ...sitories_repository_refs_ref_objects_ls.py | 7 - ...tories_repository_refs_ref_objects_stat.py | 7 - ..._refs_ref_objects_underlying_properties.py | 7 - .../repositories_repository_refs_restore.py | 7 - ...efs_source_ref_merge_destination_branch.py | 9 - .../paths/repositories_repository_tags.py | 9 - .../paths/repositories_repository_tags_tag.py | 9 - .../apis/paths/setup_comm_prefs.py | 7 - .../lakefs_client/apis/paths/setup_lakefs.py | 9 - .../lakefs_client/apis/paths/statistics.py | 7 - .../apis/paths/templates_template_location.py | 7 - .../python/lakefs_client/apis/paths/user.py | 7 - .../python/lakefs_client/apis/tag_to_api.py | 68 - .../lakefs_client/apis/tags/__init__.py | 26 - .../lakefs_client/apis/tags/actions_api.py | 30 - .../lakefs_client/apis/tags/auth_api.py | 86 - .../lakefs_client/apis/tags/branches_api.py | 38 - .../lakefs_client/apis/tags/commits_api.py | 28 - .../lakefs_client/apis/tags/config_api.py | 34 - .../apis/tags/experimental_api.py | 24 - .../apis/tags/health_check_api.py | 24 - .../lakefs_client/apis/tags/metadata_api.py | 28 - .../apis/tags/model_import_api.py | 26 - .../lakefs_client/apis/tags/objects_api.py | 42 - .../lakefs_client/apis/tags/otf_diff_api.py | 24 - .../lakefs_client/apis/tags/refs_api.py | 34 - .../apis/tags/repositories_api.py | 36 - .../lakefs_client/apis/tags/retention_api.py | 32 - .../lakefs_client/apis/tags/staging_api.py | 26 - .../lakefs_client/apis/tags/statistics_api.py | 24 - .../lakefs_client/apis/tags/tags_api.py | 30 - .../lakefs_client/apis/tags/templates_api.py | 24 - clients/python/lakefs_client/configuration.py | 53 +- clients/python/lakefs_client/exceptions.py | 60 +- .../python/lakefs_client/model/__init__.py | 2 +- .../model/access_key_credentials.py | 340 +- .../model/access_key_credentials.pyi | 106 - .../python/lakefs_client/model/action_run.py | 428 +- .../python/lakefs_client/model/action_run.pyi | 167 - .../lakefs_client/model/action_run_list.py | 357 +- .../lakefs_client/model/action_run_list.pyi | 127 - .../lakefs_client/model/auth_capabilities.py | 305 +- .../lakefs_client/model/auth_capabilities.pyi | 89 - .../model/authentication_token.py | 314 +- .../model/authentication_token.pyi | 94 - .../lakefs_client/model/branch_creation.py | 318 +- .../lakefs_client/model/branch_creation.pyi | 96 - .../model/branch_protection_rule.py | 311 +- .../model/branch_protection_rule.pyi | 89 - .../model/cherry_pick_creation.py | 314 +- .../model/cherry_pick_creation.pyi | 94 - .../lakefs_client/model/comm_prefs_input.py | 332 +- .../lakefs_client/model/comm_prefs_input.pyi | 106 - clients/python/lakefs_client/model/commit.py | 454 +- clients/python/lakefs_client/model/commit.pyi | 204 - .../lakefs_client/model/commit_creation.py | 356 +- .../lakefs_client/model/commit_creation.pyi | 132 - .../python/lakefs_client/model/commit_list.py | 357 +- .../lakefs_client/model/commit_list.pyi | 127 - .../python/lakefs_client/model/credentials.py | 318 +- .../lakefs_client/model/credentials.pyi | 96 - .../lakefs_client/model/credentials_list.py | 357 +- .../lakefs_client/model/credentials_list.pyi | 127 - .../model/credentials_with_secret.py | 336 +- .../model/credentials_with_secret.pyi | 108 - .../lakefs_client/model/current_user.py | 311 +- .../lakefs_client/model/current_user.pyi | 89 - clients/python/lakefs_client/model/diff.py | 416 +- clients/python/lakefs_client/model/diff.pyi | 156 - .../python/lakefs_client/model/diff_list.py | 357 +- .../python/lakefs_client/model/diff_list.pyi | 127 - clients/python/lakefs_client/model/error.py | 300 +- clients/python/lakefs_client/model/error.pyi | 84 - .../model/find_merge_base_result.py | 336 +- .../model/find_merge_base_result.pyi | 108 - .../model/forgot_password_request.py | 300 +- .../model/forgot_password_request.pyi | 84 - .../model/garbage_collection_config.py | 291 +- .../model/garbage_collection_config.pyi | 79 - .../garbage_collection_prepare_request.py | 291 +- .../garbage_collection_prepare_request.pyi | 79 - .../garbage_collection_prepare_response.py | 336 +- .../garbage_collection_prepare_response.pyi | 108 - .../model/garbage_collection_rule.py | 318 +- .../model/garbage_collection_rule.pyi | 96 - .../model/garbage_collection_rules.py | 351 +- .../model/garbage_collection_rules.pyi | 123 - clients/python/lakefs_client/model/group.py | 318 +- clients/python/lakefs_client/model/group.pyi | 96 - .../lakefs_client/model/group_creation.py | 300 +- .../lakefs_client/model/group_creation.pyi | 84 - .../python/lakefs_client/model/group_list.py | 357 +- .../python/lakefs_client/model/group_list.pyi | 127 - .../python/lakefs_client/model/hook_run.py | 410 +- .../python/lakefs_client/model/hook_run.pyi | 155 - .../lakefs_client/model/hook_run_list.py | 357 +- .../lakefs_client/model/hook_run_list.pyi | 127 - .../lakefs_client/model/import_pagination.py | 332 +- .../lakefs_client/model/import_pagination.pyi | 106 - .../model/ingest_range_creation_response.py | 322 +- .../model/ingest_range_creation_response.pyi | 98 - .../lakefs_client/model/inline_object1.py | 262 + .../lakefs_client/model/login_config.py | 438 +- .../lakefs_client/model/login_config.pyi | 183 - .../lakefs_client/model/login_information.py | 318 +- .../lakefs_client/model/login_information.pyi | 96 - clients/python/lakefs_client/model/merge.py | 347 +- clients/python/lakefs_client/model/merge.pyi | 127 - .../lakefs_client/model/merge_result.py | 325 +- .../lakefs_client/model/merge_result.pyi | 99 - .../model/merge_result_summary.py | 333 +- .../model/merge_result_summary.pyi | 109 - .../model/meta_range_creation.py | 337 +- .../model/meta_range_creation.pyi | 111 - .../model/meta_range_creation_response.py | 291 +- .../model/meta_range_creation_response.pyi | 79 - .../python/lakefs_client/model/next_step.py | 300 +- .../python/lakefs_client/model/next_step.pyi | 84 - .../model/object_copy_creation.py | 314 +- .../model/object_copy_creation.pyi | 94 - .../lakefs_client/model/object_error.py | 332 +- .../lakefs_client/model/object_error.pyi | 106 - .../lakefs_client/model/object_error_list.py | 333 +- .../lakefs_client/model/object_error_list.pyi | 111 - .../model/object_stage_creation.py | 389 +- .../model/object_stage_creation.pyi | 143 - .../lakefs_client/model/object_stats.py | 449 +- .../lakefs_client/model/object_stats.pyi | 180 - .../lakefs_client/model/object_stats_list.py | 357 +- .../lakefs_client/model/object_stats_list.pyi | 127 - .../model/object_user_metadata.py | 266 +- .../model/object_user_metadata.pyi | 58 - .../lakefs_client/model/otf_diff_entry.py | 402 +- .../lakefs_client/model/otf_diff_entry.pyi | 149 - .../lakefs_client/model/otf_diff_list.py | 377 +- .../lakefs_client/model/otf_diff_list.pyi | 138 - .../python/lakefs_client/model/pagination.py | 376 +- .../python/lakefs_client/model/pagination.pyi | 130 - .../python/lakefs_client/model/path_list.py | 322 +- .../python/lakefs_client/model/path_list.pyi | 106 - clients/python/lakefs_client/model/policy.py | 369 +- clients/python/lakefs_client/model/policy.pyi | 133 - .../python/lakefs_client/model/policy_list.py | 357 +- .../lakefs_client/model/policy_list.pyi | 127 - .../model/prepare_gc_uncommitted_request.py | 291 +- .../model/prepare_gc_uncommitted_request.pyi | 79 - .../model/prepare_gc_uncommitted_response.py | 332 +- .../model/prepare_gc_uncommitted_response.pyi | 106 - .../lakefs_client/model/range_metadata.py | 372 +- .../lakefs_client/model/range_metadata.pyi | 132 - clients/python/lakefs_client/model/ref.py | 318 +- clients/python/lakefs_client/model/ref.pyi | 96 - .../python/lakefs_client/model/ref_list.py | 357 +- .../python/lakefs_client/model/ref_list.pyi | 127 - .../python/lakefs_client/model/refs_dump.py | 336 +- .../python/lakefs_client/model/refs_dump.pyi | 108 - .../python/lakefs_client/model/repository.py | 354 +- .../python/lakefs_client/model/repository.pyi | 120 - .../model/repository_creation.py | 362 +- .../model/repository_creation.pyi | 116 - .../lakefs_client/model/repository_list.py | 357 +- .../lakefs_client/model/repository_list.pyi | 127 - .../lakefs_client/model/reset_creation.py | 344 +- .../lakefs_client/model/reset_creation.pyi | 111 - .../lakefs_client/model/revert_creation.py | 318 +- .../lakefs_client/model/revert_creation.pyi | 96 - clients/python/lakefs_client/model/setup.py | 325 +- clients/python/lakefs_client/model/setup.pyi | 99 - .../python/lakefs_client/model/setup_state.py | 346 +- .../lakefs_client/model/setup_state.pyi | 111 - .../model/stage_range_creation.py | 350 +- .../model/stage_range_creation.pyi | 118 - .../lakefs_client/model/staging_location.py | 347 +- .../lakefs_client/model/staging_location.pyi | 125 - .../lakefs_client/model/staging_metadata.py | 403 +- .../lakefs_client/model/staging_metadata.pyi | 163 - .../python/lakefs_client/model/statement.py | 386 +- .../python/lakefs_client/model/statement.pyi | 143 - .../python/lakefs_client/model/stats_event.py | 333 +- .../lakefs_client/model/stats_event.pyi | 105 - .../lakefs_client/model/stats_events_list.py | 333 +- .../lakefs_client/model/stats_events_list.pyi | 111 - .../lakefs_client/model/storage_config.py | 404 +- .../lakefs_client/model/storage_config.pyi | 154 - .../python/lakefs_client/model/storage_uri.py | 300 +- .../lakefs_client/model/storage_uri.pyi | 86 - .../lakefs_client/model/tag_creation.py | 318 +- .../lakefs_client/model/tag_creation.pyi | 96 - .../model/underlying_object_properties.py | 310 +- .../model/underlying_object_properties.pyi | 98 - .../model/update_password_by_token.py | 332 +- .../model/update_password_by_token.pyi | 106 - clients/python/lakefs_client/model/user.py | 346 +- clients/python/lakefs_client/model/user.pyi | 116 - .../lakefs_client/model/user_creation.py | 314 +- .../lakefs_client/model/user_creation.pyi | 94 - .../python/lakefs_client/model/user_list.py | 357 +- .../python/lakefs_client/model/user_list.pyi | 127 - .../lakefs_client/model/version_config.py | 319 +- .../lakefs_client/model/version_config.pyi | 99 - clients/python/lakefs_client/model_utils.py | 2034 ++++++ .../python/lakefs_client/models/__init__.py | 5 +- .../python/lakefs_client/paths/__init__.py | 74 - .../paths/auth_capabilities/__init__.py | 7 - .../paths/auth_capabilities/get.py | 270 - .../paths/auth_capabilities/get.pyi | 264 - .../paths/auth_groups/__init__.py | 7 - .../lakefs_client/paths/auth_groups/get.py | 379 -- .../lakefs_client/paths/auth_groups/get.pyi | 361 -- .../lakefs_client/paths/auth_groups/post.py | 413 -- .../lakefs_client/paths/auth_groups/post.pyi | 398 -- .../paths/auth_groups_group_id/__init__.py | 7 - .../paths/auth_groups_group_id/delete.py | 364 -- .../paths/auth_groups_group_id/delete.pyi | 349 -- .../paths/auth_groups_group_id/get.py | 372 -- .../paths/auth_groups_group_id/get.pyi | 357 -- .../auth_groups_group_id_members/__init__.py | 7 - .../paths/auth_groups_group_id_members/get.py | 433 -- .../auth_groups_group_id_members/get.pyi | 415 -- .../__init__.py | 7 - .../delete.py | 373 -- .../delete.pyi | 358 -- .../put.py | 373 -- .../put.pyi | 358 -- .../auth_groups_group_id_policies/__init__.py | 7 - .../auth_groups_group_id_policies/get.py | 453 -- .../auth_groups_group_id_policies/get.pyi | 434 -- .../__init__.py | 7 - .../delete.py | 373 -- .../delete.pyi | 358 -- .../put.py | 373 -- .../put.pyi | 358 -- .../paths/auth_login/__init__.py | 7 - .../lakefs_client/paths/auth_login/post.py | 400 -- .../lakefs_client/paths/auth_login/post.pyi | 388 -- .../paths/auth_password/__init__.py | 7 - .../lakefs_client/paths/auth_password/post.py | 384 -- .../paths/auth_password/post.pyi | 374 -- .../paths/auth_password_forgot/__init__.py | 7 - .../paths/auth_password_forgot/post.py | 380 -- .../paths/auth_password_forgot/post.pyi | 373 -- .../paths/auth_policies/__init__.py | 7 - .../lakefs_client/paths/auth_policies/get.py | 379 -- .../lakefs_client/paths/auth_policies/get.pyi | 361 -- .../lakefs_client/paths/auth_policies/post.py | 435 -- .../paths/auth_policies/post.pyi | 419 -- .../paths/auth_policies_policy_id/__init__.py | 7 - .../paths/auth_policies_policy_id/delete.py | 364 -- .../paths/auth_policies_policy_id/delete.pyi | 349 -- .../paths/auth_policies_policy_id/get.py | 372 -- .../paths/auth_policies_policy_id/get.pyi | 357 -- .../paths/auth_policies_policy_id/put.py | 492 -- .../paths/auth_policies_policy_id/put.pyi | 476 -- .../paths/auth_users/__init__.py | 7 - .../lakefs_client/paths/auth_users/get.py | 379 -- .../lakefs_client/paths/auth_users/get.pyi | 361 -- .../lakefs_client/paths/auth_users/post.py | 433 -- .../lakefs_client/paths/auth_users/post.pyi | 417 -- .../paths/auth_users_user_id/__init__.py | 7 - .../paths/auth_users_user_id/delete.py | 364 -- .../paths/auth_users_user_id/delete.pyi | 349 -- .../paths/auth_users_user_id/get.py | 372 -- .../paths/auth_users_user_id/get.pyi | 357 -- .../__init__.py | 7 - .../auth_users_user_id_credentials/get.py | 453 -- .../auth_users_user_id_credentials/get.pyi | 434 -- .../auth_users_user_id_credentials/post.py | 372 -- .../auth_users_user_id_credentials/post.pyi | 357 -- .../__init__.py | 7 - .../delete.py | 373 -- .../delete.pyi | 358 -- .../get.py | 381 -- .../get.pyi | 366 -- .../auth_users_user_id_groups/__init__.py | 7 - .../paths/auth_users_user_id_groups/get.py | 453 -- .../paths/auth_users_user_id_groups/get.pyi | 434 -- .../auth_users_user_id_policies/__init__.py | 7 - .../paths/auth_users_user_id_policies/get.py | 462 -- .../paths/auth_users_user_id_policies/get.pyi | 443 -- .../__init__.py | 7 - .../delete.py | 373 -- .../delete.pyi | 358 -- .../put.py | 373 -- .../put.pyi | 358 -- .../config_garbage_collection/__init__.py | 7 - .../paths/config_garbage_collection/get.py | 267 - .../paths/config_garbage_collection/get.pyi | 254 - .../paths/config_storage/__init__.py | 7 - .../lakefs_client/paths/config_storage/get.py | 267 - .../paths/config_storage/get.pyi | 254 - .../paths/config_version/__init__.py | 7 - .../lakefs_client/paths/config_version/get.py | 267 - .../paths/config_version/get.pyi | 254 - .../paths/healthcheck/__init__.py | 7 - .../lakefs_client/paths/healthcheck/get.py | 205 - .../lakefs_client/paths/healthcheck/get.pyi | 200 - .../paths/repositories/__init__.py | 7 - .../lakefs_client/paths/repositories/get.py | 379 -- .../lakefs_client/paths/repositories/get.pyi | 361 -- .../lakefs_client/paths/repositories/post.py | 493 -- .../lakefs_client/paths/repositories/post.pyi | 477 -- .../paths/repositories_repository/__init__.py | 7 - .../paths/repositories_repository/delete.py | 364 -- .../paths/repositories_repository/delete.pyi | 349 -- .../paths/repositories_repository/get.py | 372 -- .../paths/repositories_repository/get.pyi | 357 -- .../__init__.py | 7 - .../get.py | 462 -- .../get.pyi | 443 -- .../__init__.py | 7 - .../get.py | 381 -- .../get.pyi | 366 -- .../__init__.py | 7 - .../get.py | 453 -- .../get.pyi | 434 -- .../__init__.py | 7 - .../get.py | 390 -- .../get.pyi | 375 -- .../__init__.py | 7 - .../delete.py | 517 -- .../delete.pyi | 502 -- .../get.py | 397 -- .../get.pyi | 382 -- .../post.py | 464 -- .../post.pyi | 449 -- .../__init__.py | 7 - .../repositories_repository_branches/get.py | 453 -- .../repositories_repository_branches/get.pyi | 434 -- .../repositories_repository_branches/post.py | 513 -- .../repositories_repository_branches/post.pyi | 496 -- .../__init__.py | 7 - .../delete.py | 393 -- .../delete.pyi | 377 -- .../get.py | 381 -- .../get.pyi | 366 -- .../put.py | 474 -- .../put.pyi | 459 -- .../__init__.py | 7 - .../post.py | 522 -- .../post.pyi | 505 -- .../__init__.py | 7 - .../get.py | 453 -- .../get.pyi | 434 -- .../post.py | 599 -- .../post.pyi | 581 -- .../__init__.py | 7 - .../get.py | 471 -- .../get.pyi | 452 -- .../__init__.py | 7 - .../delete.py | 448 -- .../delete.pyi | 432 -- .../post.py | 714 --- .../post.pyi | 691 --- .../put.py | 580 -- .../put.pyi | 563 -- .../__init__.py | 7 - .../post.py | 560 -- .../post.pyi | 544 -- .../__init__.py | 7 - .../post.py | 502 -- .../post.pyi | 486 -- .../__init__.py | 7 - .../post.py | 514 -- .../post.pyi | 497 -- .../__init__.py | 7 - .../get.py | 445 -- .../get.pyi | 430 -- .../put.py | 581 -- .../put.pyi | 564 -- .../__init__.py | 7 - .../post.py | 513 -- .../post.pyi | 496 -- .../__init__.py | 7 - .../post.py | 493 -- .../post.pyi | 477 -- .../__init__.py | 7 - .../get.py | 381 -- .../get.pyi | 366 -- .../__init__.py | 7 - .../post.py | 470 -- .../post.pyi | 455 -- .../__init__.py | 7 - .../post.py | 490 -- .../post.pyi | 474 -- .../__init__.py | 7 - .../delete.py | 363 -- .../delete.pyi | 348 -- .../repositories_repository_gc_rules/get.py | 371 -- .../repositories_repository_gc_rules/get.pyi | 356 -- .../repositories_repository_gc_rules/post.py | 464 -- .../repositories_repository_gc_rules/post.pyi | 449 -- .../__init__.py | 7 - .../get.py | 396 -- .../get.pyi | 376 -- .../__init__.py | 7 - .../get.py | 396 -- .../get.pyi | 376 -- .../__init__.py | 7 - .../get.py | 475 -- .../get.pyi | 459 -- .../__init__.py | 7 - .../post.py | 435 -- .../post.pyi | 420 -- .../__init__.py | 7 - .../repositories_repository_refs_dump/put.py | 392 -- .../repositories_repository_refs_dump/put.pyi | 376 -- .../__init__.py | 7 - .../get.py | 509 -- .../get.pyi | 483 -- .../__init__.py | 7 - .../get.py | 524 -- .../get.pyi | 505 -- .../__init__.py | 7 - .../get.py | 677 -- .../get.pyi | 608 -- .../head.py | 568 -- .../head.pyi | 505 -- .../__init__.py | 7 - .../get.py | 489 -- .../get.pyi | 470 -- .../__init__.py | 7 - .../get.py | 467 -- .../get.pyi | 451 -- .../__init__.py | 7 - .../get.py | 436 -- .../get.pyi | 421 -- .../__init__.py | 7 - .../put.py | 485 -- .../put.pyi | 469 -- .../__init__.py | 7 - .../get.py | 410 -- .../get.pyi | 394 -- .../post.py | 568 -- .../post.pyi | 549 -- .../repositories_repository_tags/__init__.py | 7 - .../paths/repositories_repository_tags/get.py | 453 -- .../repositories_repository_tags/get.pyi | 434 -- .../repositories_repository_tags/post.py | 513 -- .../repositories_repository_tags/post.pyi | 496 -- .../__init__.py | 7 - .../delete.py | 373 -- .../delete.pyi | 358 -- .../repositories_repository_tags_tag/get.py | 381 -- .../repositories_repository_tags_tag/get.pyi | 366 -- .../paths/setup_comm_prefs/__init__.py | 7 - .../paths/setup_comm_prefs/post.py | 408 -- .../paths/setup_comm_prefs/post.pyi | 400 -- .../paths/setup_lakefs/__init__.py | 7 - .../lakefs_client/paths/setup_lakefs/get.py | 270 - .../lakefs_client/paths/setup_lakefs/get.pyi | 264 - .../lakefs_client/paths/setup_lakefs/post.py | 408 -- .../lakefs_client/paths/setup_lakefs/post.pyi | 400 -- .../paths/statistics/__init__.py | 7 - .../lakefs_client/paths/statistics/post.py | 408 -- .../lakefs_client/paths/statistics/post.pyi | 393 -- .../templates_template_location/__init__.py | 7 - .../paths/templates_template_location/get.py | 476 -- .../paths/templates_template_location/get.pyi | 461 -- .../lakefs_client/paths/user/__init__.py | 7 - .../python/lakefs_client/paths/user/get.py | 247 - .../python/lakefs_client/paths/user/get.pyi | 235 - clients/python/lakefs_client/rest.py | 232 +- clients/python/lakefs_client/schemas.py | 2476 -------- clients/python/requirements.txt | 7 +- clients/python/setup.py | 21 +- clients/python/test-requirements.txt | 2 - .../test_access_key_credentials.py | 18 +- .../test/{test_models => }/test_action_run.py | 18 +- clients/python/test/test_action_run_list.py | 40 + clients/python/test/test_actions_api.py | 57 + clients/python/test/test_auth_api.py | 253 + .../test_auth_capabilities.py | 18 +- .../test_authentication_token.py | 18 +- .../{test_models => }/test_branch_creation.py | 18 +- .../test_branch_protection_rule.py | 18 +- clients/python/test/test_branches_api.py | 85 + .../test_cherry_pick_creation.py | 18 +- .../test_comm_prefs_input.py | 18 +- .../test/{test_models => }/test_commit.py | 18 +- .../{test_models => }/test_commit_creation.py | 18 +- clients/python/test/test_commit_list.py | 40 + clients/python/test/test_commits_api.py | 50 + clients/python/test/test_config_api.py | 68 + .../{test_models => }/test_credentials.py | 18 +- clients/python/test/test_credentials_list.py | 40 + .../test_credentials_with_secret.py | 18 +- .../{test_models => }/test_current_user.py | 20 +- .../test/{test_models => }/test_diff.py | 18 +- clients/python/test/test_diff_list.py | 40 + .../test/{test_models => }/test_error.py | 18 +- clients/python/test/test_experimental_api.py | 36 + .../test_find_merge_base_result.py | 18 +- .../test_forgot_password_request.py | 18 +- .../test_garbage_collection_config.py | 18 +- ...test_garbage_collection_prepare_request.py | 18 +- ...est_garbage_collection_prepare_response.py | 18 +- .../test_garbage_collection_rule.py | 18 +- .../test_garbage_collection_rules.py | 20 +- .../test/{test_models => }/test_group.py | 18 +- .../{test_models => }/test_group_creation.py | 18 +- clients/python/test/test_group_list.py | 40 + clients/python/test/test_health_check_api.py | 35 + .../test/{test_models => }/test_hook_run.py | 18 +- clients/python/test/test_hook_run_list.py | 40 + clients/python/test/test_import_api.py | 43 + .../test_import_pagination.py | 18 +- .../test_ingest_range_creation_response.py | 40 + clients/python/test/test_inline_object1.py | 36 + .../{test_models => }/test_login_config.py | 18 +- .../test_login_information.py | 18 +- .../test/{test_models => }/test_merge.py | 18 +- .../{test_models => }/test_merge_result.py | 20 +- .../test_merge_result_summary.py | 18 +- .../test_meta_range_creation.py | 20 +- .../test_meta_range_creation_response.py | 18 +- clients/python/test/test_metadata_api.py | 50 + clients/python/test/test_models/__init__.py | 0 .../test/test_models/test_action_run_list.py | 26 - .../test/test_models/test_commit_list.py | 26 - .../test/test_models/test_credentials_list.py | 26 - .../python/test/test_models/test_diff_list.py | 26 - .../test/test_models/test_group_list.py | 26 - .../test/test_models/test_hook_run_list.py | 26 - .../test_ingest_range_creation_response.py | 26 - .../test_models/test_object_stats_list.py | 26 - .../test/test_models/test_policy_list.py | 26 - .../python/test/test_models/test_ref_list.py | 26 - .../test/test_models/test_repository_list.py | 26 - clients/python/test/test_models/test_setup.py | 26 - .../python/test/test_models/test_user_list.py | 26 - .../test/{test_models => }/test_next_step.py | 18 +- .../test_object_copy_creation.py | 18 +- .../{test_models => }/test_object_error.py | 18 +- .../test_object_error_list.py | 20 +- .../test_object_stage_creation.py | 20 +- .../{test_models => }/test_object_stats.py | 20 +- clients/python/test/test_object_stats_list.py | 40 + .../test_object_user_metadata.py | 18 +- clients/python/test/test_objects_api.py | 98 + clients/python/test/test_otf_diff_api.py | 36 + .../{test_models => }/test_otf_diff_entry.py | 18 +- .../{test_models => }/test_otf_diff_list.py | 20 +- .../test/{test_models => }/test_pagination.py | 18 +- .../test/{test_models => }/test_path_list.py | 18 +- clients/python/test/test_paths/__init__.py | 68 - .../test_auth_capabilities/__init__.py | 0 .../test_auth_capabilities/test_get.py | 41 - .../test_paths/test_auth_groups/__init__.py | 0 .../test_paths/test_auth_groups/test_get.py | 41 - .../test_paths/test_auth_groups/test_post.py | 41 - .../test_auth_groups_group_id/__init__.py | 0 .../test_auth_groups_group_id/test_delete.py | 40 - .../test_auth_groups_group_id/test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_put.py | 40 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_put.py | 40 - .../test_paths/test_auth_login/__init__.py | 0 .../test_paths/test_auth_login/test_post.py | 41 - .../test_paths/test_auth_password/__init__.py | 0 .../test_auth_password/test_post.py | 42 - .../test_auth_password_forgot/__init__.py | 0 .../test_auth_password_forgot/test_post.py | 42 - .../test_paths/test_auth_policies/__init__.py | 0 .../test_paths/test_auth_policies/test_get.py | 41 - .../test_auth_policies/test_post.py | 43 - .../test_auth_policies_policy_id/__init__.py | 0 .../test_delete.py | 40 - .../test_auth_policies_policy_id/test_get.py | 41 - .../test_auth_policies_policy_id/test_put.py | 43 - .../test_paths/test_auth_users/__init__.py | 0 .../test_paths/test_auth_users/test_get.py | 41 - .../test_paths/test_auth_users/test_post.py | 41 - .../test_auth_users_user_id/__init__.py | 0 .../test_auth_users_user_id/test_delete.py | 40 - .../test_auth_users_user_id/test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 41 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_put.py | 40 - .../__init__.py | 0 .../test_get.py | 40 - .../test_config_storage/__init__.py | 0 .../test_config_storage/test_get.py | 40 - .../test_config_version/__init__.py | 0 .../test_config_version/test_get.py | 40 - .../test_paths/test_healthcheck/__init__.py | 0 .../test_paths/test_healthcheck/test_get.py | 39 - .../test_paths/test_repositories/__init__.py | 0 .../test_paths/test_repositories/test_get.py | 41 - .../test_paths/test_repositories/test_post.py | 43 - .../test_repositories_repository/__init__.py | 0 .../test_delete.py | 40 - .../test_repositories_repository/test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_delete.py | 41 - .../test_get.py | 41 - .../test_post.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_get.py | 41 - .../test_put.py | 42 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_post.py | 40 - .../test_put.py | 43 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_post.py | 42 - .../__init__.py | 0 .../test_get.py | 41 - .../test_put.py | 43 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_post.py | 43 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_post.py | 41 - .../__init__.py | 0 .../test_post.py | 41 - .../__init__.py | 0 .../test_delete.py | 39 - .../test_get.py | 40 - .../test_post.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_post.py | 41 - .../__init__.py | 0 .../test_put.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_head.py | 40 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_put.py | 42 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_post.py | 43 - .../__init__.py | 0 .../test_delete.py | 40 - .../test_get.py | 41 - .../test_setup_comm_prefs/__init__.py | 0 .../test_setup_comm_prefs/test_post.py | 43 - .../test_paths/test_setup_lakefs/__init__.py | 0 .../test_paths/test_setup_lakefs/test_get.py | 41 - .../test_paths/test_setup_lakefs/test_post.py | 43 - .../test_paths/test_statistics/__init__.py | 0 .../test_paths/test_statistics/test_post.py | 42 - .../__init__.py | 0 .../test_get.py | 40 - .../test/test_paths/test_user/__init__.py | 0 .../test/test_paths/test_user/test_get.py | 41 - .../test/{test_models => }/test_policy.py | 20 +- clients/python/test/test_policy_list.py | 40 + .../test_prepare_gc_uncommitted_request.py | 18 +- .../test_prepare_gc_uncommitted_response.py | 18 +- .../{test_models => }/test_range_metadata.py | 18 +- .../python/test/{test_models => }/test_ref.py | 18 +- clients/python/test/test_ref_list.py | 40 + clients/python/test/test_refs_api.py | 71 + .../test/{test_models => }/test_refs_dump.py | 18 +- clients/python/test/test_repositories_api.py | 76 + .../test/{test_models => }/test_repository.py | 18 +- .../test_repository_creation.py | 18 +- clients/python/test/test_repository_list.py | 40 + .../{test_models => }/test_reset_creation.py | 18 +- clients/python/test/test_retention_api.py | 61 + .../{test_models => }/test_revert_creation.py | 18 +- clients/python/test/test_setup.py | 38 + .../{test_models => }/test_setup_state.py | 20 +- .../test_stage_range_creation.py | 18 +- clients/python/test/test_staging_api.py | 43 + .../test_staging_location.py | 18 +- .../test_staging_metadata.py | 20 +- .../test/{test_models => }/test_statement.py | 18 +- clients/python/test/test_statistics_api.py | 36 + .../{test_models => }/test_stats_event.py | 18 +- .../test_stats_events_list.py | 20 +- .../{test_models => }/test_storage_config.py | 18 +- .../{test_models => }/test_storage_uri.py | 18 +- .../{test_models => }/test_tag_creation.py | 18 +- clients/python/test/test_tags_api.py | 57 + clients/python/test/test_templates_api.py | 35 + .../test_underlying_object_properties.py | 18 +- .../test_update_password_by_token.py | 18 +- .../test/{test_models => }/test_user.py | 18 +- .../{test_models => }/test_user_creation.py | 18 +- clients/python/test/test_user_list.py | 40 + .../{test_models => }/test_version_config.py | 18 +- clients/python/tox.ini | 3 +- 1350 files changed, 57488 insertions(+), 145323 deletions(-) delete mode 100644 clients/java/.github/workflows/maven.yml delete mode 100644 clients/java/docs/DeleteBranchProtectionRuleRequest.md create mode 100644 clients/java/docs/InlineObject1.md delete mode 100644 clients/java/src/main/java/io/lakefs/clients/api/model/AbstractOpenApiSchema.java delete mode 100644 clients/java/src/main/java/io/lakefs/clients/api/model/DeleteBranchProtectionRuleRequest.java create mode 100644 clients/java/src/main/java/io/lakefs/clients/api/model/InlineObject1.java rename clients/java/src/test/java/io/lakefs/clients/api/model/{DeleteBranchProtectionRuleRequestTest.java => InlineObject1Test.java} (61%) create mode 100644 clients/python/docs/AccessKeyCredentials.md create mode 100644 clients/python/docs/ActionRun.md create mode 100644 clients/python/docs/ActionRunList.md create mode 100644 clients/python/docs/ActionsApi.md create mode 100644 clients/python/docs/AuthApi.md create mode 100644 clients/python/docs/AuthCapabilities.md create mode 100644 clients/python/docs/AuthenticationToken.md create mode 100644 clients/python/docs/BranchCreation.md create mode 100644 clients/python/docs/BranchProtectionRule.md create mode 100644 clients/python/docs/BranchesApi.md create mode 100644 clients/python/docs/CherryPickCreation.md create mode 100644 clients/python/docs/CommPrefsInput.md create mode 100644 clients/python/docs/Commit.md create mode 100644 clients/python/docs/CommitCreation.md create mode 100644 clients/python/docs/CommitList.md create mode 100644 clients/python/docs/CommitsApi.md create mode 100644 clients/python/docs/ConfigApi.md create mode 100644 clients/python/docs/Credentials.md create mode 100644 clients/python/docs/CredentialsList.md create mode 100644 clients/python/docs/CredentialsWithSecret.md create mode 100644 clients/python/docs/CurrentUser.md create mode 100644 clients/python/docs/Diff.md create mode 100644 clients/python/docs/DiffList.md create mode 100644 clients/python/docs/Error.md create mode 100644 clients/python/docs/ExperimentalApi.md create mode 100644 clients/python/docs/FindMergeBaseResult.md create mode 100644 clients/python/docs/ForgotPasswordRequest.md create mode 100644 clients/python/docs/GarbageCollectionConfig.md create mode 100644 clients/python/docs/GarbageCollectionPrepareRequest.md create mode 100644 clients/python/docs/GarbageCollectionPrepareResponse.md create mode 100644 clients/python/docs/GarbageCollectionRule.md create mode 100644 clients/python/docs/GarbageCollectionRules.md create mode 100644 clients/python/docs/Group.md create mode 100644 clients/python/docs/GroupCreation.md create mode 100644 clients/python/docs/GroupList.md create mode 100644 clients/python/docs/HealthCheckApi.md create mode 100644 clients/python/docs/HookRun.md create mode 100644 clients/python/docs/HookRunList.md create mode 100644 clients/python/docs/ImportApi.md create mode 100644 clients/python/docs/ImportPagination.md create mode 100644 clients/python/docs/IngestRangeCreationResponse.md create mode 100644 clients/python/docs/InlineObject1.md create mode 100644 clients/python/docs/LoginConfig.md create mode 100644 clients/python/docs/LoginInformation.md create mode 100644 clients/python/docs/Merge.md create mode 100644 clients/python/docs/MergeResult.md create mode 100644 clients/python/docs/MergeResultSummary.md create mode 100644 clients/python/docs/MetaRangeCreation.md create mode 100644 clients/python/docs/MetaRangeCreationResponse.md create mode 100644 clients/python/docs/MetadataApi.md create mode 100644 clients/python/docs/NextStep.md create mode 100644 clients/python/docs/ObjectCopyCreation.md create mode 100644 clients/python/docs/ObjectError.md create mode 100644 clients/python/docs/ObjectErrorList.md create mode 100644 clients/python/docs/ObjectStageCreation.md create mode 100644 clients/python/docs/ObjectStats.md create mode 100644 clients/python/docs/ObjectStatsList.md create mode 100644 clients/python/docs/ObjectUserMetadata.md create mode 100644 clients/python/docs/ObjectsApi.md create mode 100644 clients/python/docs/OtfDiffApi.md create mode 100644 clients/python/docs/OtfDiffEntry.md create mode 100644 clients/python/docs/OtfDiffList.md create mode 100644 clients/python/docs/Pagination.md create mode 100644 clients/python/docs/PathList.md create mode 100644 clients/python/docs/Policy.md create mode 100644 clients/python/docs/PolicyList.md create mode 100644 clients/python/docs/PrepareGCUncommittedRequest.md create mode 100644 clients/python/docs/PrepareGCUncommittedResponse.md create mode 100644 clients/python/docs/RangeMetadata.md create mode 100644 clients/python/docs/Ref.md create mode 100644 clients/python/docs/RefList.md create mode 100644 clients/python/docs/RefsApi.md create mode 100644 clients/python/docs/RefsDump.md create mode 100644 clients/python/docs/RepositoriesApi.md create mode 100644 clients/python/docs/Repository.md create mode 100644 clients/python/docs/RepositoryCreation.md create mode 100644 clients/python/docs/RepositoryList.md create mode 100644 clients/python/docs/ResetCreation.md create mode 100644 clients/python/docs/RetentionApi.md create mode 100644 clients/python/docs/RevertCreation.md create mode 100644 clients/python/docs/Setup.md create mode 100644 clients/python/docs/SetupState.md create mode 100644 clients/python/docs/StageRangeCreation.md create mode 100644 clients/python/docs/StagingApi.md create mode 100644 clients/python/docs/StagingLocation.md create mode 100644 clients/python/docs/StagingMetadata.md create mode 100644 clients/python/docs/Statement.md create mode 100644 clients/python/docs/StatisticsApi.md create mode 100644 clients/python/docs/StatsEvent.md create mode 100644 clients/python/docs/StatsEventsList.md create mode 100644 clients/python/docs/StorageConfig.md create mode 100644 clients/python/docs/StorageURI.md create mode 100644 clients/python/docs/TagCreation.md create mode 100644 clients/python/docs/TagsApi.md create mode 100644 clients/python/docs/TemplatesApi.md create mode 100644 clients/python/docs/UnderlyingObjectProperties.md create mode 100644 clients/python/docs/UpdatePasswordByToken.md create mode 100644 clients/python/docs/User.md create mode 100644 clients/python/docs/UserCreation.md create mode 100644 clients/python/docs/UserList.md create mode 100644 clients/python/docs/VersionConfig.md delete mode 100644 clients/python/docs/apis/tags/ActionsApi.md delete mode 100644 clients/python/docs/apis/tags/AuthApi.md delete mode 100644 clients/python/docs/apis/tags/BranchesApi.md delete mode 100644 clients/python/docs/apis/tags/CommitsApi.md delete mode 100644 clients/python/docs/apis/tags/ConfigApi.md delete mode 100644 clients/python/docs/apis/tags/ExperimentalApi.md delete mode 100644 clients/python/docs/apis/tags/HealthCheckApi.md delete mode 100644 clients/python/docs/apis/tags/MetadataApi.md delete mode 100644 clients/python/docs/apis/tags/ModelImportApi.md delete mode 100644 clients/python/docs/apis/tags/ObjectsApi.md delete mode 100644 clients/python/docs/apis/tags/OtfDiffApi.md delete mode 100644 clients/python/docs/apis/tags/RefsApi.md delete mode 100644 clients/python/docs/apis/tags/RepositoriesApi.md delete mode 100644 clients/python/docs/apis/tags/RetentionApi.md delete mode 100644 clients/python/docs/apis/tags/StagingApi.md delete mode 100644 clients/python/docs/apis/tags/StatisticsApi.md delete mode 100644 clients/python/docs/apis/tags/TagsApi.md delete mode 100644 clients/python/docs/apis/tags/TemplatesApi.md delete mode 100644 clients/python/docs/models/AccessKeyCredentials.md delete mode 100644 clients/python/docs/models/ActionRun.md delete mode 100644 clients/python/docs/models/ActionRunList.md delete mode 100644 clients/python/docs/models/AuthCapabilities.md delete mode 100644 clients/python/docs/models/AuthenticationToken.md delete mode 100644 clients/python/docs/models/BranchCreation.md delete mode 100644 clients/python/docs/models/BranchProtectionRule.md delete mode 100644 clients/python/docs/models/CherryPickCreation.md delete mode 100644 clients/python/docs/models/CommPrefsInput.md delete mode 100644 clients/python/docs/models/Commit.md delete mode 100644 clients/python/docs/models/CommitCreation.md delete mode 100644 clients/python/docs/models/CommitList.md delete mode 100644 clients/python/docs/models/Credentials.md delete mode 100644 clients/python/docs/models/CredentialsList.md delete mode 100644 clients/python/docs/models/CredentialsWithSecret.md delete mode 100644 clients/python/docs/models/CurrentUser.md delete mode 100644 clients/python/docs/models/Diff.md delete mode 100644 clients/python/docs/models/DiffList.md delete mode 100644 clients/python/docs/models/Error.md delete mode 100644 clients/python/docs/models/FindMergeBaseResult.md delete mode 100644 clients/python/docs/models/ForgotPasswordRequest.md delete mode 100644 clients/python/docs/models/GarbageCollectionConfig.md delete mode 100644 clients/python/docs/models/GarbageCollectionPrepareRequest.md delete mode 100644 clients/python/docs/models/GarbageCollectionPrepareResponse.md delete mode 100644 clients/python/docs/models/GarbageCollectionRule.md delete mode 100644 clients/python/docs/models/GarbageCollectionRules.md delete mode 100644 clients/python/docs/models/Group.md delete mode 100644 clients/python/docs/models/GroupCreation.md delete mode 100644 clients/python/docs/models/GroupList.md delete mode 100644 clients/python/docs/models/HookRun.md delete mode 100644 clients/python/docs/models/HookRunList.md delete mode 100644 clients/python/docs/models/ImportPagination.md delete mode 100644 clients/python/docs/models/IngestRangeCreationResponse.md delete mode 100644 clients/python/docs/models/LoginConfig.md delete mode 100644 clients/python/docs/models/LoginInformation.md delete mode 100644 clients/python/docs/models/Merge.md delete mode 100644 clients/python/docs/models/MergeResult.md delete mode 100644 clients/python/docs/models/MergeResultSummary.md delete mode 100644 clients/python/docs/models/MetaRangeCreation.md delete mode 100644 clients/python/docs/models/MetaRangeCreationResponse.md delete mode 100644 clients/python/docs/models/NextStep.md delete mode 100644 clients/python/docs/models/ObjectCopyCreation.md delete mode 100644 clients/python/docs/models/ObjectError.md delete mode 100644 clients/python/docs/models/ObjectErrorList.md delete mode 100644 clients/python/docs/models/ObjectStageCreation.md delete mode 100644 clients/python/docs/models/ObjectStats.md delete mode 100644 clients/python/docs/models/ObjectStatsList.md delete mode 100644 clients/python/docs/models/ObjectUserMetadata.md delete mode 100644 clients/python/docs/models/OtfDiffEntry.md delete mode 100644 clients/python/docs/models/OtfDiffList.md delete mode 100644 clients/python/docs/models/Pagination.md delete mode 100644 clients/python/docs/models/PathList.md delete mode 100644 clients/python/docs/models/Policy.md delete mode 100644 clients/python/docs/models/PolicyList.md delete mode 100644 clients/python/docs/models/PrepareGCUncommittedRequest.md delete mode 100644 clients/python/docs/models/PrepareGCUncommittedResponse.md delete mode 100644 clients/python/docs/models/RangeMetadata.md delete mode 100644 clients/python/docs/models/Ref.md delete mode 100644 clients/python/docs/models/RefList.md delete mode 100644 clients/python/docs/models/RefsDump.md delete mode 100644 clients/python/docs/models/Repository.md delete mode 100644 clients/python/docs/models/RepositoryCreation.md delete mode 100644 clients/python/docs/models/RepositoryList.md delete mode 100644 clients/python/docs/models/ResetCreation.md delete mode 100644 clients/python/docs/models/RevertCreation.md delete mode 100644 clients/python/docs/models/Setup.md delete mode 100644 clients/python/docs/models/SetupState.md delete mode 100644 clients/python/docs/models/StageRangeCreation.md delete mode 100644 clients/python/docs/models/StagingLocation.md delete mode 100644 clients/python/docs/models/StagingMetadata.md delete mode 100644 clients/python/docs/models/Statement.md delete mode 100644 clients/python/docs/models/StatsEvent.md delete mode 100644 clients/python/docs/models/StatsEventsList.md delete mode 100644 clients/python/docs/models/StorageConfig.md delete mode 100644 clients/python/docs/models/StorageURI.md delete mode 100644 clients/python/docs/models/TagCreation.md delete mode 100644 clients/python/docs/models/UnderlyingObjectProperties.md delete mode 100644 clients/python/docs/models/UpdatePasswordByToken.md delete mode 100644 clients/python/docs/models/User.md delete mode 100644 clients/python/docs/models/UserCreation.md delete mode 100644 clients/python/docs/models/UserList.md delete mode 100644 clients/python/docs/models/VersionConfig.md create mode 100644 clients/python/lakefs_client/api/__init__.py create mode 100644 clients/python/lakefs_client/api/actions_api.py create mode 100644 clients/python/lakefs_client/api/auth_api.py create mode 100644 clients/python/lakefs_client/api/branches_api.py create mode 100644 clients/python/lakefs_client/api/commits_api.py create mode 100644 clients/python/lakefs_client/api/config_api.py create mode 100644 clients/python/lakefs_client/api/experimental_api.py create mode 100644 clients/python/lakefs_client/api/health_check_api.py create mode 100644 clients/python/lakefs_client/api/import_api.py create mode 100644 clients/python/lakefs_client/api/metadata_api.py create mode 100644 clients/python/lakefs_client/api/objects_api.py create mode 100644 clients/python/lakefs_client/api/otf_diff_api.py create mode 100644 clients/python/lakefs_client/api/refs_api.py create mode 100644 clients/python/lakefs_client/api/repositories_api.py create mode 100644 clients/python/lakefs_client/api/retention_api.py create mode 100644 clients/python/lakefs_client/api/staging_api.py create mode 100644 clients/python/lakefs_client/api/statistics_api.py create mode 100644 clients/python/lakefs_client/api/tags_api.py create mode 100644 clients/python/lakefs_client/api/templates_api.py delete mode 100644 clients/python/lakefs_client/apis/path_to_api.py delete mode 100644 clients/python/lakefs_client/apis/paths/__init__.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_capabilities.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_groups.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_groups_group_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_groups_group_id_members.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_groups_group_id_members_user_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies_policy_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_login.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_password.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_password_forgot.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_policies.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_policies_policy_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_users.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_users_user_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials_access_key_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_users_user_id_groups.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_users_user_id_policies.py delete mode 100644 clients/python/lakefs_client/apis/paths/auth_users_user_id_policies_policy_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/config_garbage_collection.py delete mode 100644 clients/python/lakefs_client/apis/paths/config_storage.py delete mode 100644 clients/python/lakefs_client/apis/paths/config_version.py delete mode 100644 clients/python/lakefs_client/apis/paths/healthcheck.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branch_protection.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_cherry_pick.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_commits.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_diff.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_copy.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_delete.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_revert.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_staging_backing.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_metaranges.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_branches_ranges.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_commits_commit_id.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_commits.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_uncommited.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_gc_rules.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_metadata_meta_range_meta_range.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_metadata_range_range.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_otf_refs_left_ref_diff_right_ref.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_branch_symlink.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_dump.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_left_ref_diff_right_ref.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_commits.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_ls.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_stat.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_underlying_properties.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_restore.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_refs_source_ref_merge_destination_branch.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_tags.py delete mode 100644 clients/python/lakefs_client/apis/paths/repositories_repository_tags_tag.py delete mode 100644 clients/python/lakefs_client/apis/paths/setup_comm_prefs.py delete mode 100644 clients/python/lakefs_client/apis/paths/setup_lakefs.py delete mode 100644 clients/python/lakefs_client/apis/paths/statistics.py delete mode 100644 clients/python/lakefs_client/apis/paths/templates_template_location.py delete mode 100644 clients/python/lakefs_client/apis/paths/user.py delete mode 100644 clients/python/lakefs_client/apis/tag_to_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/__init__.py delete mode 100644 clients/python/lakefs_client/apis/tags/actions_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/auth_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/branches_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/commits_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/config_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/experimental_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/health_check_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/metadata_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/model_import_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/objects_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/otf_diff_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/refs_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/repositories_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/retention_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/staging_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/statistics_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/tags_api.py delete mode 100644 clients/python/lakefs_client/apis/tags/templates_api.py delete mode 100644 clients/python/lakefs_client/model/access_key_credentials.pyi delete mode 100644 clients/python/lakefs_client/model/action_run.pyi delete mode 100644 clients/python/lakefs_client/model/action_run_list.pyi delete mode 100644 clients/python/lakefs_client/model/auth_capabilities.pyi delete mode 100644 clients/python/lakefs_client/model/authentication_token.pyi delete mode 100644 clients/python/lakefs_client/model/branch_creation.pyi delete mode 100644 clients/python/lakefs_client/model/branch_protection_rule.pyi delete mode 100644 clients/python/lakefs_client/model/cherry_pick_creation.pyi delete mode 100644 clients/python/lakefs_client/model/comm_prefs_input.pyi delete mode 100644 clients/python/lakefs_client/model/commit.pyi delete mode 100644 clients/python/lakefs_client/model/commit_creation.pyi delete mode 100644 clients/python/lakefs_client/model/commit_list.pyi delete mode 100644 clients/python/lakefs_client/model/credentials.pyi delete mode 100644 clients/python/lakefs_client/model/credentials_list.pyi delete mode 100644 clients/python/lakefs_client/model/credentials_with_secret.pyi delete mode 100644 clients/python/lakefs_client/model/current_user.pyi delete mode 100644 clients/python/lakefs_client/model/diff.pyi delete mode 100644 clients/python/lakefs_client/model/diff_list.pyi delete mode 100644 clients/python/lakefs_client/model/error.pyi delete mode 100644 clients/python/lakefs_client/model/find_merge_base_result.pyi delete mode 100644 clients/python/lakefs_client/model/forgot_password_request.pyi delete mode 100644 clients/python/lakefs_client/model/garbage_collection_config.pyi delete mode 100644 clients/python/lakefs_client/model/garbage_collection_prepare_request.pyi delete mode 100644 clients/python/lakefs_client/model/garbage_collection_prepare_response.pyi delete mode 100644 clients/python/lakefs_client/model/garbage_collection_rule.pyi delete mode 100644 clients/python/lakefs_client/model/garbage_collection_rules.pyi delete mode 100644 clients/python/lakefs_client/model/group.pyi delete mode 100644 clients/python/lakefs_client/model/group_creation.pyi delete mode 100644 clients/python/lakefs_client/model/group_list.pyi delete mode 100644 clients/python/lakefs_client/model/hook_run.pyi delete mode 100644 clients/python/lakefs_client/model/hook_run_list.pyi delete mode 100644 clients/python/lakefs_client/model/import_pagination.pyi delete mode 100644 clients/python/lakefs_client/model/ingest_range_creation_response.pyi create mode 100644 clients/python/lakefs_client/model/inline_object1.py delete mode 100644 clients/python/lakefs_client/model/login_config.pyi delete mode 100644 clients/python/lakefs_client/model/login_information.pyi delete mode 100644 clients/python/lakefs_client/model/merge.pyi delete mode 100644 clients/python/lakefs_client/model/merge_result.pyi delete mode 100644 clients/python/lakefs_client/model/merge_result_summary.pyi delete mode 100644 clients/python/lakefs_client/model/meta_range_creation.pyi delete mode 100644 clients/python/lakefs_client/model/meta_range_creation_response.pyi delete mode 100644 clients/python/lakefs_client/model/next_step.pyi delete mode 100644 clients/python/lakefs_client/model/object_copy_creation.pyi delete mode 100644 clients/python/lakefs_client/model/object_error.pyi delete mode 100644 clients/python/lakefs_client/model/object_error_list.pyi delete mode 100644 clients/python/lakefs_client/model/object_stage_creation.pyi delete mode 100644 clients/python/lakefs_client/model/object_stats.pyi delete mode 100644 clients/python/lakefs_client/model/object_stats_list.pyi delete mode 100644 clients/python/lakefs_client/model/object_user_metadata.pyi delete mode 100644 clients/python/lakefs_client/model/otf_diff_entry.pyi delete mode 100644 clients/python/lakefs_client/model/otf_diff_list.pyi delete mode 100644 clients/python/lakefs_client/model/pagination.pyi delete mode 100644 clients/python/lakefs_client/model/path_list.pyi delete mode 100644 clients/python/lakefs_client/model/policy.pyi delete mode 100644 clients/python/lakefs_client/model/policy_list.pyi delete mode 100644 clients/python/lakefs_client/model/prepare_gc_uncommitted_request.pyi delete mode 100644 clients/python/lakefs_client/model/prepare_gc_uncommitted_response.pyi delete mode 100644 clients/python/lakefs_client/model/range_metadata.pyi delete mode 100644 clients/python/lakefs_client/model/ref.pyi delete mode 100644 clients/python/lakefs_client/model/ref_list.pyi delete mode 100644 clients/python/lakefs_client/model/refs_dump.pyi delete mode 100644 clients/python/lakefs_client/model/repository.pyi delete mode 100644 clients/python/lakefs_client/model/repository_creation.pyi delete mode 100644 clients/python/lakefs_client/model/repository_list.pyi delete mode 100644 clients/python/lakefs_client/model/reset_creation.pyi delete mode 100644 clients/python/lakefs_client/model/revert_creation.pyi delete mode 100644 clients/python/lakefs_client/model/setup.pyi delete mode 100644 clients/python/lakefs_client/model/setup_state.pyi delete mode 100644 clients/python/lakefs_client/model/stage_range_creation.pyi delete mode 100644 clients/python/lakefs_client/model/staging_location.pyi delete mode 100644 clients/python/lakefs_client/model/staging_metadata.pyi delete mode 100644 clients/python/lakefs_client/model/statement.pyi delete mode 100644 clients/python/lakefs_client/model/stats_event.pyi delete mode 100644 clients/python/lakefs_client/model/stats_events_list.pyi delete mode 100644 clients/python/lakefs_client/model/storage_config.pyi delete mode 100644 clients/python/lakefs_client/model/storage_uri.pyi delete mode 100644 clients/python/lakefs_client/model/tag_creation.pyi delete mode 100644 clients/python/lakefs_client/model/underlying_object_properties.pyi delete mode 100644 clients/python/lakefs_client/model/update_password_by_token.pyi delete mode 100644 clients/python/lakefs_client/model/user.pyi delete mode 100644 clients/python/lakefs_client/model/user_creation.pyi delete mode 100644 clients/python/lakefs_client/model/user_list.pyi delete mode 100644 clients/python/lakefs_client/model/version_config.pyi create mode 100644 clients/python/lakefs_client/model_utils.py delete mode 100644 clients/python/lakefs_client/paths/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_capabilities/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_capabilities/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_capabilities/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups/post.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups/post.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id/delete.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.py delete mode 100644 clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_login/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_login/post.py delete mode 100644 clients/python/lakefs_client/paths/auth_login/post.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_password/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_password/post.py delete mode 100644 clients/python/lakefs_client/paths/auth_password/post.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_password_forgot/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_password_forgot/post.py delete mode 100644 clients/python/lakefs_client/paths/auth_password_forgot/post.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_policies/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_policies/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_policies/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_policies/post.py delete mode 100644 clients/python/lakefs_client/paths/auth_policies/post.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_policies_policy_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_policies_policy_id/delete.py delete mode 100644 clients/python/lakefs_client/paths/auth_policies_policy_id/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_policies_policy_id/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_policies_policy_id/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_policies_policy_id/put.py delete mode 100644 clients/python/lakefs_client/paths/auth_policies_policy_id/put.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_users/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_users/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users/post.py delete mode 100644 clients/python/lakefs_client/paths/auth_users/post.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id/delete.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_groups/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_groups/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_groups/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies/get.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies/get.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.py delete mode 100644 clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.pyi delete mode 100644 clients/python/lakefs_client/paths/config_garbage_collection/__init__.py delete mode 100644 clients/python/lakefs_client/paths/config_garbage_collection/get.py delete mode 100644 clients/python/lakefs_client/paths/config_garbage_collection/get.pyi delete mode 100644 clients/python/lakefs_client/paths/config_storage/__init__.py delete mode 100644 clients/python/lakefs_client/paths/config_storage/get.py delete mode 100644 clients/python/lakefs_client/paths/config_storage/get.pyi delete mode 100644 clients/python/lakefs_client/paths/config_version/__init__.py delete mode 100644 clients/python/lakefs_client/paths/config_version/get.py delete mode 100644 clients/python/lakefs_client/paths/config_version/get.pyi delete mode 100644 clients/python/lakefs_client/paths/healthcheck/__init__.py delete mode 100644 clients/python/lakefs_client/paths/healthcheck/get.py delete mode 100644 clients/python/lakefs_client/paths/healthcheck/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository/delete.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branch_protection/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_ranges/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_rules/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_dump/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_restore/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags/get.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags/post.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags/post.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags_tag/__init__.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.pyi delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.py delete mode 100644 clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.pyi delete mode 100644 clients/python/lakefs_client/paths/setup_comm_prefs/__init__.py delete mode 100644 clients/python/lakefs_client/paths/setup_comm_prefs/post.py delete mode 100644 clients/python/lakefs_client/paths/setup_comm_prefs/post.pyi delete mode 100644 clients/python/lakefs_client/paths/setup_lakefs/__init__.py delete mode 100644 clients/python/lakefs_client/paths/setup_lakefs/get.py delete mode 100644 clients/python/lakefs_client/paths/setup_lakefs/get.pyi delete mode 100644 clients/python/lakefs_client/paths/setup_lakefs/post.py delete mode 100644 clients/python/lakefs_client/paths/setup_lakefs/post.pyi delete mode 100644 clients/python/lakefs_client/paths/statistics/__init__.py delete mode 100644 clients/python/lakefs_client/paths/statistics/post.py delete mode 100644 clients/python/lakefs_client/paths/statistics/post.pyi delete mode 100644 clients/python/lakefs_client/paths/templates_template_location/__init__.py delete mode 100644 clients/python/lakefs_client/paths/templates_template_location/get.py delete mode 100644 clients/python/lakefs_client/paths/templates_template_location/get.pyi delete mode 100644 clients/python/lakefs_client/paths/user/__init__.py delete mode 100644 clients/python/lakefs_client/paths/user/get.py delete mode 100644 clients/python/lakefs_client/paths/user/get.pyi delete mode 100644 clients/python/lakefs_client/schemas.py rename clients/python/test/{test_models => }/test_access_key_credentials.py (59%) rename clients/python/test/{test_models => }/test_action_run.py (59%) create mode 100644 clients/python/test/test_action_run_list.py create mode 100644 clients/python/test/test_actions_api.py create mode 100644 clients/python/test/test_auth_api.py rename clients/python/test/{test_models => }/test_auth_capabilities.py (59%) rename clients/python/test/{test_models => }/test_authentication_token.py (59%) rename clients/python/test/{test_models => }/test_branch_creation.py (59%) rename clients/python/test/{test_models => }/test_branch_protection_rule.py (59%) create mode 100644 clients/python/test/test_branches_api.py rename clients/python/test/{test_models => }/test_cherry_pick_creation.py (59%) rename clients/python/test/{test_models => }/test_comm_prefs_input.py (59%) rename clients/python/test/{test_models => }/test_commit.py (59%) rename clients/python/test/{test_models => }/test_commit_creation.py (59%) create mode 100644 clients/python/test/test_commit_list.py create mode 100644 clients/python/test/test_commits_api.py create mode 100644 clients/python/test/test_config_api.py rename clients/python/test/{test_models => }/test_credentials.py (59%) create mode 100644 clients/python/test/test_credentials_list.py rename clients/python/test/{test_models => }/test_credentials_with_secret.py (59%) rename clients/python/test/{test_models => }/test_current_user.py (54%) rename clients/python/test/{test_models => }/test_diff.py (59%) create mode 100644 clients/python/test/test_diff_list.py rename clients/python/test/{test_models => }/test_error.py (59%) create mode 100644 clients/python/test/test_experimental_api.py rename clients/python/test/{test_models => }/test_find_merge_base_result.py (59%) rename clients/python/test/{test_models => }/test_forgot_password_request.py (59%) rename clients/python/test/{test_models => }/test_garbage_collection_config.py (59%) rename clients/python/test/{test_models => }/test_garbage_collection_prepare_request.py (59%) rename clients/python/test/{test_models => }/test_garbage_collection_prepare_response.py (59%) rename clients/python/test/{test_models => }/test_garbage_collection_rule.py (59%) rename clients/python/test/{test_models => }/test_garbage_collection_rules.py (50%) rename clients/python/test/{test_models => }/test_group.py (59%) rename clients/python/test/{test_models => }/test_group_creation.py (59%) create mode 100644 clients/python/test/test_group_list.py create mode 100644 clients/python/test/test_health_check_api.py rename clients/python/test/{test_models => }/test_hook_run.py (59%) create mode 100644 clients/python/test/test_hook_run_list.py create mode 100644 clients/python/test/test_import_api.py rename clients/python/test/{test_models => }/test_import_pagination.py (59%) create mode 100644 clients/python/test/test_ingest_range_creation_response.py create mode 100644 clients/python/test/test_inline_object1.py rename clients/python/test/{test_models => }/test_login_config.py (59%) rename clients/python/test/{test_models => }/test_login_information.py (59%) rename clients/python/test/{test_models => }/test_merge.py (59%) rename clients/python/test/{test_models => }/test_merge_result.py (50%) rename clients/python/test/{test_models => }/test_merge_result_summary.py (59%) rename clients/python/test/{test_models => }/test_meta_range_creation.py (52%) rename clients/python/test/{test_models => }/test_meta_range_creation_response.py (59%) create mode 100644 clients/python/test/test_metadata_api.py delete mode 100644 clients/python/test/test_models/__init__.py delete mode 100644 clients/python/test/test_models/test_action_run_list.py delete mode 100644 clients/python/test/test_models/test_commit_list.py delete mode 100644 clients/python/test/test_models/test_credentials_list.py delete mode 100644 clients/python/test/test_models/test_diff_list.py delete mode 100644 clients/python/test/test_models/test_group_list.py delete mode 100644 clients/python/test/test_models/test_hook_run_list.py delete mode 100644 clients/python/test/test_models/test_ingest_range_creation_response.py delete mode 100644 clients/python/test/test_models/test_object_stats_list.py delete mode 100644 clients/python/test/test_models/test_policy_list.py delete mode 100644 clients/python/test/test_models/test_ref_list.py delete mode 100644 clients/python/test/test_models/test_repository_list.py delete mode 100644 clients/python/test/test_models/test_setup.py delete mode 100644 clients/python/test/test_models/test_user_list.py rename clients/python/test/{test_models => }/test_next_step.py (59%) rename clients/python/test/{test_models => }/test_object_copy_creation.py (59%) rename clients/python/test/{test_models => }/test_object_error.py (59%) rename clients/python/test/{test_models => }/test_object_error_list.py (52%) rename clients/python/test/{test_models => }/test_object_stage_creation.py (50%) rename clients/python/test/{test_models => }/test_object_stats.py (50%) create mode 100644 clients/python/test/test_object_stats_list.py rename clients/python/test/{test_models => }/test_object_user_metadata.py (59%) create mode 100644 clients/python/test/test_objects_api.py create mode 100644 clients/python/test/test_otf_diff_api.py rename clients/python/test/{test_models => }/test_otf_diff_entry.py (59%) rename clients/python/test/{test_models => }/test_otf_diff_list.py (51%) rename clients/python/test/{test_models => }/test_pagination.py (59%) rename clients/python/test/{test_models => }/test_path_list.py (59%) delete mode 100644 clients/python/test/test_paths/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_capabilities/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_capabilities/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_groups/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_groups/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_groups/test_post.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id/test_delete.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_members/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_members/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_delete.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_put.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_policies/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_policies/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_delete.py delete mode 100644 clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_put.py delete mode 100644 clients/python/test/test_paths/test_auth_login/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_login/test_post.py delete mode 100644 clients/python/test/test_paths/test_auth_password/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_password/test_post.py delete mode 100644 clients/python/test/test_paths/test_auth_password_forgot/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_password_forgot/test_post.py delete mode 100644 clients/python/test/test_paths/test_auth_policies/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_policies/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_policies/test_post.py delete mode 100644 clients/python/test/test_paths/test_auth_policies_policy_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_policies_policy_id/test_delete.py delete mode 100644 clients/python/test/test_paths/test_auth_policies_policy_id/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_policies_policy_id/test_put.py delete mode 100644 clients/python/test/test_paths/test_auth_users/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_users/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_users/test_post.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id/test_delete.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_credentials/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_credentials/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_credentials/test_post.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_delete.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_groups/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_groups/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_policies/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_policies/test_get.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_delete.py delete mode 100644 clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_put.py delete mode 100644 clients/python/test/test_paths/test_config_garbage_collection/__init__.py delete mode 100644 clients/python/test/test_paths/test_config_garbage_collection/test_get.py delete mode 100644 clients/python/test/test_paths/test_config_storage/__init__.py delete mode 100644 clients/python/test/test_paths/test_config_storage/test_get.py delete mode 100644 clients/python/test/test_paths/test_config_version/__init__.py delete mode 100644 clients/python/test/test_paths/test_config_version/test_get.py delete mode 100644 clients/python/test/test_paths/test_healthcheck/__init__.py delete mode 100644 clients/python/test/test_paths/test_healthcheck/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository/test_delete.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branch_protection/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branch_protection/test_delete.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branch_protection/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branch_protection/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch/test_delete.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch/test_put.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_cherry_pick/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_cherry_pick/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_diff/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_diff/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_delete.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_put.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_copy/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_copy/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_delete/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_delete/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_revert/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_revert/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_put.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_metaranges/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_metaranges/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_ranges/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_branches_ranges/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_commits_commit_id/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_commits_commit_id/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_prepare_commits/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_prepare_commits/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_prepare_uncommited/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_prepare_uncommited/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_rules/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_rules/test_delete.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_rules/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_gc_rules/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_metadata_meta_range_meta_range/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_metadata_meta_range_meta_range/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_metadata_range_range/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_metadata_range_range/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_otf_refs_left_ref_diff_right_ref/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_otf_refs_left_ref_diff_right_ref/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_branch_symlink/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_branch_symlink/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_dump/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_dump/test_put.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_left_ref_diff_right_ref/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_left_ref_diff_right_ref/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_commits/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_commits/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_head.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_ls/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_ls/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_stat/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_stat/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_underlying_properties/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_underlying_properties/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_restore/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_restore/test_put.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_tags/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_tags/test_get.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_tags/test_post.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_tags_tag/__init__.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_tags_tag/test_delete.py delete mode 100644 clients/python/test/test_paths/test_repositories_repository_tags_tag/test_get.py delete mode 100644 clients/python/test/test_paths/test_setup_comm_prefs/__init__.py delete mode 100644 clients/python/test/test_paths/test_setup_comm_prefs/test_post.py delete mode 100644 clients/python/test/test_paths/test_setup_lakefs/__init__.py delete mode 100644 clients/python/test/test_paths/test_setup_lakefs/test_get.py delete mode 100644 clients/python/test/test_paths/test_setup_lakefs/test_post.py delete mode 100644 clients/python/test/test_paths/test_statistics/__init__.py delete mode 100644 clients/python/test/test_paths/test_statistics/test_post.py delete mode 100644 clients/python/test/test_paths/test_templates_template_location/__init__.py delete mode 100644 clients/python/test/test_paths/test_templates_template_location/test_get.py delete mode 100644 clients/python/test/test_paths/test_user/__init__.py delete mode 100644 clients/python/test/test_paths/test_user/test_get.py rename clients/python/test/{test_models => }/test_policy.py (52%) create mode 100644 clients/python/test/test_policy_list.py rename clients/python/test/{test_models => }/test_prepare_gc_uncommitted_request.py (59%) rename clients/python/test/{test_models => }/test_prepare_gc_uncommitted_response.py (59%) rename clients/python/test/{test_models => }/test_range_metadata.py (59%) rename clients/python/test/{test_models => }/test_ref.py (59%) create mode 100644 clients/python/test/test_ref_list.py create mode 100644 clients/python/test/test_refs_api.py rename clients/python/test/{test_models => }/test_refs_dump.py (59%) create mode 100644 clients/python/test/test_repositories_api.py rename clients/python/test/{test_models => }/test_repository.py (59%) rename clients/python/test/{test_models => }/test_repository_creation.py (59%) create mode 100644 clients/python/test/test_repository_list.py rename clients/python/test/{test_models => }/test_reset_creation.py (59%) create mode 100644 clients/python/test/test_retention_api.py rename clients/python/test/{test_models => }/test_revert_creation.py (59%) create mode 100644 clients/python/test/test_setup.py rename clients/python/test/{test_models => }/test_setup_state.py (52%) rename clients/python/test/{test_models => }/test_stage_range_creation.py (59%) create mode 100644 clients/python/test/test_staging_api.py rename clients/python/test/{test_models => }/test_staging_location.py (59%) rename clients/python/test/{test_models => }/test_staging_metadata.py (51%) rename clients/python/test/{test_models => }/test_statement.py (59%) create mode 100644 clients/python/test/test_statistics_api.py rename clients/python/test/{test_models => }/test_stats_event.py (59%) rename clients/python/test/{test_models => }/test_stats_events_list.py (52%) rename clients/python/test/{test_models => }/test_storage_config.py (59%) rename clients/python/test/{test_models => }/test_storage_uri.py (59%) rename clients/python/test/{test_models => }/test_tag_creation.py (59%) create mode 100644 clients/python/test/test_tags_api.py create mode 100644 clients/python/test/test_templates_api.py rename clients/python/test/{test_models => }/test_underlying_object_properties.py (59%) rename clients/python/test/{test_models => }/test_update_password_by_token.py (59%) rename clients/python/test/{test_models => }/test_user.py (59%) rename clients/python/test/{test_models => }/test_user_creation.py (59%) create mode 100644 clients/python/test/test_user_list.py rename clients/python/test/{test_models => }/test_version_config.py (59%) diff --git a/Makefile b/Makefile index 914f14e1181..579e643ea59 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ PROTOC=$(DOCKER) run --rm -v $(shell pwd):/mnt $(PROTOC_IMAGE) CLIENT_JARS_BUCKET="s3://treeverse-clients-us-east/" # https://openapi-generator.tech -OPENAPI_GENERATOR_IMAGE=openapitools/openapi-generator-cli:v6.4.0 +OPENAPI_GENERATOR_IMAGE=openapitools/openapi-generator-cli:v5.3.0 OPENAPI_GENERATOR=$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_GENERATOR_IMAGE) ifndef PACKAGE_VERSION diff --git a/clients/java/.github/workflows/maven.yml b/clients/java/.github/workflows/maven.yml deleted file mode 100644 index 7d4d66b64c2..00000000000 --- a/clients/java/.github/workflows/maven.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -# -# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) - -name: Java CI with Maven - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - build: - name: Build lakeFS API - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '8' ] - steps: - - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java }} - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/clients/java/.openapi-generator/VERSION b/clients/java/.openapi-generator/VERSION index c0be8a7992a..e230c8396d1 100644 --- a/clients/java/.openapi-generator/VERSION +++ b/clients/java/.openapi-generator/VERSION @@ -1 +1 @@ -6.4.0 \ No newline at end of file +5.3.0 \ No newline at end of file diff --git a/clients/java/README.md b/clients/java/README.md index f7047150788..d98ca9a00c7 100644 --- a/clients/java/README.md +++ b/clients/java/README.md @@ -12,8 +12,8 @@ lakeFS HTTP API ## Requirements Building the API client library requires: -1. Java 1.8+ -2. Maven (3.8.3+)/Gradle (7.2+) +1. Java 1.7+ +2. Maven/Gradle ## Installation @@ -49,14 +49,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy - repositories { - mavenCentral() // Needed if the 'api-client' jar has been published to maven central. - mavenLocal() // Needed if the 'api-client' jar has been published to the local maven repo. - } - - dependencies { - implementation "io.lakefs:api-client:0.1.0-SNAPSHOT" - } +compile "io.lakefs:api-client:0.1.0-SNAPSHOT" ``` ### Others @@ -89,7 +82,7 @@ import io.lakefs.clients.api.ActionsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -102,6 +95,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -114,10 +111,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ActionsApi apiInstance = new ActionsApi(defaultClient); String repository = "repository_example"; // String | String runId = "runId_example"; // String | @@ -138,7 +131,7 @@ public class Example { ## Documentation for API Endpoints -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -259,7 +252,6 @@ Class | Method | HTTP request | Description - [CredentialsList](docs/CredentialsList.md) - [CredentialsWithSecret](docs/CredentialsWithSecret.md) - [CurrentUser](docs/CurrentUser.md) - - [DeleteBranchProtectionRuleRequest](docs/DeleteBranchProtectionRuleRequest.md) - [Diff](docs/Diff.md) - [DiffList](docs/DiffList.md) - [Error](docs/Error.md) @@ -277,6 +269,7 @@ Class | Method | HTTP request | Description - [HookRunList](docs/HookRunList.md) - [ImportPagination](docs/ImportPagination.md) - [IngestRangeCreationResponse](docs/IngestRangeCreationResponse.md) + - [InlineObject1](docs/InlineObject1.md) - [LoginConfig](docs/LoginConfig.md) - [LoginInformation](docs/LoginInformation.md) - [Merge](docs/Merge.md) @@ -334,16 +327,16 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication -### jwt_token - -- **Type**: HTTP basic authentication - ### cookie_auth - **Type**: API key - **API key parameter name**: internal_auth_session - **Location**: +### jwt_token + +- **Type**: HTTP basic authentication + ### oidc_auth - **Type**: API key diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml index 884f9dfe5eb..84ff4531f48 100644 --- a/clients/java/api/openapi.yaml +++ b/clients/java/api/openapi.yaml @@ -54,7 +54,7 @@ paths: summary: setup communications preferences tags: - config - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /setup_lakefs: get: @@ -114,7 +114,7 @@ paths: summary: setup lakeFS and create a first user tags: - config - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /user: get: @@ -168,7 +168,7 @@ paths: summary: perform a login tags: - auth - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /auth/password: post: @@ -199,7 +199,7 @@ paths: summary: Update user password by reset_password token tags: - auth - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /auth/password/forgot: post: @@ -229,7 +229,7 @@ paths: summary: forgot password request initiates the password reset process tags: - auth - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /auth/capabilities: get: @@ -347,7 +347,7 @@ paths: summary: create user tags: - auth - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /auth/users/{userId}: delete: @@ -513,7 +513,7 @@ paths: summary: create group tags: - auth - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /auth/groups/{groupId}: delete: @@ -686,7 +686,7 @@ paths: summary: create policy tags: - auth - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /auth/policies/{policyId}: delete: @@ -813,7 +813,7 @@ paths: summary: update policy tags: - auth - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /auth/groups/{groupId}/members: get: @@ -1594,8 +1594,8 @@ paths: post: operationId: createRepository parameters: - - description: "If true, create a bare repository with no initial commit and\ - \ branch" + - description: If true, create a bare repository with no initial commit and + branch explode: true in: query name: bare @@ -1644,7 +1644,7 @@ paths: summary: create repository tags: - repositories - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}: delete: @@ -1840,7 +1840,7 @@ paths: schema: $ref: '#/components/schemas/Error' description: Internal Server Error - summary: "Dump repository refs (tags, commits, branches) to object store" + summary: Dump repository refs (tags, commits, branches) to object store tags: - refs x-accepts: application/json @@ -1888,10 +1888,10 @@ paths: schema: $ref: '#/components/schemas/Error' description: Internal Server Error - summary: "Restore repository refs (tags, commits, branches) from object store" + summary: Restore repository refs (tags, commits, branches) from object store tags: - refs - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/tags: get: @@ -2016,7 +2016,7 @@ paths: summary: create tag tags: - tags - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/tags/{tag}: delete: @@ -2230,7 +2230,7 @@ paths: summary: create branch tags: - branches - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/refs/{ref}/commits: get: @@ -2269,7 +2269,7 @@ paths: minimum: -1 type: integer style: form - - description: "list of paths, each element is a path of a specific object" + - description: list of paths, each element is a path of a specific object explode: true in: query name: objects @@ -2279,7 +2279,7 @@ paths: type: string type: array style: form - - description: "list of paths, each element is a path of a prefix" + - description: list of paths, each element is a path of a prefix explode: true in: query name: prefixes @@ -2323,8 +2323,8 @@ paths: schema: $ref: '#/components/schemas/Error' description: Internal Server Error - summary: "get commit log from ref. If both objects and prefixes are empty, return\ - \ all commits." + summary: get commit log from ref. If both objects and prefixes are empty, return + all commits. tags: - refs x-accepts: application/json @@ -2475,7 +2475,7 @@ paths: summary: create commit tags: - commits - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/{branch}: delete: @@ -2619,7 +2619,7 @@ paths: summary: reset branch tags: - branches - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/{branch}/revert: post: @@ -2681,7 +2681,7 @@ paths: summary: revert tags: - branches - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/{branch}/cherry-pick: post: @@ -2747,7 +2747,7 @@ paths: summary: Replay the changes from the given commit on the branch tags: - branches - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}: get: @@ -2896,7 +2896,7 @@ paths: summary: merge references tags: - refs - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/{branch}/diff: get: @@ -3164,7 +3164,7 @@ paths: name: Range required: false schema: - pattern: "^bytes=((\\d*-\\d*,? ?)+)$" + pattern: ^bytes=((\d*-\d*,? ?)+)$ type: string style: simple - explode: true @@ -3216,7 +3216,7 @@ paths: Content-Range: explode: false schema: - pattern: "^bytes=((\\d*-\\d*,? ?)+)$" + pattern: ^bytes=((\d*-\d*,? ?)+)$ type: string style: simple Last-Modified: @@ -3304,7 +3304,7 @@ paths: name: Range required: false schema: - pattern: "^bytes=((\\d*-\\d*,? ?)+)$" + pattern: ^bytes=((\d*-\d*,? ?)+)$ type: string style: simple responses: @@ -3339,7 +3339,7 @@ paths: Content-Range: explode: false schema: - pattern: "^bytes=((\\d*-\\d*,? ?)+)$" + pattern: ^bytes=((\d*-\d*,? ?)+)$ type: string style: simple Last-Modified: @@ -3498,7 +3498,7 @@ paths: application/json: schema: $ref: '#/components/schemas/StagingLocation' - description: "conflict with a commit, try here" + description: conflict with a commit, try here default: content: application/json: @@ -3508,7 +3508,7 @@ paths: summary: associate staging on this physical address with a path tags: - staging - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/metaranges: post: @@ -3567,7 +3567,7 @@ paths: summary: create a lakeFS metarange file from the given ranges tags: - import - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/ranges: post: @@ -3620,7 +3620,7 @@ paths: summary: create a lakeFS range file from the source uri tags: - import - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/{branch}/objects: delete: @@ -3723,10 +3723,16 @@ paths: type: string style: simple requestBody: + $ref: '#/components/requestBodies/inline_object' content: multipart/form-data: schema: - $ref: '#/components/schemas/uploadObject_request' + properties: + content: + description: Only a single file per upload which must be named "content". + format: binary + type: string + type: object responses: "201": content: @@ -3773,7 +3779,7 @@ paths: tags: - objects x-validation-exclude-body: true - x-content-type: multipart/form-data + x-contentType: multipart/form-data x-accepts: application/json put: operationId: stageObject @@ -3846,7 +3852,7 @@ paths: summary: stage an object's metadata for the given branch tags: - objects - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/{branch}/objects/delete: post: @@ -3906,7 +3912,7 @@ paths: summary: delete objects. Missing objects will not return a NotFound error. tags: - objects - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branches/{branch}/objects/copy: post: @@ -3975,7 +3981,7 @@ paths: summary: create a copy of an object tags: - objects - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/refs/{ref}/objects/stat: get: @@ -4720,7 +4726,7 @@ paths: description: Internal Server Error tags: - retention - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/gc/prepare_commits: post: @@ -4766,7 +4772,7 @@ paths: summary: save lists of active and expired commits for garbage collection tags: - retention - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/gc/prepare_uncommited: post: @@ -4818,7 +4824,7 @@ paths: summary: save repository uncommitted metadata for garbage collection tags: - retention - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /repositories/{repository}/branch_protection: delete: @@ -4832,10 +4838,16 @@ paths: type: string style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_1' content: application/json: schema: - $ref: '#/components/schemas/deleteBranchProtectionRule_request' + properties: + pattern: + type: string + required: + - pattern + type: object required: true responses: "204": @@ -4860,7 +4872,7 @@ paths: description: Internal Server Error tags: - repositories - x-content-type: application/json + x-contentType: application/json x-accepts: application/json get: operationId: getBranchProtectionRules @@ -4942,7 +4954,7 @@ paths: description: Internal Server Error tags: - repositories - x-content-type: application/json + x-contentType: application/json x-accepts: application/json /healthcheck: get: @@ -5099,10 +5111,10 @@ paths: schema: $ref: '#/components/schemas/Error' description: Internal Server Error - summary: "post stats events, this endpoint is meant for internal use only" + summary: post stats events, this endpoint is meant for internal use only tags: - statistics - x-content-type: application/json + x-contentType: application/json x-accepts: application/json components: parameters: @@ -5145,6 +5157,18 @@ components: schema: type: string style: form + requestBodies: + inline_object_1: + content: + application/json: + schema: + $ref: '#/components/schemas/inline_object_1' + required: true + inline_object: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object' responses: Unauthorized: content: @@ -5315,19 +5339,19 @@ components: properties: added: deprecated: true - description: "Deprecated: inaccurate and will be removed." + description: 'Deprecated: inaccurate and will be removed.' type: integer removed: deprecated: true - description: "Deprecated: inaccurate and will be removed." + description: 'Deprecated: inaccurate and will be removed.' type: integer changed: deprecated: true - description: "Deprecated: inaccurate and will be removed." + description: 'Deprecated: inaccurate and will be removed.' type: integer conflict: deprecated: true - description: "Deprecated: inaccurate and will be removed." + description: 'Deprecated: inaccurate and will be removed.' type: integer type: object MergeResult: @@ -5353,7 +5377,7 @@ components: storage_namespace: s3://example-bucket/ properties: name: - pattern: "^[a-z0-9][a-z0-9-]{2,62}$" + pattern: ^[a-z0-9][a-z0-9-]{2,62}$ type: string storage_namespace: description: Filesystem URI to store the underlying data in (e.g. "s3://my-bucket/some/path/") @@ -5475,7 +5499,7 @@ components: description: path of the copied object relative to the ref type: string src_ref: - description: "a reference, if empty uses the provided branch as ref" + description: a reference, if empty uses the provided branch as ref type: string required: - src_path @@ -5621,7 +5645,7 @@ components: type: object OtfDiffEntry: example: - operation_content: "{}" + operation_content: '{}' operation_type: create id: id operation: operation @@ -5654,12 +5678,12 @@ components: example: diff_type: created results: - - operation_content: "{}" + - operation_content: '{}' operation_type: create id: id operation: operation timestamp: 0 - - operation_content: "{}" + - operation_content: '{}' operation_type: create id: id operation: operation @@ -5700,11 +5724,11 @@ components: parent_number: 0 properties: ref: - description: "the commit to revert, given by a ref" + description: the commit to revert, given by a ref type: string parent_number: - description: "when reverting a merge commit, the parent number (starting\ - \ from 1) relative to which to perform the revert." + description: when reverting a merge commit, the parent number (starting + from 1) relative to which to perform the revert. type: integer required: - parent_number @@ -5716,7 +5740,7 @@ components: parent_number: 0 properties: ref: - description: "the commit to cherry-pick, given by a ref" + description: the commit to cherry-pick, given by a ref type: string parent_number: description: | @@ -5841,10 +5865,10 @@ components: type: string type: object strategy: - description: "In case of a merge conflict, this option will force the merge\ - \ process to automatically favor changes from the dest branch ('dest-wins')\ - \ or from the source branch('source-wins'). In case no selection is made,\ - \ the merge process will fail in case of a conflict" + description: In case of a merge conflict, this option will force the merge + process to automatically favor changes from the dest branch ('dest-wins') + or from the source branch('source-wins'). In case no selection is made, + the merge process will fail in case of a conflict type: string type: object BranchCreation: @@ -5952,8 +5976,8 @@ components: email: email properties: id: - description: "a unique identifier for the user. In password-based authentication,\ - \ this is the email." + description: a unique identifier for the user. In password-based authentication, + this is the email. type: string creation_date: description: Unix Epoch in seconds @@ -5995,8 +6019,8 @@ components: id: id properties: id: - description: "a unique identifier for the user. In password-based authentication,\ - \ this is the email." + description: a unique identifier for the user. In password-based authentication, + this is the email. type: string invite_user: type: boolean @@ -6626,8 +6650,8 @@ components: description: opaque staging token to use to link uploaded object type: string presigned_url: - description: "if presign=true is passed in the request, this field will\ - \ contain a presigned URL to use when uploading" + description: if presign=true is passed in the request, this field will contain + a presigned URL to use when uploading nullable: true type: string required: @@ -6762,7 +6786,7 @@ components: pattern: stable_* properties: pattern: - description: "fnmatch pattern for the branch name, supporting * and ? wildcards" + description: fnmatch pattern for the branch name, supporting * and ? wildcards example: stable_* minLength: 1 type: string @@ -6886,12 +6910,11 @@ components: class: class properties: class: - description: "stats event class (e.g. \"s3_gateway\", \"openapi_request\"\ - , \"experimental-feature\", \"ui-event\")" + description: stats event class (e.g. "s3_gateway", "openapi_request", "experimental-feature", + "ui-event") type: string name: - description: "stats event name (e.g. \"put_object\", \"create_repository\"\ - , \"\")" + description: stats event name (e.g. "put_object", "create_repository", "") type: string count: description: number of events of the class and name @@ -6918,14 +6941,14 @@ components: required: - events type: object - uploadObject_request: + inline_object: properties: content: description: Only a single file per upload which must be named "content". format: binary type: string type: object - deleteBranchProtectionRule_request: + inline_object_1: properties: pattern: type: string diff --git a/clients/java/build.gradle b/clients/java/build.gradle index 577e6137442..ffef9fffd9a 100644 --- a/clients/java/build.gradle +++ b/clients/java/build.gradle @@ -1,7 +1,6 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' -apply plugin: 'com.diffplug.spotless' group = 'io.lakefs' version = '0.1.0-SNAPSHOT' @@ -12,8 +11,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } @@ -65,7 +63,7 @@ if(hasProperty('target') && target == 'android') { task.from variant.javaCompile.destinationDir task.destinationDir = project.file("${project.buildDir}/outputs/jar") task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task) + artifacts.add('archives', task); } } @@ -106,63 +104,20 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.6.8' + implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' - implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.8.5' - implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' - implementation 'org.openapitools:jackson-databind-nullable:0.2.4' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation 'com.squareup.okhttp3:okhttp:4.9.1' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' + implementation 'com.google.code.gson:gson:2.8.6' + implementation 'io.gsonfire:gson-fire:1.8.4' + implementation 'org.openapitools:jackson-databind-nullable:0.2.1' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + implementation 'org.threeten:threetenbp:1.4.3' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' - testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' + testImplementation 'junit:junit:4.13.1' + testImplementation 'org.mockito:mockito-core:3.11.2' } javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] } - -// Use spotless plugin to automatically format code, remove unused import, etc -// To apply changes directly to the file, run `gradlew spotlessApply` -// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle -spotless { - // comment out below to run spotless as part of the `check` task - enforceCheck false - - format 'misc', { - // define the files (e.g. '*.gradle', '*.md') to apply `misc` to - target '.gitignore' - - // define the steps to apply to those files - trimTrailingWhitespace() - indentWithSpaces() // Takes an integer argument if you don't like 4 - endWithNewline() - } - java { - // don't need to set target, it is inferred from java - - // apply a specific flavor of google-java-format - googleJavaFormat('1.8').aosp().reflowLongStrings() - - removeUnusedImports() - importOrder() - } -} - -test { - // Enable JUnit 5 (Gradle 4.6+). - useJUnitPlatform() - - // Always run tests, even when nothing changed. - dependsOn 'cleanTest' - - // Show test results. - testLogging { - events "passed", "skipped", "failed" - } - -} diff --git a/clients/java/build.sbt b/clients/java/build.sbt index 3a1946a4fc5..c2bb424c99d 100644 --- a/clients/java/build.sbt +++ b/clients/java/build.sbt @@ -9,20 +9,18 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.10.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", - "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", - "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", - "org.openapitools" % "jackson-databind-nullable" % "0.2.4", - "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", + "io.swagger" % "swagger-annotations" % "1.5.24", + "com.squareup.okhttp3" % "okhttp" % "4.9.1", + "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", + "com.google.code.gson" % "gson" % "2.8.6", + "org.apache.commons" % "commons-lang3" % "3.10", + "org.openapitools" % "jackson-databind-nullable" % "0.2.1", + "org.threeten" % "threetenbp" % "1.4.3" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test", - "org.mockito" % "mockito-core" % "3.12.4" % "test" + "junit" % "junit" % "4.13.1" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/clients/java/docs/AccessKeyCredentials.md b/clients/java/docs/AccessKeyCredentials.md index 097e4db0c20..9cf893ec2e1 100644 --- a/clients/java/docs/AccessKeyCredentials.md +++ b/clients/java/docs/AccessKeyCredentials.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | access key ID to set for user for use in integration testing. | | -|**secretAccessKey** | **String** | secret access key to set for user for use in integration testing. | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessKeyId** | **String** | access key ID to set for user for use in integration testing. | +**secretAccessKey** | **String** | secret access key to set for user for use in integration testing. | diff --git a/clients/java/docs/ActionRun.md b/clients/java/docs/ActionRun.md index 935b53e48e3..799b04a9449 100644 --- a/clients/java/docs/ActionRun.md +++ b/clients/java/docs/ActionRun.md @@ -5,24 +5,24 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**runId** | **String** | | | -|**branch** | **String** | | | -|**startTime** | **OffsetDateTime** | | | -|**endTime** | **OffsetDateTime** | | [optional] | -|**eventType** | **String** | | | -|**status** | [**StatusEnum**](#StatusEnum) | | | -|**commitId** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**runId** | **String** | | +**branch** | **String** | | +**startTime** | **OffsetDateTime** | | +**endTime** | **OffsetDateTime** | | [optional] +**eventType** | **String** | | +**status** | [**StatusEnum**](#StatusEnum) | | +**commitId** | **String** | | ## Enum: StatusEnum -| Name | Value | -|---- | -----| -| FAILED | "failed" | -| COMPLETED | "completed" | +Name | Value +---- | ----- +FAILED | "failed" +COMPLETED | "completed" diff --git a/clients/java/docs/ActionRunList.md b/clients/java/docs/ActionRunList.md index 0a0f19c7dbc..6e284fd2f39 100644 --- a/clients/java/docs/ActionRunList.md +++ b/clients/java/docs/ActionRunList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<ActionRun>**](ActionRun.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<ActionRun>**](ActionRun.md) | | diff --git a/clients/java/docs/ActionsApi.md b/clients/java/docs/ActionsApi.md index bc24e035505..605ec132a32 100644 --- a/clients/java/docs/ActionsApi.md +++ b/clients/java/docs/ActionsApi.md @@ -1,13 +1,13 @@ # ActionsApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getRun**](ActionsApi.md#getRun) | **GET** /repositories/{repository}/actions/runs/{run_id} | get a run | -| [**getRunHookOutput**](ActionsApi.md#getRunHookOutput) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output | -| [**listRepositoryRuns**](ActionsApi.md#listRepositoryRuns) | **GET** /repositories/{repository}/actions/runs | list runs | -| [**listRunHooks**](ActionsApi.md#listRunHooks) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getRun**](ActionsApi.md#getRun) | **GET** /repositories/{repository}/actions/runs/{run_id} | get a run +[**getRunHookOutput**](ActionsApi.md#getRunHookOutput) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output +[**listRepositoryRuns**](ActionsApi.md#listRepositoryRuns) | **GET** /repositories/{repository}/actions/runs | list runs +[**listRunHooks**](ActionsApi.md#listRunHooks) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks @@ -29,7 +29,7 @@ import io.lakefs.clients.api.ActionsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -42,6 +42,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -54,10 +58,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ActionsApi apiInstance = new ActionsApi(defaultClient); String repository = "repository_example"; // String | String runId = "runId_example"; // String | @@ -77,10 +77,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **runId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **runId** | **String**| | ### Return type @@ -88,7 +88,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -98,10 +98,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | action run result | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | action run result | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getRunHookOutput** @@ -122,7 +122,7 @@ import io.lakefs.clients.api.ActionsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -135,6 +135,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -147,10 +151,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ActionsApi apiInstance = new ActionsApi(defaultClient); String repository = "repository_example"; // String | String runId = "runId_example"; // String | @@ -171,11 +171,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **runId** | **String**| | | -| **hookRunId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **runId** | **String**| | + **hookRunId** | **String**| | ### Return type @@ -183,7 +183,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -193,10 +193,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | run hook output | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | run hook output | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listRepositoryRuns** @@ -217,7 +217,7 @@ import io.lakefs.clients.api.ActionsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -230,6 +230,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -242,10 +246,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ActionsApi apiInstance = new ActionsApi(defaultClient); String repository = "repository_example"; // String | String after = "after_example"; // String | return items after this value @@ -268,13 +268,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | -| **branch** | **String**| | [optional] | -| **commit** | **String**| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] + **branch** | **String**| | [optional] + **commit** | **String**| | [optional] ### Return type @@ -282,7 +282,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -292,10 +292,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | list action runs | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | list action runs | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listRunHooks** @@ -316,7 +316,7 @@ import io.lakefs.clients.api.ActionsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -329,6 +329,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -341,10 +345,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ActionsApi apiInstance = new ActionsApi(defaultClient); String repository = "repository_example"; // String | String runId = "runId_example"; // String | @@ -366,12 +366,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **runId** | **String**| | | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **runId** | **String**| | + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -379,7 +379,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -389,8 +389,8 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | list specific run hooks | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | list specific run hooks | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/AuthApi.md b/clients/java/docs/AuthApi.md index 2535d61f5ba..aa39b2e6833 100644 --- a/clients/java/docs/AuthApi.md +++ b/clients/java/docs/AuthApi.md @@ -1,41 +1,41 @@ # AuthApi -All URIs are relative to */api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**addGroupMembership**](AuthApi.md#addGroupMembership) | **PUT** /auth/groups/{groupId}/members/{userId} | add group membership | -| [**attachPolicyToGroup**](AuthApi.md#attachPolicyToGroup) | **PUT** /auth/groups/{groupId}/policies/{policyId} | attach policy to group | -| [**attachPolicyToUser**](AuthApi.md#attachPolicyToUser) | **PUT** /auth/users/{userId}/policies/{policyId} | attach policy to user | -| [**createCredentials**](AuthApi.md#createCredentials) | **POST** /auth/users/{userId}/credentials | create credentials | -| [**createGroup**](AuthApi.md#createGroup) | **POST** /auth/groups | create group | -| [**createPolicy**](AuthApi.md#createPolicy) | **POST** /auth/policies | create policy | -| [**createUser**](AuthApi.md#createUser) | **POST** /auth/users | create user | -| [**deleteCredentials**](AuthApi.md#deleteCredentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials | -| [**deleteGroup**](AuthApi.md#deleteGroup) | **DELETE** /auth/groups/{groupId} | delete group | -| [**deleteGroupMembership**](AuthApi.md#deleteGroupMembership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership | -| [**deletePolicy**](AuthApi.md#deletePolicy) | **DELETE** /auth/policies/{policyId} | delete policy | -| [**deleteUser**](AuthApi.md#deleteUser) | **DELETE** /auth/users/{userId} | delete user | -| [**detachPolicyFromGroup**](AuthApi.md#detachPolicyFromGroup) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group | -| [**detachPolicyFromUser**](AuthApi.md#detachPolicyFromUser) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user | -| [**forgotPassword**](AuthApi.md#forgotPassword) | **POST** /auth/password/forgot | forgot password request initiates the password reset process | -| [**getAuthCapabilities**](AuthApi.md#getAuthCapabilities) | **GET** /auth/capabilities | list authentication capabilities supported | -| [**getCredentials**](AuthApi.md#getCredentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials | -| [**getCurrentUser**](AuthApi.md#getCurrentUser) | **GET** /user | get current user | -| [**getGroup**](AuthApi.md#getGroup) | **GET** /auth/groups/{groupId} | get group | -| [**getPolicy**](AuthApi.md#getPolicy) | **GET** /auth/policies/{policyId} | get policy | -| [**getUser**](AuthApi.md#getUser) | **GET** /auth/users/{userId} | get user | -| [**listGroupMembers**](AuthApi.md#listGroupMembers) | **GET** /auth/groups/{groupId}/members | list group members | -| [**listGroupPolicies**](AuthApi.md#listGroupPolicies) | **GET** /auth/groups/{groupId}/policies | list group policies | -| [**listGroups**](AuthApi.md#listGroups) | **GET** /auth/groups | list groups | -| [**listPolicies**](AuthApi.md#listPolicies) | **GET** /auth/policies | list policies | -| [**listUserCredentials**](AuthApi.md#listUserCredentials) | **GET** /auth/users/{userId}/credentials | list user credentials | -| [**listUserGroups**](AuthApi.md#listUserGroups) | **GET** /auth/users/{userId}/groups | list user groups | -| [**listUserPolicies**](AuthApi.md#listUserPolicies) | **GET** /auth/users/{userId}/policies | list user policies | -| [**listUsers**](AuthApi.md#listUsers) | **GET** /auth/users | list users | -| [**login**](AuthApi.md#login) | **POST** /auth/login | perform a login | -| [**updatePassword**](AuthApi.md#updatePassword) | **POST** /auth/password | Update user password by reset_password token | -| [**updatePolicy**](AuthApi.md#updatePolicy) | **PUT** /auth/policies/{policyId} | update policy | +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addGroupMembership**](AuthApi.md#addGroupMembership) | **PUT** /auth/groups/{groupId}/members/{userId} | add group membership +[**attachPolicyToGroup**](AuthApi.md#attachPolicyToGroup) | **PUT** /auth/groups/{groupId}/policies/{policyId} | attach policy to group +[**attachPolicyToUser**](AuthApi.md#attachPolicyToUser) | **PUT** /auth/users/{userId}/policies/{policyId} | attach policy to user +[**createCredentials**](AuthApi.md#createCredentials) | **POST** /auth/users/{userId}/credentials | create credentials +[**createGroup**](AuthApi.md#createGroup) | **POST** /auth/groups | create group +[**createPolicy**](AuthApi.md#createPolicy) | **POST** /auth/policies | create policy +[**createUser**](AuthApi.md#createUser) | **POST** /auth/users | create user +[**deleteCredentials**](AuthApi.md#deleteCredentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials +[**deleteGroup**](AuthApi.md#deleteGroup) | **DELETE** /auth/groups/{groupId} | delete group +[**deleteGroupMembership**](AuthApi.md#deleteGroupMembership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership +[**deletePolicy**](AuthApi.md#deletePolicy) | **DELETE** /auth/policies/{policyId} | delete policy +[**deleteUser**](AuthApi.md#deleteUser) | **DELETE** /auth/users/{userId} | delete user +[**detachPolicyFromGroup**](AuthApi.md#detachPolicyFromGroup) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group +[**detachPolicyFromUser**](AuthApi.md#detachPolicyFromUser) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user +[**forgotPassword**](AuthApi.md#forgotPassword) | **POST** /auth/password/forgot | forgot password request initiates the password reset process +[**getAuthCapabilities**](AuthApi.md#getAuthCapabilities) | **GET** /auth/capabilities | list authentication capabilities supported +[**getCredentials**](AuthApi.md#getCredentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials +[**getCurrentUser**](AuthApi.md#getCurrentUser) | **GET** /user | get current user +[**getGroup**](AuthApi.md#getGroup) | **GET** /auth/groups/{groupId} | get group +[**getPolicy**](AuthApi.md#getPolicy) | **GET** /auth/policies/{policyId} | get policy +[**getUser**](AuthApi.md#getUser) | **GET** /auth/users/{userId} | get user +[**listGroupMembers**](AuthApi.md#listGroupMembers) | **GET** /auth/groups/{groupId}/members | list group members +[**listGroupPolicies**](AuthApi.md#listGroupPolicies) | **GET** /auth/groups/{groupId}/policies | list group policies +[**listGroups**](AuthApi.md#listGroups) | **GET** /auth/groups | list groups +[**listPolicies**](AuthApi.md#listPolicies) | **GET** /auth/policies | list policies +[**listUserCredentials**](AuthApi.md#listUserCredentials) | **GET** /auth/users/{userId}/credentials | list user credentials +[**listUserGroups**](AuthApi.md#listUserGroups) | **GET** /auth/users/{userId}/groups | list user groups +[**listUserPolicies**](AuthApi.md#listUserPolicies) | **GET** /auth/users/{userId}/policies | list user policies +[**listUsers**](AuthApi.md#listUsers) | **GET** /auth/users | list users +[**login**](AuthApi.md#login) | **POST** /auth/login | perform a login +[**updatePassword**](AuthApi.md#updatePassword) | **POST** /auth/password | Update user password by reset_password token +[**updatePolicy**](AuthApi.md#updatePolicy) | **PUT** /auth/policies/{policyId} | update policy @@ -57,7 +57,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -70,6 +70,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -82,10 +86,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | String userId = "userId_example"; // String | @@ -104,10 +104,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | -| **userId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | + **userId** | **String**| | ### Return type @@ -115,7 +115,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -125,10 +125,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | membership added successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | membership added successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **attachPolicyToGroup** @@ -149,7 +149,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -162,6 +162,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -174,10 +178,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | String policyId = "policyId_example"; // String | @@ -196,10 +196,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | -| **policyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | + **policyId** | **String**| | ### Return type @@ -207,7 +207,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -217,10 +217,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | policy attached successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | policy attached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **attachPolicyToUser** @@ -241,7 +241,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -254,6 +254,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -266,10 +270,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | String policyId = "policyId_example"; // String | @@ -288,10 +288,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **policyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | + **policyId** | **String**| | ### Return type @@ -299,7 +299,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -309,10 +309,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | policy attached successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | policy attached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **createCredentials** @@ -333,7 +333,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -346,6 +346,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -358,10 +362,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | try { @@ -380,9 +380,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | ### Return type @@ -390,7 +390,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -400,10 +400,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | credentials | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | credentials | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **createGroup** @@ -424,7 +424,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -437,6 +437,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -449,10 +453,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); GroupCreation groupCreation = new GroupCreation(); // GroupCreation | try { @@ -471,9 +471,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupCreation** | [**GroupCreation**](GroupCreation.md)| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupCreation** | [**GroupCreation**](GroupCreation.md)| | [optional] ### Return type @@ -481,7 +481,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -491,10 +491,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | group | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | group | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **createPolicy** @@ -515,7 +515,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -528,6 +528,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -540,10 +544,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); Policy policy = new Policy(); // Policy | try { @@ -562,9 +562,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **policy** | [**Policy**](Policy.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policy** | [**Policy**](Policy.md)| | ### Return type @@ -572,7 +572,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -582,11 +582,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | policy | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **409** | Resource Conflicts With Target | - | -| **0** | Internal Server Error | - | +**201** | policy | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | # **createUser** @@ -607,7 +607,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -620,6 +620,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -632,10 +636,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); UserCreation userCreation = new UserCreation(); // UserCreation | try { @@ -654,9 +654,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userCreation** | [**UserCreation**](UserCreation.md)| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userCreation** | [**UserCreation**](UserCreation.md)| | [optional] ### Return type @@ -664,7 +664,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -674,11 +674,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | user | - | -| **400** | validation error | - | -| **401** | Unauthorized | - | -| **409** | Resource Conflicts With Target | - | -| **0** | Internal Server Error | - | +**201** | user | - | +**400** | validation error | - | +**401** | Unauthorized | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | # **deleteCredentials** @@ -699,7 +699,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -712,6 +712,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -724,10 +728,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | String accessKeyId = "accessKeyId_example"; // String | @@ -746,10 +746,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **accessKeyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | + **accessKeyId** | **String**| | ### Return type @@ -757,7 +757,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -767,10 +767,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | credentials deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | credentials deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **deleteGroup** @@ -791,7 +791,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -804,6 +804,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -816,10 +820,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | try { @@ -837,9 +837,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | ### Return type @@ -847,7 +847,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -857,10 +857,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | group deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | group deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **deleteGroupMembership** @@ -881,7 +881,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -894,6 +894,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -906,10 +910,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | String userId = "userId_example"; // String | @@ -928,10 +928,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | -| **userId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | + **userId** | **String**| | ### Return type @@ -939,7 +939,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -949,10 +949,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | membership deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | membership deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **deletePolicy** @@ -973,7 +973,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -986,6 +986,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -998,10 +1002,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String policyId = "policyId_example"; // String | try { @@ -1019,9 +1019,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **policyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policyId** | **String**| | ### Return type @@ -1029,7 +1029,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1039,10 +1039,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | policy deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | policy deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **deleteUser** @@ -1063,7 +1063,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1076,6 +1076,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1088,10 +1092,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | try { @@ -1109,9 +1109,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | ### Return type @@ -1119,7 +1119,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1129,10 +1129,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | user deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | user deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **detachPolicyFromGroup** @@ -1153,7 +1153,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1166,6 +1166,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1178,10 +1182,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | String policyId = "policyId_example"; // String | @@ -1200,10 +1200,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | -| **policyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | + **policyId** | **String**| | ### Return type @@ -1211,7 +1211,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1221,10 +1221,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | policy detached successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | policy detached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **detachPolicyFromUser** @@ -1245,7 +1245,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1258,6 +1258,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1270,10 +1274,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | String policyId = "policyId_example"; // String | @@ -1292,10 +1292,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **policyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | + **policyId** | **String**| | ### Return type @@ -1303,7 +1303,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1313,10 +1313,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | policy detached successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | policy detached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **forgotPassword** @@ -1336,7 +1336,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); AuthApi apiInstance = new AuthApi(defaultClient); ForgotPasswordRequest forgotPasswordRequest = new ForgotPasswordRequest(); // ForgotPasswordRequest | @@ -1355,9 +1355,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **forgotPasswordRequest** | [**ForgotPasswordRequest**](ForgotPasswordRequest.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **forgotPasswordRequest** | [**ForgotPasswordRequest**](ForgotPasswordRequest.md)| | ### Return type @@ -1375,9 +1375,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | No content | - | -| **400** | bad request | - | -| **0** | Internal Server Error | - | +**204** | No content | - | +**400** | bad request | - | +**0** | Internal Server Error | - | # **getAuthCapabilities** @@ -1397,7 +1397,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); AuthApi apiInstance = new AuthApi(defaultClient); try { @@ -1433,8 +1433,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | auth capabilities | - | -| **0** | Internal Server Error | - | +**200** | auth capabilities | - | +**0** | Internal Server Error | - | # **getCredentials** @@ -1455,7 +1455,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1468,6 +1468,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1480,10 +1484,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | String accessKeyId = "accessKeyId_example"; // String | @@ -1503,10 +1503,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **accessKeyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | + **accessKeyId** | **String**| | ### Return type @@ -1514,7 +1514,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1524,10 +1524,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | credentials | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | credentials | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getCurrentUser** @@ -1548,7 +1548,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1561,6 +1561,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1573,10 +1577,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); try { CurrentUser result = apiInstance.getCurrentUser(); @@ -1601,7 +1601,7 @@ This endpoint does not need any parameter. ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1611,7 +1611,7 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | user | - | +**200** | user | - | # **getGroup** @@ -1632,7 +1632,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1645,6 +1645,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1657,10 +1661,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | try { @@ -1679,9 +1679,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | ### Return type @@ -1689,7 +1689,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1699,10 +1699,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | group | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | group | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getPolicy** @@ -1723,7 +1723,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1736,6 +1736,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1748,10 +1752,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String policyId = "policyId_example"; // String | try { @@ -1770,9 +1770,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **policyId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policyId** | **String**| | ### Return type @@ -1780,7 +1780,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1790,10 +1790,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | policy | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | policy | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getUser** @@ -1814,7 +1814,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1827,6 +1827,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1839,10 +1843,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | try { @@ -1861,9 +1861,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | ### Return type @@ -1871,7 +1871,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1881,10 +1881,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | user | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | user | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listGroupMembers** @@ -1905,7 +1905,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -1918,6 +1918,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -1930,10 +1934,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | String prefix = "prefix_example"; // String | return items prefixed with this value @@ -1955,12 +1955,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -1968,7 +1968,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1978,9 +1978,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | group memeber list | - | -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**200** | group memeber list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | # **listGroupPolicies** @@ -2001,7 +2001,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2014,6 +2014,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2026,10 +2030,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String groupId = "groupId_example"; // String | String prefix = "prefix_example"; // String | return items prefixed with this value @@ -2051,12 +2051,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **groupId** | **String**| | | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| | + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -2064,7 +2064,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2074,10 +2074,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | policy list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | policy list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listGroups** @@ -2098,7 +2098,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2111,6 +2111,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2123,10 +2127,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String prefix = "prefix_example"; // String | return items prefixed with this value String after = "after_example"; // String | return items after this value @@ -2147,11 +2147,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -2159,7 +2159,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2169,9 +2169,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | group list | - | -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**200** | group list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | # **listPolicies** @@ -2192,7 +2192,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2205,6 +2205,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2217,10 +2221,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String prefix = "prefix_example"; // String | return items prefixed with this value String after = "after_example"; // String | return items after this value @@ -2241,11 +2241,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -2253,7 +2253,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2263,9 +2263,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | policy list | - | -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**200** | policy list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | # **listUserCredentials** @@ -2286,7 +2286,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2299,6 +2299,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2311,10 +2315,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | String prefix = "prefix_example"; // String | return items prefixed with this value @@ -2336,12 +2336,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -2349,7 +2349,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2359,10 +2359,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | credential list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | credential list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listUserGroups** @@ -2383,7 +2383,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2396,6 +2396,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2408,10 +2412,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | String prefix = "prefix_example"; // String | return items prefixed with this value @@ -2433,12 +2433,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -2446,7 +2446,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2456,10 +2456,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | group list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | group list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listUserPolicies** @@ -2480,7 +2480,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2493,6 +2493,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2505,10 +2509,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String userId = "userId_example"; // String | String prefix = "prefix_example"; // String | return items prefixed with this value @@ -2531,13 +2531,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | -| **effective** | **Boolean**| will return all distinct policies attached to the user or any of its groups | [optional] [default to false] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| | + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] + **effective** | **Boolean**| will return all distinct policies attached to the user or any of its groups | [optional] [default to false] ### Return type @@ -2545,7 +2545,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2555,10 +2555,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | policy list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | policy list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listUsers** @@ -2579,7 +2579,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2592,6 +2592,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2604,10 +2608,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String prefix = "prefix_example"; // String | return items prefixed with this value String after = "after_example"; // String | return items after this value @@ -2628,11 +2628,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -2640,7 +2640,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2650,9 +2650,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | user list | - | -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**200** | user list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | # **login** @@ -2672,7 +2672,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); AuthApi apiInstance = new AuthApi(defaultClient); LoginInformation loginInformation = new LoginInformation(); // LoginInformation | @@ -2692,9 +2692,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **loginInformation** | [**LoginInformation**](LoginInformation.md)| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginInformation** | [**LoginInformation**](LoginInformation.md)| | [optional] ### Return type @@ -2712,9 +2712,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful login | * Set-Cookie -
| -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**200** | successful login | * Set-Cookie -
| +**401** | Unauthorized | - | +**0** | Internal Server Error | - | # **updatePassword** @@ -2735,7 +2735,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: cookie_auth ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); @@ -2760,9 +2760,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **updatePasswordByToken** | [**UpdatePasswordByToken**](UpdatePasswordByToken.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updatePasswordByToken** | [**UpdatePasswordByToken**](UpdatePasswordByToken.md)| | ### Return type @@ -2780,9 +2780,9 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | successful reset | - | -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**201** | successful reset | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | # **updatePolicy** @@ -2803,7 +2803,7 @@ import io.lakefs.clients.api.AuthApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -2816,6 +2816,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -2828,10 +2832,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - AuthApi apiInstance = new AuthApi(defaultClient); String policyId = "policyId_example"; // String | Policy policy = new Policy(); // Policy | @@ -2851,10 +2851,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **policyId** | **String**| | | -| **policy** | [**Policy**](Policy.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policyId** | **String**| | + **policy** | [**Policy**](Policy.md)| | ### Return type @@ -2862,7 +2862,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -2872,9 +2872,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | policy | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | policy | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/AuthCapabilities.md b/clients/java/docs/AuthCapabilities.md index a7be5b502c9..664d2ccb8fd 100644 --- a/clients/java/docs/AuthCapabilities.md +++ b/clients/java/docs/AuthCapabilities.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**inviteUser** | **Boolean** | | [optional] | -|**forgotPassword** | **Boolean** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inviteUser** | **Boolean** | | [optional] +**forgotPassword** | **Boolean** | | [optional] diff --git a/clients/java/docs/AuthenticationToken.md b/clients/java/docs/AuthenticationToken.md index 1adb437b3c9..826f4e3c6e5 100644 --- a/clients/java/docs/AuthenticationToken.md +++ b/clients/java/docs/AuthenticationToken.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**token** | **String** | a JWT token that could be used to authenticate requests | | -|**tokenExpiration** | **Long** | Unix Epoch in seconds | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | a JWT token that could be used to authenticate requests | +**tokenExpiration** | **Long** | Unix Epoch in seconds | [optional] diff --git a/clients/java/docs/BranchCreation.md b/clients/java/docs/BranchCreation.md index eb248dcc39b..7687d5a7422 100644 --- a/clients/java/docs/BranchCreation.md +++ b/clients/java/docs/BranchCreation.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | | -|**source** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**source** | **String** | | diff --git a/clients/java/docs/BranchProtectionRule.md b/clients/java/docs/BranchProtectionRule.md index c5d46a97549..28153739a93 100644 --- a/clients/java/docs/BranchProtectionRule.md +++ b/clients/java/docs/BranchProtectionRule.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pattern** | **String** | fnmatch pattern for the branch name, supporting * and ? wildcards | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pattern** | **String** | fnmatch pattern for the branch name, supporting * and ? wildcards | diff --git a/clients/java/docs/BranchesApi.md b/clients/java/docs/BranchesApi.md index d8a2739aa6f..ffbbde2ee2a 100644 --- a/clients/java/docs/BranchesApi.md +++ b/clients/java/docs/BranchesApi.md @@ -1,17 +1,17 @@ # BranchesApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**cherryPick**](BranchesApi.md#cherryPick) | **POST** /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch | -| [**createBranch**](BranchesApi.md#createBranch) | **POST** /repositories/{repository}/branches | create branch | -| [**deleteBranch**](BranchesApi.md#deleteBranch) | **DELETE** /repositories/{repository}/branches/{branch} | delete branch | -| [**diffBranch**](BranchesApi.md#diffBranch) | **GET** /repositories/{repository}/branches/{branch}/diff | diff branch | -| [**getBranch**](BranchesApi.md#getBranch) | **GET** /repositories/{repository}/branches/{branch} | get branch | -| [**listBranches**](BranchesApi.md#listBranches) | **GET** /repositories/{repository}/branches | list branches | -| [**resetBranch**](BranchesApi.md#resetBranch) | **PUT** /repositories/{repository}/branches/{branch} | reset branch | -| [**revertBranch**](BranchesApi.md#revertBranch) | **POST** /repositories/{repository}/branches/{branch}/revert | revert | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cherryPick**](BranchesApi.md#cherryPick) | **POST** /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch +[**createBranch**](BranchesApi.md#createBranch) | **POST** /repositories/{repository}/branches | create branch +[**deleteBranch**](BranchesApi.md#deleteBranch) | **DELETE** /repositories/{repository}/branches/{branch} | delete branch +[**diffBranch**](BranchesApi.md#diffBranch) | **GET** /repositories/{repository}/branches/{branch}/diff | diff branch +[**getBranch**](BranchesApi.md#getBranch) | **GET** /repositories/{repository}/branches/{branch} | get branch +[**listBranches**](BranchesApi.md#listBranches) | **GET** /repositories/{repository}/branches | list branches +[**resetBranch**](BranchesApi.md#resetBranch) | **PUT** /repositories/{repository}/branches/{branch} | reset branch +[**revertBranch**](BranchesApi.md#revertBranch) | **POST** /repositories/{repository}/branches/{branch}/revert | revert @@ -33,7 +33,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -46,6 +46,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -58,10 +62,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -82,11 +82,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **cherryPickCreation** | [**CherryPickCreation**](CherryPickCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **cherryPickCreation** | [**CherryPickCreation**](CherryPickCreation.md)| | ### Return type @@ -94,7 +94,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -104,12 +104,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | the cherry-pick commit | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **409** | Conflict Found | - | -| **0** | Internal Server Error | - | +**201** | the cherry-pick commit | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Conflict Found | - | +**0** | Internal Server Error | - | # **createBranch** @@ -130,7 +130,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -143,6 +143,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -155,10 +159,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | BranchCreation branchCreation = new BranchCreation(); // BranchCreation | @@ -178,10 +178,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branchCreation** | [**BranchCreation**](BranchCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branchCreation** | [**BranchCreation**](BranchCreation.md)| | ### Return type @@ -189,7 +189,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -199,12 +199,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | reference | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **409** | Resource Conflicts With Target | - | -| **0** | Internal Server Error | - | +**201** | reference | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | # **deleteBranch** @@ -225,7 +225,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -238,6 +238,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -250,10 +254,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -272,10 +272,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | ### Return type @@ -283,7 +283,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -293,11 +293,11 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | branch deleted successfully | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | branch deleted successfully | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **diffBranch** @@ -318,7 +318,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -331,6 +331,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -343,10 +347,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -370,14 +370,14 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **delimiter** | **String**| delimiter used to group common prefixes by | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] + **prefix** | **String**| return items prefixed with this value | [optional] + **delimiter** | **String**| delimiter used to group common prefixes by | [optional] ### Return type @@ -385,7 +385,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -395,10 +395,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | diff of branch uncommitted changes | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | diff of branch uncommitted changes | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getBranch** @@ -419,7 +419,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -432,6 +432,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -444,10 +448,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -467,10 +467,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | ### Return type @@ -478,7 +478,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -488,10 +488,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | branch | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | branch | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listBranches** @@ -512,7 +512,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -525,6 +525,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -537,10 +541,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String prefix = "prefix_example"; // String | return items prefixed with this value @@ -562,12 +562,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -575,7 +575,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -585,10 +585,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | branch list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | branch list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **resetBranch** @@ -609,7 +609,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -622,6 +622,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -634,10 +638,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -657,11 +657,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **resetCreation** | [**ResetCreation**](ResetCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **resetCreation** | [**ResetCreation**](ResetCreation.md)| | ### Return type @@ -669,7 +669,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -679,10 +679,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | reset successful | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | reset successful | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **revertBranch** @@ -703,7 +703,7 @@ import io.lakefs.clients.api.BranchesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -716,6 +716,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -728,10 +732,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - BranchesApi apiInstance = new BranchesApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -751,11 +751,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **revertCreation** | [**RevertCreation**](RevertCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **revertCreation** | [**RevertCreation**](RevertCreation.md)| | ### Return type @@ -763,7 +763,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -773,10 +773,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | revert successful | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **409** | Conflict Found | - | -| **0** | Internal Server Error | - | +**204** | revert successful | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Conflict Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/CherryPickCreation.md b/clients/java/docs/CherryPickCreation.md index 9f1300b6bbf..5792d3befed 100644 --- a/clients/java/docs/CherryPickCreation.md +++ b/clients/java/docs/CherryPickCreation.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ref** | **String** | the commit to cherry-pick, given by a ref | | -|**parentNumber** | **Integer** | when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. The destination branch is parent 1, which is the default behaviour. | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ref** | **String** | the commit to cherry-pick, given by a ref | +**parentNumber** | **Integer** | when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. The destination branch is parent 1, which is the default behaviour. | [optional] diff --git a/clients/java/docs/CommPrefsInput.md b/clients/java/docs/CommPrefsInput.md index db9e6b52bdb..1802f87fcde 100644 --- a/clients/java/docs/CommPrefsInput.md +++ b/clients/java/docs/CommPrefsInput.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**email** | **String** | the provided email | [optional] | -|**featureUpdates** | **Boolean** | was \"feature updates\" checked | | -|**securityUpdates** | **Boolean** | was \"security updates\" checked | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | the provided email | [optional] +**featureUpdates** | **Boolean** | was \"feature updates\" checked | +**securityUpdates** | **Boolean** | was \"security updates\" checked | diff --git a/clients/java/docs/Commit.md b/clients/java/docs/Commit.md index 79f0768a3ae..02ac970bd9c 100644 --- a/clients/java/docs/Commit.md +++ b/clients/java/docs/Commit.md @@ -5,15 +5,15 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**parents** | **List<String>** | | | -|**committer** | **String** | | | -|**message** | **String** | | | -|**creationDate** | **Long** | Unix Epoch in seconds | | -|**metaRangeId** | **String** | | | -|**metadata** | **Map<String, String>** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**parents** | **List<String>** | | +**committer** | **String** | | +**message** | **String** | | +**creationDate** | **Long** | Unix Epoch in seconds | +**metaRangeId** | **String** | | +**metadata** | **Map<String, String>** | | [optional] diff --git a/clients/java/docs/CommitCreation.md b/clients/java/docs/CommitCreation.md index f55b6812a43..3556070dbd8 100644 --- a/clients/java/docs/CommitCreation.md +++ b/clients/java/docs/CommitCreation.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | | | -|**metadata** | **Map<String, String>** | | [optional] | -|**date** | **Long** | set date to override creation date in the commit (Unix Epoch in seconds) | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **String** | | +**metadata** | **Map<String, String>** | | [optional] +**date** | **Long** | set date to override creation date in the commit (Unix Epoch in seconds) | [optional] diff --git a/clients/java/docs/CommitList.md b/clients/java/docs/CommitList.md index ba8ebff8842..746bdbad057 100644 --- a/clients/java/docs/CommitList.md +++ b/clients/java/docs/CommitList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<Commit>**](Commit.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<Commit>**](Commit.md) | | diff --git a/clients/java/docs/CommitsApi.md b/clients/java/docs/CommitsApi.md index e8d15a08af4..69798b80289 100644 --- a/clients/java/docs/CommitsApi.md +++ b/clients/java/docs/CommitsApi.md @@ -1,12 +1,12 @@ # CommitsApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**commit**](CommitsApi.md#commit) | **POST** /repositories/{repository}/branches/{branch}/commits | create commit | -| [**getCommit**](CommitsApi.md#getCommit) | **GET** /repositories/{repository}/commits/{commitId} | get commit | -| [**logBranchCommits**](CommitsApi.md#logBranchCommits) | **GET** /repositories/{repository}/branches/{branch}/commits | get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**commit**](CommitsApi.md#commit) | **POST** /repositories/{repository}/branches/{branch}/commits | create commit +[**getCommit**](CommitsApi.md#getCommit) | **GET** /repositories/{repository}/commits/{commitId} | get commit +[**logBranchCommits**](CommitsApi.md#logBranchCommits) | **GET** /repositories/{repository}/branches/{branch}/commits | get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref @@ -28,7 +28,7 @@ import io.lakefs.clients.api.CommitsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -41,6 +41,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -53,10 +57,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - CommitsApi apiInstance = new CommitsApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -78,12 +78,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **commitCreation** | [**CommitCreation**](CommitCreation.md)| | | -| **sourceMetarange** | **String**| The source metarange to commit. Branch must not have uncommitted changes. | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **commitCreation** | [**CommitCreation**](CommitCreation.md)| | + **sourceMetarange** | **String**| The source metarange to commit. Branch must not have uncommitted changes. | [optional] ### Return type @@ -91,7 +91,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -101,13 +101,13 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | commit | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **412** | Precondition Failed (e.g. a pre-commit hook returned a failure) | - | -| **0** | Internal Server Error | - | +**201** | commit | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed (e.g. a pre-commit hook returned a failure) | - | +**0** | Internal Server Error | - | # **getCommit** @@ -128,7 +128,7 @@ import io.lakefs.clients.api.CommitsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -141,6 +141,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -153,10 +157,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - CommitsApi apiInstance = new CommitsApi(defaultClient); String repository = "repository_example"; // String | String commitId = "commitId_example"; // String | @@ -176,10 +176,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **commitId** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **commitId** | **String**| | ### Return type @@ -187,7 +187,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -197,10 +197,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | commit | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | commit | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **logBranchCommits** @@ -221,7 +221,7 @@ import io.lakefs.clients.api.CommitsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -234,6 +234,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -246,10 +250,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - CommitsApi apiInstance = new CommitsApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -271,12 +271,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -284,7 +284,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -294,8 +294,8 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | commit log | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | commit log | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/ConfigApi.md b/clients/java/docs/ConfigApi.md index d12f4885cf6..47169d3ad5b 100644 --- a/clients/java/docs/ConfigApi.md +++ b/clients/java/docs/ConfigApi.md @@ -1,15 +1,15 @@ # ConfigApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getGarbageCollectionConfig**](ConfigApi.md#getGarbageCollectionConfig) | **GET** /config/garbage-collection | | -| [**getLakeFSVersion**](ConfigApi.md#getLakeFSVersion) | **GET** /config/version | | -| [**getSetupState**](ConfigApi.md#getSetupState) | **GET** /setup_lakefs | check if the lakeFS installation is already set up | -| [**getStorageConfig**](ConfigApi.md#getStorageConfig) | **GET** /config/storage | | -| [**setup**](ConfigApi.md#setup) | **POST** /setup_lakefs | setup lakeFS and create a first user | -| [**setupCommPrefs**](ConfigApi.md#setupCommPrefs) | **POST** /setup_comm_prefs | setup communications preferences | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getGarbageCollectionConfig**](ConfigApi.md#getGarbageCollectionConfig) | **GET** /config/garbage-collection | +[**getLakeFSVersion**](ConfigApi.md#getLakeFSVersion) | **GET** /config/version | +[**getSetupState**](ConfigApi.md#getSetupState) | **GET** /setup_lakefs | check if the lakeFS installation is already set up +[**getStorageConfig**](ConfigApi.md#getStorageConfig) | **GET** /config/storage | +[**setup**](ConfigApi.md#setup) | **POST** /setup_lakefs | setup lakeFS and create a first user +[**setupCommPrefs**](ConfigApi.md#setupCommPrefs) | **POST** /setup_comm_prefs | setup communications preferences @@ -33,7 +33,7 @@ import io.lakefs.clients.api.ConfigApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -46,6 +46,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -58,10 +62,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ConfigApi apiInstance = new ConfigApi(defaultClient); try { GarbageCollectionConfig result = apiInstance.getGarbageCollectionConfig(); @@ -86,7 +86,7 @@ This endpoint does not need any parameter. ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -96,8 +96,8 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | lakeFS garbage collection config | - | -| **401** | Unauthorized | - | +**200** | lakeFS garbage collection config | - | +**401** | Unauthorized | - | # **getLakeFSVersion** @@ -120,7 +120,7 @@ import io.lakefs.clients.api.ConfigApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -133,6 +133,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -145,10 +149,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ConfigApi apiInstance = new ConfigApi(defaultClient); try { VersionConfig result = apiInstance.getLakeFSVersion(); @@ -173,7 +173,7 @@ This endpoint does not need any parameter. ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -183,8 +183,8 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | lakeFS version | - | -| **401** | Unauthorized | - | +**200** | lakeFS version | - | +**401** | Unauthorized | - | # **getSetupState** @@ -204,7 +204,7 @@ import io.lakefs.clients.api.ConfigApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); ConfigApi apiInstance = new ConfigApi(defaultClient); try { @@ -240,8 +240,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | lakeFS setup state | - | -| **0** | Internal Server Error | - | +**200** | lakeFS setup state | - | +**0** | Internal Server Error | - | # **getStorageConfig** @@ -264,7 +264,7 @@ import io.lakefs.clients.api.ConfigApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -277,6 +277,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -289,10 +293,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ConfigApi apiInstance = new ConfigApi(defaultClient); try { StorageConfig result = apiInstance.getStorageConfig(); @@ -317,7 +317,7 @@ This endpoint does not need any parameter. ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -327,8 +327,8 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | lakeFS storage configuration | - | -| **401** | Unauthorized | - | +**200** | lakeFS storage configuration | - | +**401** | Unauthorized | - | # **setup** @@ -348,7 +348,7 @@ import io.lakefs.clients.api.ConfigApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); ConfigApi apiInstance = new ConfigApi(defaultClient); Setup setup = new Setup(); // Setup | @@ -368,9 +368,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **setup** | [**Setup**](Setup.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **setup** | [**Setup**](Setup.md)| | ### Return type @@ -388,10 +388,10 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | user created successfully | - | -| **400** | bad request | - | -| **409** | setup was already called | - | -| **0** | Internal Server Error | - | +**200** | user created successfully | - | +**400** | bad request | - | +**409** | setup was already called | - | +**0** | Internal Server Error | - | # **setupCommPrefs** @@ -411,7 +411,7 @@ import io.lakefs.clients.api.ConfigApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); ConfigApi apiInstance = new ConfigApi(defaultClient); CommPrefsInput commPrefsInput = new CommPrefsInput(); // CommPrefsInput | @@ -431,9 +431,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **commPrefsInput** | [**CommPrefsInput**](CommPrefsInput.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **commPrefsInput** | [**CommPrefsInput**](CommPrefsInput.md)| | ### Return type @@ -451,8 +451,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | communication preferences saved successfully | - | -| **409** | setup was already completed | - | -| **412** | wrong setup state for this operation | - | -| **0** | Internal Server Error | - | +**200** | communication preferences saved successfully | - | +**409** | setup was already completed | - | +**412** | wrong setup state for this operation | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/Credentials.md b/clients/java/docs/Credentials.md index b70bdcb0f94..fe7e7c7cfbd 100644 --- a/clients/java/docs/Credentials.md +++ b/clients/java/docs/Credentials.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | | | -|**creationDate** | **Long** | Unix Epoch in seconds | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessKeyId** | **String** | | +**creationDate** | **Long** | Unix Epoch in seconds | diff --git a/clients/java/docs/CredentialsList.md b/clients/java/docs/CredentialsList.md index 0b15a1e05c7..cf87d215c42 100644 --- a/clients/java/docs/CredentialsList.md +++ b/clients/java/docs/CredentialsList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<Credentials>**](Credentials.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<Credentials>**](Credentials.md) | | diff --git a/clients/java/docs/CredentialsWithSecret.md b/clients/java/docs/CredentialsWithSecret.md index c1267688eee..82e9b89c207 100644 --- a/clients/java/docs/CredentialsWithSecret.md +++ b/clients/java/docs/CredentialsWithSecret.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | | | -|**secretAccessKey** | **String** | | | -|**creationDate** | **Long** | Unix Epoch in seconds | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessKeyId** | **String** | | +**secretAccessKey** | **String** | | +**creationDate** | **Long** | Unix Epoch in seconds | diff --git a/clients/java/docs/CurrentUser.md b/clients/java/docs/CurrentUser.md index e4acbdd3209..0c0af81ddfe 100644 --- a/clients/java/docs/CurrentUser.md +++ b/clients/java/docs/CurrentUser.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**user** | [**User**](User.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**User**](User.md) | | diff --git a/clients/java/docs/DeleteBranchProtectionRuleRequest.md b/clients/java/docs/DeleteBranchProtectionRuleRequest.md deleted file mode 100644 index 66309d43385..00000000000 --- a/clients/java/docs/DeleteBranchProtectionRuleRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeleteBranchProtectionRuleRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pattern** | **String** | | | - - - diff --git a/clients/java/docs/Diff.md b/clients/java/docs/Diff.md index 7307d49bd3b..640d51ba54f 100644 --- a/clients/java/docs/Diff.md +++ b/clients/java/docs/Diff.md @@ -5,33 +5,33 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**path** | **String** | | | -|**pathType** | [**PathTypeEnum**](#PathTypeEnum) | | | -|**sizeBytes** | **Long** | represents the size of the added/changed/deleted entry | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**TypeEnum**](#TypeEnum) | | +**path** | **String** | | +**pathType** | [**PathTypeEnum**](#PathTypeEnum) | | +**sizeBytes** | **Long** | represents the size of the added/changed/deleted entry | [optional] ## Enum: TypeEnum -| Name | Value | -|---- | -----| -| ADDED | "added" | -| REMOVED | "removed" | -| CHANGED | "changed" | -| CONFLICT | "conflict" | -| PREFIX_CHANGED | "prefix_changed" | +Name | Value +---- | ----- +ADDED | "added" +REMOVED | "removed" +CHANGED | "changed" +CONFLICT | "conflict" +PREFIX_CHANGED | "prefix_changed" ## Enum: PathTypeEnum -| Name | Value | -|---- | -----| -| COMMON_PREFIX | "common_prefix" | -| OBJECT | "object" | +Name | Value +---- | ----- +COMMON_PREFIX | "common_prefix" +OBJECT | "object" diff --git a/clients/java/docs/DiffList.md b/clients/java/docs/DiffList.md index ca2790cb316..17f99dedfa2 100644 --- a/clients/java/docs/DiffList.md +++ b/clients/java/docs/DiffList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<Diff>**](Diff.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<Diff>**](Diff.md) | | diff --git a/clients/java/docs/Error.md b/clients/java/docs/Error.md index 19e017d4da1..996ecb91cbc 100644 --- a/clients/java/docs/Error.md +++ b/clients/java/docs/Error.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | short message explaining the error | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **String** | short message explaining the error | diff --git a/clients/java/docs/ExperimentalApi.md b/clients/java/docs/ExperimentalApi.md index 087b24e4530..a1c7dc3e453 100644 --- a/clients/java/docs/ExperimentalApi.md +++ b/clients/java/docs/ExperimentalApi.md @@ -1,10 +1,10 @@ # ExperimentalApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**otfDiff**](ExperimentalApi.md#otfDiff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**otfDiff**](ExperimentalApi.md#otfDiff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff @@ -26,7 +26,7 @@ import io.lakefs.clients.api.ExperimentalApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -39,6 +39,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -51,10 +55,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ExperimentalApi apiInstance = new ExperimentalApi(defaultClient); String repository = "repository_example"; // String | String leftRef = "leftRef_example"; // String | @@ -77,13 +77,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **leftRef** | **String**| | | -| **rightRef** | **String**| | | -| **tablePath** | **String**| a path to the table location under the specified ref. | | -| **type** | **String**| the type of otf | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **leftRef** | **String**| | + **rightRef** | **String**| | + **tablePath** | **String**| a path to the table location under the specified ref. | + **type** | **String**| the type of otf | ### Return type @@ -91,7 +91,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -101,9 +101,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | diff list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **412** | Precondition Failed | - | -| **0** | Internal Server Error | - | +**200** | diff list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/FindMergeBaseResult.md b/clients/java/docs/FindMergeBaseResult.md index b265d13f6f9..227aeb19c3b 100644 --- a/clients/java/docs/FindMergeBaseResult.md +++ b/clients/java/docs/FindMergeBaseResult.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sourceCommitId** | **String** | The commit ID of the merge source | | -|**destinationCommitId** | **String** | The commit ID of the merge destination | | -|**baseCommitId** | **String** | The commit ID of the merge base | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceCommitId** | **String** | The commit ID of the merge source | +**destinationCommitId** | **String** | The commit ID of the merge destination | +**baseCommitId** | **String** | The commit ID of the merge base | diff --git a/clients/java/docs/ForgotPasswordRequest.md b/clients/java/docs/ForgotPasswordRequest.md index 2d040fb84b6..075dbc408d0 100644 --- a/clients/java/docs/ForgotPasswordRequest.md +++ b/clients/java/docs/ForgotPasswordRequest.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**email** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | diff --git a/clients/java/docs/GarbageCollectionConfig.md b/clients/java/docs/GarbageCollectionConfig.md index 478c69aef74..bca9ecf343c 100644 --- a/clients/java/docs/GarbageCollectionConfig.md +++ b/clients/java/docs/GarbageCollectionConfig.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**gracePeriod** | **Integer** | Duration in seconds. Objects created in the recent grace_period will not be collected. | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gracePeriod** | **Integer** | Duration in seconds. Objects created in the recent grace_period will not be collected. | [optional] diff --git a/clients/java/docs/GarbageCollectionPrepareRequest.md b/clients/java/docs/GarbageCollectionPrepareRequest.md index 671a6741752..2b1d232528f 100644 --- a/clients/java/docs/GarbageCollectionPrepareRequest.md +++ b/clients/java/docs/GarbageCollectionPrepareRequest.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**previousRunId** | **String** | run id of a previous successful GC job | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previousRunId** | **String** | run id of a previous successful GC job | [optional] diff --git a/clients/java/docs/GarbageCollectionPrepareResponse.md b/clients/java/docs/GarbageCollectionPrepareResponse.md index c7c59b98a1e..d0747fd6319 100644 --- a/clients/java/docs/GarbageCollectionPrepareResponse.md +++ b/clients/java/docs/GarbageCollectionPrepareResponse.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**runId** | **String** | a unique identifier generated for this GC job | | -|**gcCommitsLocation** | **String** | location of the resulting commits csv table (partitioned by run_id) | | -|**gcAddressesLocation** | **String** | location to use for expired addresses parquet table (partitioned by run_id) | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**runId** | **String** | a unique identifier generated for this GC job | +**gcCommitsLocation** | **String** | location of the resulting commits csv table (partitioned by run_id) | +**gcAddressesLocation** | **String** | location to use for expired addresses parquet table (partitioned by run_id) | diff --git a/clients/java/docs/GarbageCollectionRule.md b/clients/java/docs/GarbageCollectionRule.md index 537149933be..8d71ee5936b 100644 --- a/clients/java/docs/GarbageCollectionRule.md +++ b/clients/java/docs/GarbageCollectionRule.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**branchId** | **String** | | | -|**retentionDays** | **Integer** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**branchId** | **String** | | +**retentionDays** | **Integer** | | diff --git a/clients/java/docs/GarbageCollectionRules.md b/clients/java/docs/GarbageCollectionRules.md index 8f2ae001f53..47241dd588f 100644 --- a/clients/java/docs/GarbageCollectionRules.md +++ b/clients/java/docs/GarbageCollectionRules.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**defaultRetentionDays** | **Integer** | | | -|**branches** | [**List<GarbageCollectionRule>**](GarbageCollectionRule.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**defaultRetentionDays** | **Integer** | | +**branches** | [**List<GarbageCollectionRule>**](GarbageCollectionRule.md) | | diff --git a/clients/java/docs/Group.md b/clients/java/docs/Group.md index 82d59ba511c..c3c0f61f329 100644 --- a/clients/java/docs/Group.md +++ b/clients/java/docs/Group.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**creationDate** | **Long** | Unix Epoch in seconds | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**creationDate** | **Long** | Unix Epoch in seconds | diff --git a/clients/java/docs/GroupCreation.md b/clients/java/docs/GroupCreation.md index 99f30ee35b4..aa708281470 100644 --- a/clients/java/docs/GroupCreation.md +++ b/clients/java/docs/GroupCreation.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | diff --git a/clients/java/docs/GroupList.md b/clients/java/docs/GroupList.md index e476e24854d..ec0135a5d27 100644 --- a/clients/java/docs/GroupList.md +++ b/clients/java/docs/GroupList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<Group>**](Group.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<Group>**](Group.md) | | diff --git a/clients/java/docs/HealthCheckApi.md b/clients/java/docs/HealthCheckApi.md index b1064912da9..a2fb177f41f 100644 --- a/clients/java/docs/HealthCheckApi.md +++ b/clients/java/docs/HealthCheckApi.md @@ -1,10 +1,10 @@ # HealthCheckApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**healthCheck**](HealthCheckApi.md#healthCheck) | **GET** /healthcheck | | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**healthCheck**](HealthCheckApi.md#healthCheck) | **GET** /healthcheck | @@ -27,7 +27,7 @@ import io.lakefs.clients.api.HealthCheckApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); HealthCheckApi apiInstance = new HealthCheckApi(defaultClient); try { @@ -62,5 +62,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | NoContent | - | +**204** | NoContent | - | diff --git a/clients/java/docs/HookRun.md b/clients/java/docs/HookRun.md index eb9fa727b7d..9f046a5a807 100644 --- a/clients/java/docs/HookRun.md +++ b/clients/java/docs/HookRun.md @@ -5,23 +5,23 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hookRunId** | **String** | | | -|**action** | **String** | | | -|**hookId** | **String** | | | -|**startTime** | **OffsetDateTime** | | | -|**endTime** | **OffsetDateTime** | | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hookRunId** | **String** | | +**action** | **String** | | +**hookId** | **String** | | +**startTime** | **OffsetDateTime** | | +**endTime** | **OffsetDateTime** | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | | ## Enum: StatusEnum -| Name | Value | -|---- | -----| -| FAILED | "failed" | -| COMPLETED | "completed" | +Name | Value +---- | ----- +FAILED | "failed" +COMPLETED | "completed" diff --git a/clients/java/docs/HookRunList.md b/clients/java/docs/HookRunList.md index 26d17c92323..ee78cfec604 100644 --- a/clients/java/docs/HookRunList.md +++ b/clients/java/docs/HookRunList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<HookRun>**](HookRun.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<HookRun>**](HookRun.md) | | diff --git a/clients/java/docs/ImportApi.md b/clients/java/docs/ImportApi.md index 8cc8e6065ef..3872f20c43d 100644 --- a/clients/java/docs/ImportApi.md +++ b/clients/java/docs/ImportApi.md @@ -1,11 +1,11 @@ # ImportApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createMetaRange**](ImportApi.md#createMetaRange) | **POST** /repositories/{repository}/branches/metaranges | create a lakeFS metarange file from the given ranges | -| [**ingestRange**](ImportApi.md#ingestRange) | **POST** /repositories/{repository}/branches/ranges | create a lakeFS range file from the source uri | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createMetaRange**](ImportApi.md#createMetaRange) | **POST** /repositories/{repository}/branches/metaranges | create a lakeFS metarange file from the given ranges +[**ingestRange**](ImportApi.md#ingestRange) | **POST** /repositories/{repository}/branches/ranges | create a lakeFS range file from the source uri @@ -27,7 +27,7 @@ import io.lakefs.clients.api.ImportApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -40,6 +40,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -52,10 +56,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ImportApi apiInstance = new ImportApi(defaultClient); String repository = "repository_example"; // String | MetaRangeCreation metaRangeCreation = new MetaRangeCreation(); // MetaRangeCreation | @@ -75,10 +75,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **metaRangeCreation** | [**MetaRangeCreation**](MetaRangeCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **metaRangeCreation** | [**MetaRangeCreation**](MetaRangeCreation.md)| | ### Return type @@ -86,7 +86,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -96,12 +96,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | metarange metadata | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | metarange metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **ingestRange** @@ -122,7 +122,7 @@ import io.lakefs.clients.api.ImportApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -135,6 +135,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -147,10 +151,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ImportApi apiInstance = new ImportApi(defaultClient); String repository = "repository_example"; // String | StageRangeCreation stageRangeCreation = new StageRangeCreation(); // StageRangeCreation | @@ -170,10 +170,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **stageRangeCreation** | [**StageRangeCreation**](StageRangeCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **stageRangeCreation** | [**StageRangeCreation**](StageRangeCreation.md)| | ### Return type @@ -181,7 +181,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -191,9 +191,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | range metadata | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | range metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/ImportPagination.md b/clients/java/docs/ImportPagination.md index 23b73336449..6599dc25ad8 100644 --- a/clients/java/docs/ImportPagination.md +++ b/clients/java/docs/ImportPagination.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hasMore** | **Boolean** | More keys to be ingested. | | -|**continuationToken** | **String** | Opaque. Token used to import the next range. | [optional] | -|**lastKey** | **String** | Last object store key that was ingested. | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hasMore** | **Boolean** | More keys to be ingested. | +**continuationToken** | **String** | Opaque. Token used to import the next range. | [optional] +**lastKey** | **String** | Last object store key that was ingested. | diff --git a/clients/java/docs/IngestRangeCreationResponse.md b/clients/java/docs/IngestRangeCreationResponse.md index 883fe280be1..b55853a2f01 100644 --- a/clients/java/docs/IngestRangeCreationResponse.md +++ b/clients/java/docs/IngestRangeCreationResponse.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**range** | [**RangeMetadata**](RangeMetadata.md) | | [optional] | -|**pagination** | [**ImportPagination**](ImportPagination.md) | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**range** | [**RangeMetadata**](RangeMetadata.md) | | [optional] +**pagination** | [**ImportPagination**](ImportPagination.md) | | [optional] diff --git a/clients/java/docs/InlineObject1.md b/clients/java/docs/InlineObject1.md new file mode 100644 index 00000000000..c9050558572 --- /dev/null +++ b/clients/java/docs/InlineObject1.md @@ -0,0 +1,13 @@ + + +# InlineObject1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pattern** | **String** | | + + + diff --git a/clients/java/docs/LoginConfig.md b/clients/java/docs/LoginConfig.md index 6a9da45cdad..ee91a722819 100644 --- a/clients/java/docs/LoginConfig.md +++ b/clients/java/docs/LoginConfig.md @@ -5,24 +5,24 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**RBAC** | [**RBACEnum**](#RBACEnum) | RBAC will remain enabled on GUI if \"external\". That only works with an external auth service. | [optional] | -|**loginUrl** | **String** | primary URL to use for login. | | -|**loginFailedMessage** | **String** | message to display to users who fail to login; a full sentence that is rendered in HTML and may contain a link to a secondary login method | [optional] | -|**fallbackLoginUrl** | **String** | secondary URL to offer users to use for login. | [optional] | -|**fallbackLoginLabel** | **String** | label to place on fallback_login_url. | [optional] | -|**loginCookieNames** | **List<String>** | cookie names used to store JWT | | -|**logoutUrl** | **String** | URL to use for logging out. | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RBAC** | [**RBACEnum**](#RBACEnum) | RBAC will remain enabled on GUI if \"external\". That only works with an external auth service. | [optional] +**loginUrl** | **String** | primary URL to use for login. | +**loginFailedMessage** | **String** | message to display to users who fail to login; a full sentence that is rendered in HTML and may contain a link to a secondary login method | [optional] +**fallbackLoginUrl** | **String** | secondary URL to offer users to use for login. | [optional] +**fallbackLoginLabel** | **String** | label to place on fallback_login_url. | [optional] +**loginCookieNames** | **List<String>** | cookie names used to store JWT | +**logoutUrl** | **String** | URL to use for logging out. | ## Enum: RBACEnum -| Name | Value | -|---- | -----| -| SIMPLIFIED | "simplified" | -| EXTERNAL | "external" | +Name | Value +---- | ----- +SIMPLIFIED | "simplified" +EXTERNAL | "external" diff --git a/clients/java/docs/LoginInformation.md b/clients/java/docs/LoginInformation.md index c99261b2ec6..2e7005e504a 100644 --- a/clients/java/docs/LoginInformation.md +++ b/clients/java/docs/LoginInformation.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accessKeyId** | **String** | | | -|**secretAccessKey** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessKeyId** | **String** | | +**secretAccessKey** | **String** | | diff --git a/clients/java/docs/Merge.md b/clients/java/docs/Merge.md index e10a6da187b..7d295da0bbd 100644 --- a/clients/java/docs/Merge.md +++ b/clients/java/docs/Merge.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | | [optional] | -|**metadata** | **Map<String, String>** | | [optional] | -|**strategy** | **String** | In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **String** | | [optional] +**metadata** | **Map<String, String>** | | [optional] +**strategy** | **String** | In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict | [optional] diff --git a/clients/java/docs/MergeResult.md b/clients/java/docs/MergeResult.md index 8eb6bca7eac..fa373ad68e2 100644 --- a/clients/java/docs/MergeResult.md +++ b/clients/java/docs/MergeResult.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**summary** | [**MergeResultSummary**](MergeResultSummary.md) | | [optional] | -|**reference** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**summary** | [**MergeResultSummary**](MergeResultSummary.md) | | [optional] +**reference** | **String** | | diff --git a/clients/java/docs/MergeResultSummary.md b/clients/java/docs/MergeResultSummary.md index 78c9d6bbf15..a955430b65f 100644 --- a/clients/java/docs/MergeResultSummary.md +++ b/clients/java/docs/MergeResultSummary.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**added** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] | -|**removed** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] | -|**changed** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] | -|**conflict** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**added** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] +**removed** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] +**changed** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] +**conflict** | **Integer** | Deprecated: inaccurate and will be removed. | [optional] diff --git a/clients/java/docs/MetaRangeCreation.md b/clients/java/docs/MetaRangeCreation.md index 487594447f3..c80331077ac 100644 --- a/clients/java/docs/MetaRangeCreation.md +++ b/clients/java/docs/MetaRangeCreation.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ranges** | [**List<RangeMetadata>**](RangeMetadata.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ranges** | [**List<RangeMetadata>**](RangeMetadata.md) | | diff --git a/clients/java/docs/MetaRangeCreationResponse.md b/clients/java/docs/MetaRangeCreationResponse.md index ea264f87c47..7480032cb74 100644 --- a/clients/java/docs/MetaRangeCreationResponse.md +++ b/clients/java/docs/MetaRangeCreationResponse.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The id of the created metarange | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | The id of the created metarange | [optional] diff --git a/clients/java/docs/MetadataApi.md b/clients/java/docs/MetadataApi.md index 48686efffc6..d9f666f7c27 100644 --- a/clients/java/docs/MetadataApi.md +++ b/clients/java/docs/MetadataApi.md @@ -1,12 +1,12 @@ # MetadataApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createSymlinkFile**](MetadataApi.md#createSymlinkFile) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory | -| [**getMetaRange**](MetadataApi.md#getMetaRange) | **GET** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file | -| [**getRange**](MetadataApi.md#getRange) | **GET** /repositories/{repository}/metadata/range/{range} | return URI to a range file | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSymlinkFile**](MetadataApi.md#createSymlinkFile) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory +[**getMetaRange**](MetadataApi.md#getMetaRange) | **GET** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file +[**getRange**](MetadataApi.md#getRange) | **GET** /repositories/{repository}/metadata/range/{range} | return URI to a range file @@ -28,7 +28,7 @@ import io.lakefs.clients.api.MetadataApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -41,6 +41,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -53,10 +57,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - MetadataApi apiInstance = new MetadataApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -77,11 +77,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **location** | **String**| path to the table data | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **location** | **String**| path to the table data | [optional] ### Return type @@ -89,7 +89,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -99,10 +99,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | location created | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | location created | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getMetaRange** @@ -123,7 +123,7 @@ import io.lakefs.clients.api.MetadataApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -136,6 +136,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -148,10 +152,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - MetadataApi apiInstance = new MetadataApi(defaultClient); String repository = "repository_example"; // String | String metaRange = "metaRange_example"; // String | @@ -171,10 +171,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **metaRange** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **metaRange** | **String**| | ### Return type @@ -182,7 +182,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -192,10 +192,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | meta-range URI | * Location - redirect to S3
| -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | meta-range URI | * Location - redirect to S3
| +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getRange** @@ -216,7 +216,7 @@ import io.lakefs.clients.api.MetadataApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -229,6 +229,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -241,10 +245,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - MetadataApi apiInstance = new MetadataApi(defaultClient); String repository = "repository_example"; // String | String range = "range_example"; // String | @@ -264,10 +264,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **range** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **range** | **String**| | ### Return type @@ -275,7 +275,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -285,8 +285,8 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | range URI | * Location - redirect to S3
| -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | range URI | * Location - redirect to S3
| +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/NextStep.md b/clients/java/docs/NextStep.md index 7af7ef9343a..aa37734b267 100644 --- a/clients/java/docs/NextStep.md +++ b/clients/java/docs/NextStep.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nextStep** | **String** | the next step in the setup process | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nextStep** | **String** | the next step in the setup process | diff --git a/clients/java/docs/ObjectCopyCreation.md b/clients/java/docs/ObjectCopyCreation.md index 719665bd901..ac3b35ed570 100644 --- a/clients/java/docs/ObjectCopyCreation.md +++ b/clients/java/docs/ObjectCopyCreation.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**srcPath** | **String** | path of the copied object relative to the ref | | -|**srcRef** | **String** | a reference, if empty uses the provided branch as ref | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**srcPath** | **String** | path of the copied object relative to the ref | +**srcRef** | **String** | a reference, if empty uses the provided branch as ref | [optional] diff --git a/clients/java/docs/ObjectError.md b/clients/java/docs/ObjectError.md index e29a2ab78c8..9f31da2bc2d 100644 --- a/clients/java/docs/ObjectError.md +++ b/clients/java/docs/ObjectError.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**statusCode** | **Integer** | HTTP status code associated for operation on path | | -|**message** | **String** | short message explaining status_code | | -|**path** | **String** | affected path | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**statusCode** | **Integer** | HTTP status code associated for operation on path | +**message** | **String** | short message explaining status_code | +**path** | **String** | affected path | [optional] diff --git a/clients/java/docs/ObjectErrorList.md b/clients/java/docs/ObjectErrorList.md index d3b98778866..f94202ec3b5 100644 --- a/clients/java/docs/ObjectErrorList.md +++ b/clients/java/docs/ObjectErrorList.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**errors** | [**List<ObjectError>**](ObjectError.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**List<ObjectError>**](ObjectError.md) | | diff --git a/clients/java/docs/ObjectStageCreation.md b/clients/java/docs/ObjectStageCreation.md index b372d839452..3a0e1cfd15d 100644 --- a/clients/java/docs/ObjectStageCreation.md +++ b/clients/java/docs/ObjectStageCreation.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**physicalAddress** | **String** | | | -|**checksum** | **String** | | | -|**sizeBytes** | **Long** | | | -|**mtime** | **Long** | Unix Epoch in seconds | [optional] | -|**metadata** | **Map<String, String>** | | [optional] | -|**contentType** | **String** | Object media type | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**physicalAddress** | **String** | | +**checksum** | **String** | | +**sizeBytes** | **Long** | | +**mtime** | **Long** | Unix Epoch in seconds | [optional] +**metadata** | **Map<String, String>** | | [optional] +**contentType** | **String** | Object media type | [optional] diff --git a/clients/java/docs/ObjectStats.md b/clients/java/docs/ObjectStats.md index 8f892ea179d..5b2f31861fc 100644 --- a/clients/java/docs/ObjectStats.md +++ b/clients/java/docs/ObjectStats.md @@ -5,25 +5,25 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**path** | **String** | | | -|**pathType** | [**PathTypeEnum**](#PathTypeEnum) | | | -|**physicalAddress** | **String** | The location of the object on the underlying object store. Formatted as a native URI with the object store type as scheme (\"s3://...\", \"gs://...\", etc.) Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET | | -|**checksum** | **String** | | | -|**sizeBytes** | **Long** | | [optional] | -|**mtime** | **Long** | Unix Epoch in seconds | | -|**metadata** | **Map<String, String>** | | [optional] | -|**contentType** | **String** | Object media type | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **String** | | +**pathType** | [**PathTypeEnum**](#PathTypeEnum) | | +**physicalAddress** | **String** | The location of the object on the underlying object store. Formatted as a native URI with the object store type as scheme (\"s3://...\", \"gs://...\", etc.) Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET | +**checksum** | **String** | | +**sizeBytes** | **Long** | | [optional] +**mtime** | **Long** | Unix Epoch in seconds | +**metadata** | **Map<String, String>** | | [optional] +**contentType** | **String** | Object media type | [optional] ## Enum: PathTypeEnum -| Name | Value | -|---- | -----| -| COMMON_PREFIX | "common_prefix" | -| OBJECT | "object" | +Name | Value +---- | ----- +COMMON_PREFIX | "common_prefix" +OBJECT | "object" diff --git a/clients/java/docs/ObjectStatsList.md b/clients/java/docs/ObjectStatsList.md index f5914baf1fc..7db300499db 100644 --- a/clients/java/docs/ObjectStatsList.md +++ b/clients/java/docs/ObjectStatsList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<ObjectStats>**](ObjectStats.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<ObjectStats>**](ObjectStats.md) | | diff --git a/clients/java/docs/ObjectsApi.md b/clients/java/docs/ObjectsApi.md index 39dc619ff78..db084fea89a 100644 --- a/clients/java/docs/ObjectsApi.md +++ b/clients/java/docs/ObjectsApi.md @@ -1,19 +1,19 @@ # ObjectsApi -All URIs are relative to */api/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**copyObject**](ObjectsApi.md#copyObject) | **POST** /repositories/{repository}/branches/{branch}/objects/copy | create a copy of an object | -| [**deleteObject**](ObjectsApi.md#deleteObject) | **DELETE** /repositories/{repository}/branches/{branch}/objects | delete object. Missing objects will not return a NotFound error. | -| [**deleteObjects**](ObjectsApi.md#deleteObjects) | **POST** /repositories/{repository}/branches/{branch}/objects/delete | delete objects. Missing objects will not return a NotFound error. | -| [**getObject**](ObjectsApi.md#getObject) | **GET** /repositories/{repository}/refs/{ref}/objects | get object content | -| [**getUnderlyingProperties**](ObjectsApi.md#getUnderlyingProperties) | **GET** /repositories/{repository}/refs/{ref}/objects/underlyingProperties | get object properties on underlying storage | -| [**headObject**](ObjectsApi.md#headObject) | **HEAD** /repositories/{repository}/refs/{ref}/objects | check if object exists | -| [**listObjects**](ObjectsApi.md#listObjects) | **GET** /repositories/{repository}/refs/{ref}/objects/ls | list objects under a given prefix | -| [**stageObject**](ObjectsApi.md#stageObject) | **PUT** /repositories/{repository}/branches/{branch}/objects | stage an object's metadata for the given branch | -| [**statObject**](ObjectsApi.md#statObject) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata | -| [**uploadObject**](ObjectsApi.md#uploadObject) | **POST** /repositories/{repository}/branches/{branch}/objects | | +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**copyObject**](ObjectsApi.md#copyObject) | **POST** /repositories/{repository}/branches/{branch}/objects/copy | create a copy of an object +[**deleteObject**](ObjectsApi.md#deleteObject) | **DELETE** /repositories/{repository}/branches/{branch}/objects | delete object. Missing objects will not return a NotFound error. +[**deleteObjects**](ObjectsApi.md#deleteObjects) | **POST** /repositories/{repository}/branches/{branch}/objects/delete | delete objects. Missing objects will not return a NotFound error. +[**getObject**](ObjectsApi.md#getObject) | **GET** /repositories/{repository}/refs/{ref}/objects | get object content +[**getUnderlyingProperties**](ObjectsApi.md#getUnderlyingProperties) | **GET** /repositories/{repository}/refs/{ref}/objects/underlyingProperties | get object properties on underlying storage +[**headObject**](ObjectsApi.md#headObject) | **HEAD** /repositories/{repository}/refs/{ref}/objects | check if object exists +[**listObjects**](ObjectsApi.md#listObjects) | **GET** /repositories/{repository}/refs/{ref}/objects/ls | list objects under a given prefix +[**stageObject**](ObjectsApi.md#stageObject) | **PUT** /repositories/{repository}/branches/{branch}/objects | stage an object's metadata for the given branch +[**statObject**](ObjectsApi.md#statObject) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata +[**uploadObject**](ObjectsApi.md#uploadObject) | **POST** /repositories/{repository}/branches/{branch}/objects | @@ -35,7 +35,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -48,6 +48,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -60,10 +64,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | destination branch for the copy @@ -85,12 +85,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| destination branch for the copy | | -| **destPath** | **String**| destination path relative to the branch | | -| **objectCopyCreation** | [**ObjectCopyCreation**](ObjectCopyCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| destination branch for the copy | + **destPath** | **String**| destination path relative to the branch | + **objectCopyCreation** | [**ObjectCopyCreation**](ObjectCopyCreation.md)| | ### Return type @@ -98,7 +98,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -108,11 +108,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | Copy object response | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | Copy object response | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **deleteObject** @@ -133,7 +133,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -146,6 +146,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -158,10 +162,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -181,11 +181,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **path** | **String**| relative to the branch | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **path** | **String**| relative to the branch | ### Return type @@ -193,7 +193,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -203,11 +203,11 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | object deleted successfully | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | object deleted successfully | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **deleteObjects** @@ -228,7 +228,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -241,6 +241,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -253,10 +257,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -277,11 +277,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **pathList** | [**PathList**](PathList.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **pathList** | [**PathList**](PathList.md)| | ### Return type @@ -289,7 +289,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -299,11 +299,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Delete objects response | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | Delete objects response | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getObject** @@ -324,7 +324,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -337,6 +337,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -349,10 +353,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String ref = "ref_example"; // String | a reference (could be either a branch or a commit ID) @@ -375,13 +375,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **ref** | **String**| a reference (could be either a branch or a commit ID) | | -| **path** | **String**| relative to the ref | | -| **range** | **String**| Byte range to retrieve | [optional] | -| **presign** | **Boolean**| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **ref** | **String**| a reference (could be either a branch or a commit ID) | + **path** | **String**| relative to the ref | + **range** | **String**| Byte range to retrieve | [optional] + **presign** | **Boolean**| | [optional] ### Return type @@ -389,7 +389,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -399,14 +399,14 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | object content | * Content-Length -
* Last-Modified -
* ETag -
| -| **206** | partial object content | * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
| -| **302** | Redirect to a pre-signed URL for the object | * Location - redirect to S3
| -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **410** | object expired | - | -| **416** | Requested Range Not Satisfiable | - | -| **0** | Internal Server Error | - | +**200** | object content | * Content-Length -
* Last-Modified -
* ETag -
| +**206** | partial object content | * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
| +**302** | Redirect to a pre-signed URL for the object | * Location - redirect to S3
| +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**410** | object expired | - | +**416** | Requested Range Not Satisfiable | - | +**0** | Internal Server Error | - | # **getUnderlyingProperties** @@ -427,7 +427,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -440,6 +440,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -452,10 +456,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String ref = "ref_example"; // String | a reference (could be either a branch or a commit ID) @@ -476,11 +476,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **ref** | **String**| a reference (could be either a branch or a commit ID) | | -| **path** | **String**| relative to the branch | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **ref** | **String**| a reference (could be either a branch or a commit ID) | + **path** | **String**| relative to the branch | ### Return type @@ -488,7 +488,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -498,10 +498,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | object metadata on underlying storage | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | object metadata on underlying storage | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **headObject** @@ -522,7 +522,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -535,6 +535,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -547,10 +551,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String ref = "ref_example"; // String | a reference (could be either a branch or a commit ID) @@ -571,12 +571,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **ref** | **String**| a reference (could be either a branch or a commit ID) | | -| **path** | **String**| relative to the ref | | -| **range** | **String**| Byte range to retrieve | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **ref** | **String**| a reference (could be either a branch or a commit ID) | + **path** | **String**| relative to the ref | + **range** | **String**| Byte range to retrieve | [optional] ### Return type @@ -584,7 +584,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -594,13 +594,13 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | object exists | * Content-Length -
* Last-Modified -
* ETag -
| -| **206** | partial object content info | * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
| -| **401** | Unauthorized | - | -| **404** | object not found | - | -| **410** | object expired | - | -| **416** | Requested Range Not Satisfiable | - | -| **0** | internal server error | - | +**200** | object exists | * Content-Length -
* Last-Modified -
* ETag -
| +**206** | partial object content info | * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
| +**401** | Unauthorized | - | +**404** | object not found | - | +**410** | object expired | - | +**416** | Requested Range Not Satisfiable | - | +**0** | internal server error | - | # **listObjects** @@ -621,7 +621,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -634,6 +634,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -646,10 +650,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String ref = "ref_example"; // String | a reference (could be either a branch or a commit ID) @@ -675,16 +675,16 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **ref** | **String**| a reference (could be either a branch or a commit ID) | | -| **userMetadata** | **Boolean**| | [optional] [default to true] | -| **presign** | **Boolean**| | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | -| **delimiter** | **String**| delimiter used to group common prefixes by | [optional] | -| **prefix** | **String**| return items prefixed with this value | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **ref** | **String**| a reference (could be either a branch or a commit ID) | + **userMetadata** | **Boolean**| | [optional] [default to true] + **presign** | **Boolean**| | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] + **delimiter** | **String**| delimiter used to group common prefixes by | [optional] + **prefix** | **String**| return items prefixed with this value | [optional] ### Return type @@ -692,7 +692,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -702,10 +702,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | object listing | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | object listing | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **stageObject** @@ -726,7 +726,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -739,6 +739,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -751,10 +755,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -776,12 +776,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **path** | **String**| relative to the branch | | -| **objectStageCreation** | [**ObjectStageCreation**](ObjectStageCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **path** | **String**| relative to the branch | + **objectStageCreation** | [**ObjectStageCreation**](ObjectStageCreation.md)| | ### Return type @@ -789,7 +789,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -799,12 +799,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | object metadata | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | object metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **statObject** @@ -825,7 +825,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -838,6 +838,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -850,10 +854,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String ref = "ref_example"; // String | a reference (could be either a branch or a commit ID) @@ -876,13 +876,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **ref** | **String**| a reference (could be either a branch or a commit ID) | | -| **path** | **String**| relative to the branch | | -| **userMetadata** | **Boolean**| | [optional] [default to true] | -| **presign** | **Boolean**| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **ref** | **String**| a reference (could be either a branch or a commit ID) | + **path** | **String**| relative to the branch | + **userMetadata** | **Boolean**| | [optional] [default to true] + **presign** | **Boolean**| | [optional] ### Return type @@ -890,7 +890,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -900,11 +900,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | object metadata | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **410** | object gone (but partial metadata may be available) | - | -| **0** | Internal Server Error | - | +**200** | object metadata | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**410** | object gone (but partial metadata may be available) | - | +**0** | Internal Server Error | - | # **uploadObject** @@ -925,7 +925,7 @@ import io.lakefs.clients.api.ObjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -938,6 +938,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -950,10 +954,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - ObjectsApi apiInstance = new ObjectsApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -977,14 +977,14 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **path** | **String**| relative to the branch | | -| **storageClass** | **String**| | [optional] | -| **ifNoneMatch** | **String**| Currently supports only \"*\" to allow uploading an object only if one doesn't exist yet | [optional] | -| **content** | **File**| Only a single file per upload which must be named \\\"content\\\". | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **path** | **String**| relative to the branch | + **storageClass** | **String**| | [optional] + **ifNoneMatch** | **String**| Currently supports only \"*\" to allow uploading an object only if one doesn't exist yet | [optional] + **content** | **File**| Only a single file per upload which must be named \\\"content\\\". | [optional] ### Return type @@ -992,7 +992,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -1002,11 +1002,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | object metadata | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **412** | Precondition Failed | - | -| **0** | Internal Server Error | - | +**201** | object metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/OtfDiffApi.md b/clients/java/docs/OtfDiffApi.md index 4c5cce95c48..74d0f0be9af 100644 --- a/clients/java/docs/OtfDiffApi.md +++ b/clients/java/docs/OtfDiffApi.md @@ -1,10 +1,10 @@ # OtfDiffApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**otfDiff**](OtfDiffApi.md#otfDiff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**otfDiff**](OtfDiffApi.md#otfDiff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff @@ -26,7 +26,7 @@ import io.lakefs.clients.api.OtfDiffApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -39,6 +39,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -51,10 +55,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - OtfDiffApi apiInstance = new OtfDiffApi(defaultClient); String repository = "repository_example"; // String | String leftRef = "leftRef_example"; // String | @@ -77,13 +77,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **leftRef** | **String**| | | -| **rightRef** | **String**| | | -| **tablePath** | **String**| a path to the table location under the specified ref. | | -| **type** | **String**| the type of otf | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **leftRef** | **String**| | + **rightRef** | **String**| | + **tablePath** | **String**| a path to the table location under the specified ref. | + **type** | **String**| the type of otf | ### Return type @@ -91,7 +91,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -101,9 +101,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | diff list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **412** | Precondition Failed | - | -| **0** | Internal Server Error | - | +**200** | diff list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/OtfDiffEntry.md b/clients/java/docs/OtfDiffEntry.md index 14d707f939e..9972a585ef3 100644 --- a/clients/java/docs/OtfDiffEntry.md +++ b/clients/java/docs/OtfDiffEntry.md @@ -5,23 +5,23 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**timestamp** | **Integer** | | | -|**operation** | **String** | | | -|**operationContent** | **Object** | free form content describing the returned operation diff | | -|**operationType** | [**OperationTypeEnum**](#OperationTypeEnum) | the operation category (CUD) | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**timestamp** | **Integer** | | +**operation** | **String** | | +**operationContent** | **Object** | free form content describing the returned operation diff | +**operationType** | [**OperationTypeEnum**](#OperationTypeEnum) | the operation category (CUD) | ## Enum: OperationTypeEnum -| Name | Value | -|---- | -----| -| CREATE | "create" | -| UPDATE | "update" | -| DELETE | "delete" | +Name | Value +---- | ----- +CREATE | "create" +UPDATE | "update" +DELETE | "delete" diff --git a/clients/java/docs/OtfDiffList.md b/clients/java/docs/OtfDiffList.md index 16111e773db..56883308a52 100644 --- a/clients/java/docs/OtfDiffList.md +++ b/clients/java/docs/OtfDiffList.md @@ -5,20 +5,20 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**diffType** | [**DiffTypeEnum**](#DiffTypeEnum) | | [optional] | -|**results** | [**List<OtfDiffEntry>**](OtfDiffEntry.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**diffType** | [**DiffTypeEnum**](#DiffTypeEnum) | | [optional] +**results** | [**List<OtfDiffEntry>**](OtfDiffEntry.md) | | ## Enum: DiffTypeEnum -| Name | Value | -|---- | -----| -| CREATED | "created" | -| DROPPED | "dropped" | -| CHANGED | "changed" | +Name | Value +---- | ----- +CREATED | "created" +DROPPED | "dropped" +CHANGED | "changed" diff --git a/clients/java/docs/Pagination.md b/clients/java/docs/Pagination.md index b6f782306f8..f4ca9a3a972 100644 --- a/clients/java/docs/Pagination.md +++ b/clients/java/docs/Pagination.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hasMore** | **Boolean** | Next page is available | | -|**nextOffset** | **String** | Token used to retrieve the next page | | -|**results** | **Integer** | Number of values found in the results | | -|**maxPerPage** | **Integer** | Maximal number of entries per page | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hasMore** | **Boolean** | Next page is available | +**nextOffset** | **String** | Token used to retrieve the next page | +**results** | **Integer** | Number of values found in the results | +**maxPerPage** | **Integer** | Maximal number of entries per page | diff --git a/clients/java/docs/PathList.md b/clients/java/docs/PathList.md index 27e14d980c9..d4e84921d2a 100644 --- a/clients/java/docs/PathList.md +++ b/clients/java/docs/PathList.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**paths** | **List<String>** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**paths** | **List<String>** | | diff --git a/clients/java/docs/Policy.md b/clients/java/docs/Policy.md index 62b58a72f0d..4f83f134c98 100644 --- a/clients/java/docs/Policy.md +++ b/clients/java/docs/Policy.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**creationDate** | **Long** | Unix Epoch in seconds | [optional] | -|**statement** | [**List<Statement>**](Statement.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**creationDate** | **Long** | Unix Epoch in seconds | [optional] +**statement** | [**List<Statement>**](Statement.md) | | diff --git a/clients/java/docs/PolicyList.md b/clients/java/docs/PolicyList.md index 244cda00d04..4ca1e729ed5 100644 --- a/clients/java/docs/PolicyList.md +++ b/clients/java/docs/PolicyList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<Policy>**](Policy.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<Policy>**](Policy.md) | | diff --git a/clients/java/docs/PrepareGCUncommittedRequest.md b/clients/java/docs/PrepareGCUncommittedRequest.md index ec0364d440d..a117f5cda1b 100644 --- a/clients/java/docs/PrepareGCUncommittedRequest.md +++ b/clients/java/docs/PrepareGCUncommittedRequest.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**continuationToken** | **String** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**continuationToken** | **String** | | [optional] diff --git a/clients/java/docs/PrepareGCUncommittedResponse.md b/clients/java/docs/PrepareGCUncommittedResponse.md index 1da59209364..372f18f64f4 100644 --- a/clients/java/docs/PrepareGCUncommittedResponse.md +++ b/clients/java/docs/PrepareGCUncommittedResponse.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**runId** | **String** | | | -|**gcUncommittedLocation** | **String** | location of uncommitted information data | | -|**continuationToken** | **String** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**runId** | **String** | | +**gcUncommittedLocation** | **String** | location of uncommitted information data | +**continuationToken** | **String** | | [optional] diff --git a/clients/java/docs/RangeMetadata.md b/clients/java/docs/RangeMetadata.md index 2b782da2cc7..e1cab3c8a52 100644 --- a/clients/java/docs/RangeMetadata.md +++ b/clients/java/docs/RangeMetadata.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | ID of the range. | | -|**minKey** | **String** | First key in the range. | | -|**maxKey** | **String** | Last key in the range. | | -|**count** | **Integer** | Number of records in the range. | | -|**estimatedSize** | **Integer** | Estimated size of the range in bytes | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | ID of the range. | +**minKey** | **String** | First key in the range. | +**maxKey** | **String** | Last key in the range. | +**count** | **Integer** | Number of records in the range. | +**estimatedSize** | **Integer** | Estimated size of the range in bytes | diff --git a/clients/java/docs/Ref.md b/clients/java/docs/Ref.md index d064e590cdc..181ed2cbc4a 100644 --- a/clients/java/docs/Ref.md +++ b/clients/java/docs/Ref.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**commitId** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**commitId** | **String** | | diff --git a/clients/java/docs/RefList.md b/clients/java/docs/RefList.md index e8e9a379956..3acde5d5362 100644 --- a/clients/java/docs/RefList.md +++ b/clients/java/docs/RefList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<Ref>**](Ref.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<Ref>**](Ref.md) | | diff --git a/clients/java/docs/RefsApi.md b/clients/java/docs/RefsApi.md index 3962f7723cb..d2fc7467ee2 100644 --- a/clients/java/docs/RefsApi.md +++ b/clients/java/docs/RefsApi.md @@ -1,15 +1,15 @@ # RefsApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**diffRefs**](RefsApi.md#diffRefs) | **GET** /repositories/{repository}/refs/{leftRef}/diff/{rightRef} | diff references | -| [**dumpRefs**](RefsApi.md#dumpRefs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store | -| [**findMergeBase**](RefsApi.md#findMergeBase) | **GET** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | find the merge base for 2 references | -| [**logCommits**](RefsApi.md#logCommits) | **GET** /repositories/{repository}/refs/{ref}/commits | get commit log from ref. If both objects and prefixes are empty, return all commits. | -| [**mergeIntoBranch**](RefsApi.md#mergeIntoBranch) | **POST** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | merge references | -| [**restoreRefs**](RefsApi.md#restoreRefs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**diffRefs**](RefsApi.md#diffRefs) | **GET** /repositories/{repository}/refs/{leftRef}/diff/{rightRef} | diff references +[**dumpRefs**](RefsApi.md#dumpRefs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store +[**findMergeBase**](RefsApi.md#findMergeBase) | **GET** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | find the merge base for 2 references +[**logCommits**](RefsApi.md#logCommits) | **GET** /repositories/{repository}/refs/{ref}/commits | get commit log from ref. If both objects and prefixes are empty, return all commits. +[**mergeIntoBranch**](RefsApi.md#mergeIntoBranch) | **POST** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | merge references +[**restoreRefs**](RefsApi.md#restoreRefs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store @@ -31,7 +31,7 @@ import io.lakefs.clients.api.RefsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -44,6 +44,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -56,10 +60,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RefsApi apiInstance = new RefsApi(defaultClient); String repository = "repository_example"; // String | String leftRef = "leftRef_example"; // String | a reference (could be either a branch or a commit ID) @@ -85,16 +85,16 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **leftRef** | **String**| a reference (could be either a branch or a commit ID) | | -| **rightRef** | **String**| a reference (could be either a branch or a commit ID) to compare against | | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **delimiter** | **String**| delimiter used to group common prefixes by | [optional] | -| **type** | **String**| | [optional] [default to three_dot] [enum: two_dot, three_dot] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **leftRef** | **String**| a reference (could be either a branch or a commit ID) | + **rightRef** | **String**| a reference (could be either a branch or a commit ID) to compare against | + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] + **prefix** | **String**| return items prefixed with this value | [optional] + **delimiter** | **String**| delimiter used to group common prefixes by | [optional] + **type** | **String**| | [optional] [default to three_dot] [enum: two_dot, three_dot] ### Return type @@ -102,7 +102,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -112,10 +112,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | diff between refs | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | diff between refs | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **dumpRefs** @@ -136,7 +136,7 @@ import io.lakefs.clients.api.RefsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -149,6 +149,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -161,10 +165,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RefsApi apiInstance = new RefsApi(defaultClient); String repository = "repository_example"; // String | try { @@ -183,9 +183,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | ### Return type @@ -193,7 +193,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -203,11 +203,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | refs dump | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | refs dump | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **findMergeBase** @@ -228,7 +228,7 @@ import io.lakefs.clients.api.RefsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -241,6 +241,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -253,10 +257,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RefsApi apiInstance = new RefsApi(defaultClient); String repository = "repository_example"; // String | String sourceRef = "sourceRef_example"; // String | source ref @@ -277,11 +277,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **sourceRef** | **String**| source ref | | -| **destinationBranch** | **String**| destination branch name | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **sourceRef** | **String**| source ref | + **destinationBranch** | **String**| destination branch name | ### Return type @@ -289,7 +289,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -299,11 +299,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Found the merge base | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | Found the merge base | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **logCommits** @@ -324,7 +324,7 @@ import io.lakefs.clients.api.RefsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -337,6 +337,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -349,10 +353,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RefsApi apiInstance = new RefsApi(defaultClient); String repository = "repository_example"; // String | String ref = "ref_example"; // String | @@ -377,15 +377,15 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **ref** | **String**| | | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | -| **objects** | [**List<String>**](String.md)| list of paths, each element is a path of a specific object | [optional] | -| **prefixes** | [**List<String>**](String.md)| list of paths, each element is a path of a prefix | [optional] | -| **limit** | **Boolean**| limit the number of items in return to 'amount'. Without further indication on actual number of items. | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **ref** | **String**| | + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] + **objects** | [**List<String>**](String.md)| list of paths, each element is a path of a specific object | [optional] + **prefixes** | [**List<String>**](String.md)| list of paths, each element is a path of a prefix | [optional] + **limit** | **Boolean**| limit the number of items in return to 'amount'. Without further indication on actual number of items. | [optional] ### Return type @@ -393,7 +393,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -403,10 +403,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | commit log | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | commit log | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **mergeIntoBranch** @@ -427,7 +427,7 @@ import io.lakefs.clients.api.RefsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -440,6 +440,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -452,10 +456,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RefsApi apiInstance = new RefsApi(defaultClient); String repository = "repository_example"; // String | String sourceRef = "sourceRef_example"; // String | source ref @@ -477,12 +477,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **sourceRef** | **String**| source ref | | -| **destinationBranch** | **String**| destination branch name | | -| **merge** | [**Merge**](Merge.md)| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **sourceRef** | **String**| source ref | + **destinationBranch** | **String**| destination branch name | + **merge** | [**Merge**](Merge.md)| | [optional] ### Return type @@ -490,7 +490,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -500,14 +500,14 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | merge completed | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Resource Not Found | - | -| **409** | Conflict Deprecated: content schema will return Error format and not an empty MergeResult | - | -| **412** | precondition failed (e.g. a pre-merge hook returned a failure) | - | -| **0** | Internal Server Error | - | +**200** | merge completed | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**409** | Conflict Deprecated: content schema will return Error format and not an empty MergeResult | - | +**412** | precondition failed (e.g. a pre-merge hook returned a failure) | - | +**0** | Internal Server Error | - | # **restoreRefs** @@ -528,7 +528,7 @@ import io.lakefs.clients.api.RefsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -541,6 +541,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -553,10 +557,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RefsApi apiInstance = new RefsApi(defaultClient); String repository = "repository_example"; // String | RefsDump refsDump = new RefsDump(); // RefsDump | @@ -575,10 +575,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **refsDump** | [**RefsDump**](RefsDump.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **refsDump** | [**RefsDump**](RefsDump.md)| | ### Return type @@ -586,7 +586,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -596,9 +596,9 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | refs successfully loaded | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | refs successfully loaded | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/RefsDump.md b/clients/java/docs/RefsDump.md index b2d4805ae01..832abf289e1 100644 --- a/clients/java/docs/RefsDump.md +++ b/clients/java/docs/RefsDump.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**commitsMetaRangeId** | **String** | | | -|**tagsMetaRangeId** | **String** | | | -|**branchesMetaRangeId** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commitsMetaRangeId** | **String** | | +**tagsMetaRangeId** | **String** | | +**branchesMetaRangeId** | **String** | | diff --git a/clients/java/docs/RepositoriesApi.md b/clients/java/docs/RepositoriesApi.md index 78a11bad67f..5d68c02063d 100644 --- a/clients/java/docs/RepositoriesApi.md +++ b/clients/java/docs/RepositoriesApi.md @@ -1,16 +1,16 @@ # RepositoriesApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createBranchProtectionRule**](RepositoriesApi.md#createBranchProtectionRule) | **POST** /repositories/{repository}/branch_protection | | -| [**createRepository**](RepositoriesApi.md#createRepository) | **POST** /repositories | create repository | -| [**deleteBranchProtectionRule**](RepositoriesApi.md#deleteBranchProtectionRule) | **DELETE** /repositories/{repository}/branch_protection | | -| [**deleteRepository**](RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository | -| [**getBranchProtectionRules**](RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules | -| [**getRepository**](RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository | -| [**listRepositories**](RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createBranchProtectionRule**](RepositoriesApi.md#createBranchProtectionRule) | **POST** /repositories/{repository}/branch_protection | +[**createRepository**](RepositoriesApi.md#createRepository) | **POST** /repositories | create repository +[**deleteBranchProtectionRule**](RepositoriesApi.md#deleteBranchProtectionRule) | **DELETE** /repositories/{repository}/branch_protection | +[**deleteRepository**](RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository +[**getBranchProtectionRules**](RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +[**getRepository**](RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository +[**listRepositories**](RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories @@ -32,7 +32,7 @@ import io.lakefs.clients.api.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -45,6 +45,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -57,10 +61,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); String repository = "repository_example"; // String | BranchProtectionRule branchProtectionRule = new BranchProtectionRule(); // BranchProtectionRule | @@ -79,10 +79,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branchProtectionRule** | [**BranchProtectionRule**](BranchProtectionRule.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branchProtectionRule** | [**BranchProtectionRule**](BranchProtectionRule.md)| | ### Return type @@ -90,7 +90,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -100,10 +100,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | branch protection rule created successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | branch protection rule created successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **createRepository** @@ -124,7 +124,7 @@ import io.lakefs.clients.api.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -137,6 +137,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -149,10 +153,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); RepositoryCreation repositoryCreation = new RepositoryCreation(); // RepositoryCreation | Boolean bare = false; // Boolean | If true, create a bare repository with no initial commit and branch @@ -172,10 +172,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repositoryCreation** | [**RepositoryCreation**](RepositoryCreation.md)| | | -| **bare** | **Boolean**| If true, create a bare repository with no initial commit and branch | [optional] [default to false] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repositoryCreation** | [**RepositoryCreation**](RepositoryCreation.md)| | + **bare** | **Boolean**| If true, create a bare repository with no initial commit and branch | [optional] [default to false] ### Return type @@ -183,7 +183,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -193,15 +193,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | repository | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **409** | Resource Conflicts With Target | - | -| **0** | Internal Server Error | - | +**201** | repository | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | # **deleteBranchProtectionRule** -> deleteBranchProtectionRule(repository, deleteBranchProtectionRuleRequest) +> deleteBranchProtectionRule(repository, inlineObject1) @@ -218,7 +218,7 @@ import io.lakefs.clients.api.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -231,6 +231,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -243,15 +247,11 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); String repository = "repository_example"; // String | - DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest = new DeleteBranchProtectionRuleRequest(); // DeleteBranchProtectionRuleRequest | + InlineObject1 inlineObject1 = new InlineObject1(); // InlineObject1 | try { - apiInstance.deleteBranchProtectionRule(repository, deleteBranchProtectionRuleRequest); + apiInstance.deleteBranchProtectionRule(repository, inlineObject1); } catch (ApiException e) { System.err.println("Exception when calling RepositoriesApi#deleteBranchProtectionRule"); System.err.println("Status code: " + e.getCode()); @@ -265,10 +265,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **deleteBranchProtectionRuleRequest** | [**DeleteBranchProtectionRuleRequest**](DeleteBranchProtectionRuleRequest.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **inlineObject1** | [**InlineObject1**](InlineObject1.md)| | ### Return type @@ -276,7 +276,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -286,10 +286,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | branch protection rule deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | branch protection rule deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **deleteRepository** @@ -310,7 +310,7 @@ import io.lakefs.clients.api.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -323,6 +323,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -335,10 +339,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); String repository = "repository_example"; // String | try { @@ -356,9 +356,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | ### Return type @@ -366,7 +366,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -376,10 +376,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | repository deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | repository deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getBranchProtectionRules** @@ -400,7 +400,7 @@ import io.lakefs.clients.api.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -413,6 +413,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -425,10 +429,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); String repository = "repository_example"; // String | try { @@ -447,9 +447,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | ### Return type @@ -457,7 +457,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -467,10 +467,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | branch protection rules | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | branch protection rules | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getRepository** @@ -491,7 +491,7 @@ import io.lakefs.clients.api.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -504,6 +504,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -516,10 +520,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); String repository = "repository_example"; // String | try { @@ -538,9 +538,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | ### Return type @@ -548,7 +548,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -558,10 +558,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | repository | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | repository | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listRepositories** @@ -582,7 +582,7 @@ import io.lakefs.clients.api.RepositoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -595,6 +595,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -607,10 +611,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RepositoriesApi apiInstance = new RepositoriesApi(defaultClient); String prefix = "prefix_example"; // String | return items prefixed with this value String after = "after_example"; // String | return items after this value @@ -631,11 +631,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -643,7 +643,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -653,7 +653,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | repository list | - | -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**200** | repository list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/Repository.md b/clients/java/docs/Repository.md index 8fd57838532..a394d75cdc0 100644 --- a/clients/java/docs/Repository.md +++ b/clients/java/docs/Repository.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**creationDate** | **Long** | Unix Epoch in seconds | | -|**defaultBranch** | **String** | | | -|**storageNamespace** | **String** | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**creationDate** | **Long** | Unix Epoch in seconds | +**defaultBranch** | **String** | | +**storageNamespace** | **String** | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | diff --git a/clients/java/docs/RepositoryCreation.md b/clients/java/docs/RepositoryCreation.md index f9df6e14d07..00777579fe0 100644 --- a/clients/java/docs/RepositoryCreation.md +++ b/clients/java/docs/RepositoryCreation.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | | -|**storageNamespace** | **String** | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | | -|**defaultBranch** | **String** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**storageNamespace** | **String** | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | +**defaultBranch** | **String** | | [optional] diff --git a/clients/java/docs/RepositoryList.md b/clients/java/docs/RepositoryList.md index f3a043666b6..84971056d79 100644 --- a/clients/java/docs/RepositoryList.md +++ b/clients/java/docs/RepositoryList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<Repository>**](Repository.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<Repository>**](Repository.md) | | diff --git a/clients/java/docs/ResetCreation.md b/clients/java/docs/ResetCreation.md index 2df7c893a92..b8f4d1c39c4 100644 --- a/clients/java/docs/ResetCreation.md +++ b/clients/java/docs/ResetCreation.md @@ -5,20 +5,20 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**path** | **String** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**TypeEnum**](#TypeEnum) | | +**path** | **String** | | [optional] ## Enum: TypeEnum -| Name | Value | -|---- | -----| -| OBJECT | "object" | -| COMMON_PREFIX | "common_prefix" | -| RESET | "reset" | +Name | Value +---- | ----- +OBJECT | "object" +COMMON_PREFIX | "common_prefix" +RESET | "reset" diff --git a/clients/java/docs/RetentionApi.md b/clients/java/docs/RetentionApi.md index ef76f195cd5..8dcd92eaaf0 100644 --- a/clients/java/docs/RetentionApi.md +++ b/clients/java/docs/RetentionApi.md @@ -1,14 +1,14 @@ # RetentionApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deleteGarbageCollectionRules**](RetentionApi.md#deleteGarbageCollectionRules) | **DELETE** /repositories/{repository}/gc/rules | | -| [**getGarbageCollectionRules**](RetentionApi.md#getGarbageCollectionRules) | **GET** /repositories/{repository}/gc/rules | | -| [**prepareGarbageCollectionCommits**](RetentionApi.md#prepareGarbageCollectionCommits) | **POST** /repositories/{repository}/gc/prepare_commits | save lists of active and expired commits for garbage collection | -| [**prepareGarbageCollectionUncommitted**](RetentionApi.md#prepareGarbageCollectionUncommitted) | **POST** /repositories/{repository}/gc/prepare_uncommited | save repository uncommitted metadata for garbage collection | -| [**setGarbageCollectionRules**](RetentionApi.md#setGarbageCollectionRules) | **POST** /repositories/{repository}/gc/rules | | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteGarbageCollectionRules**](RetentionApi.md#deleteGarbageCollectionRules) | **DELETE** /repositories/{repository}/gc/rules | +[**getGarbageCollectionRules**](RetentionApi.md#getGarbageCollectionRules) | **GET** /repositories/{repository}/gc/rules | +[**prepareGarbageCollectionCommits**](RetentionApi.md#prepareGarbageCollectionCommits) | **POST** /repositories/{repository}/gc/prepare_commits | save lists of active and expired commits for garbage collection +[**prepareGarbageCollectionUncommitted**](RetentionApi.md#prepareGarbageCollectionUncommitted) | **POST** /repositories/{repository}/gc/prepare_uncommited | save repository uncommitted metadata for garbage collection +[**setGarbageCollectionRules**](RetentionApi.md#setGarbageCollectionRules) | **POST** /repositories/{repository}/gc/rules | @@ -30,7 +30,7 @@ import io.lakefs.clients.api.RetentionApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -43,6 +43,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -55,10 +59,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RetentionApi apiInstance = new RetentionApi(defaultClient); String repository = "repository_example"; // String | try { @@ -76,9 +76,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | ### Return type @@ -86,7 +86,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -96,10 +96,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | deleted garbage collection rules successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | deleted garbage collection rules successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getGarbageCollectionRules** @@ -120,7 +120,7 @@ import io.lakefs.clients.api.RetentionApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -133,6 +133,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -145,10 +149,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RetentionApi apiInstance = new RetentionApi(defaultClient); String repository = "repository_example"; // String | try { @@ -167,9 +167,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | ### Return type @@ -177,7 +177,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -187,10 +187,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | gc rule list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | gc rule list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **prepareGarbageCollectionCommits** @@ -211,7 +211,7 @@ import io.lakefs.clients.api.RetentionApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -224,6 +224,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -236,10 +240,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RetentionApi apiInstance = new RetentionApi(defaultClient); String repository = "repository_example"; // String | GarbageCollectionPrepareRequest garbageCollectionPrepareRequest = new GarbageCollectionPrepareRequest(); // GarbageCollectionPrepareRequest | @@ -259,10 +259,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **garbageCollectionPrepareRequest** | [**GarbageCollectionPrepareRequest**](GarbageCollectionPrepareRequest.md)| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **garbageCollectionPrepareRequest** | [**GarbageCollectionPrepareRequest**](GarbageCollectionPrepareRequest.md)| | [optional] ### Return type @@ -270,7 +270,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -280,10 +280,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | paths to commit dataset | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | paths to commit dataset | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **prepareGarbageCollectionUncommitted** @@ -304,7 +304,7 @@ import io.lakefs.clients.api.RetentionApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -317,6 +317,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -329,10 +333,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RetentionApi apiInstance = new RetentionApi(defaultClient); String repository = "repository_example"; // String | PrepareGCUncommittedRequest prepareGCUncommittedRequest = new PrepareGCUncommittedRequest(); // PrepareGCUncommittedRequest | @@ -352,10 +352,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **prepareGCUncommittedRequest** | [**PrepareGCUncommittedRequest**](PrepareGCUncommittedRequest.md)| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **prepareGCUncommittedRequest** | [**PrepareGCUncommittedRequest**](PrepareGCUncommittedRequest.md)| | [optional] ### Return type @@ -363,7 +363,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -373,11 +373,11 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | paths to commit dataset | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**201** | paths to commit dataset | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **setGarbageCollectionRules** @@ -398,7 +398,7 @@ import io.lakefs.clients.api.RetentionApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -411,6 +411,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -423,10 +427,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - RetentionApi apiInstance = new RetentionApi(defaultClient); String repository = "repository_example"; // String | GarbageCollectionRules garbageCollectionRules = new GarbageCollectionRules(); // GarbageCollectionRules | @@ -445,10 +445,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **garbageCollectionRules** | [**GarbageCollectionRules**](GarbageCollectionRules.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **garbageCollectionRules** | [**GarbageCollectionRules**](GarbageCollectionRules.md)| | ### Return type @@ -456,7 +456,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -466,8 +466,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | set garbage collection rules successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | set garbage collection rules successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/RevertCreation.md b/clients/java/docs/RevertCreation.md index 5b87d4ff7ce..6b61850abbb 100644 --- a/clients/java/docs/RevertCreation.md +++ b/clients/java/docs/RevertCreation.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ref** | **String** | the commit to revert, given by a ref | | -|**parentNumber** | **Integer** | when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert. | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ref** | **String** | the commit to revert, given by a ref | +**parentNumber** | **Integer** | when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert. | diff --git a/clients/java/docs/Setup.md b/clients/java/docs/Setup.md index abeab60309b..a8940098dcc 100644 --- a/clients/java/docs/Setup.md +++ b/clients/java/docs/Setup.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**username** | **String** | an identifier for the user (e.g. jane.doe) | | -|**key** | [**AccessKeyCredentials**](AccessKeyCredentials.md) | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | an identifier for the user (e.g. jane.doe) | +**key** | [**AccessKeyCredentials**](AccessKeyCredentials.md) | | [optional] diff --git a/clients/java/docs/SetupState.md b/clients/java/docs/SetupState.md index 3d560400073..979afded43c 100644 --- a/clients/java/docs/SetupState.md +++ b/clients/java/docs/SetupState.md @@ -5,20 +5,20 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**state** | [**StateEnum**](#StateEnum) | | [optional] | -|**loginConfig** | [**LoginConfig**](LoginConfig.md) | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | [**StateEnum**](#StateEnum) | | [optional] +**loginConfig** | [**LoginConfig**](LoginConfig.md) | | [optional] ## Enum: StateEnum -| Name | Value | -|---- | -----| -| INITIALIZED | "initialized" | -| NOT_INITIALIZED | "not_initialized" | -| COMM_PREFS_DONE | "comm_prefs_done" | +Name | Value +---- | ----- +INITIALIZED | "initialized" +NOT_INITIALIZED | "not_initialized" +COMM_PREFS_DONE | "comm_prefs_done" diff --git a/clients/java/docs/StageRangeCreation.md b/clients/java/docs/StageRangeCreation.md index bfea2da1ba4..b71096dea5d 100644 --- a/clients/java/docs/StageRangeCreation.md +++ b/clients/java/docs/StageRangeCreation.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**fromSourceURI** | **String** | The source location of the ingested files. Must match the lakeFS installation blockstore type. | | -|**after** | **String** | Only objects after this key would be ingested. | | -|**prepend** | **String** | A prefix to prepend to ingested objects. | | -|**continuationToken** | **String** | Opaque. Client should pass the continuation_token received from server to continue creation ranges from the same key. | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fromSourceURI** | **String** | The source location of the ingested files. Must match the lakeFS installation blockstore type. | +**after** | **String** | Only objects after this key would be ingested. | +**prepend** | **String** | A prefix to prepend to ingested objects. | +**continuationToken** | **String** | Opaque. Client should pass the continuation_token received from server to continue creation ranges from the same key. | [optional] diff --git a/clients/java/docs/StagingApi.md b/clients/java/docs/StagingApi.md index ee5078a4928..7ffb19e38b8 100644 --- a/clients/java/docs/StagingApi.md +++ b/clients/java/docs/StagingApi.md @@ -1,11 +1,11 @@ # StagingApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getPhysicalAddress**](StagingApi.md#getPhysicalAddress) | **GET** /repositories/{repository}/branches/{branch}/staging/backing | get a physical address and a return token to write object to underlying storage | -| [**linkPhysicalAddress**](StagingApi.md#linkPhysicalAddress) | **PUT** /repositories/{repository}/branches/{branch}/staging/backing | associate staging on this physical address with a path | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getPhysicalAddress**](StagingApi.md#getPhysicalAddress) | **GET** /repositories/{repository}/branches/{branch}/staging/backing | get a physical address and a return token to write object to underlying storage +[**linkPhysicalAddress**](StagingApi.md#linkPhysicalAddress) | **PUT** /repositories/{repository}/branches/{branch}/staging/backing | associate staging on this physical address with a path @@ -27,7 +27,7 @@ import io.lakefs.clients.api.StagingApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -40,6 +40,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -52,10 +56,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - StagingApi apiInstance = new StagingApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -77,12 +77,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **path** | **String**| relative to the branch | | -| **presign** | **Boolean**| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **path** | **String**| relative to the branch | + **presign** | **Boolean**| | [optional] ### Return type @@ -90,7 +90,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -100,10 +100,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | physical address for staging area | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | physical address for staging area | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **linkPhysicalAddress** @@ -126,7 +126,7 @@ import io.lakefs.clients.api.StagingApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -139,6 +139,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -151,10 +155,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - StagingApi apiInstance = new StagingApi(defaultClient); String repository = "repository_example"; // String | String branch = "branch_example"; // String | @@ -176,12 +176,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **branch** | **String**| | | -| **path** | **String**| relative to the branch | | -| **stagingMetadata** | [**StagingMetadata**](StagingMetadata.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branch** | **String**| | + **path** | **String**| relative to the branch | + **stagingMetadata** | [**StagingMetadata**](StagingMetadata.md)| | ### Return type @@ -189,7 +189,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -199,10 +199,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | object metadata | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Internal Server Error | - | -| **409** | conflict with a commit, try here | - | -| **0** | Internal Server Error | - | +**200** | object metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Internal Server Error | - | +**409** | conflict with a commit, try here | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/StagingLocation.md b/clients/java/docs/StagingLocation.md index 307ba55fd49..ffa05edc2bb 100644 --- a/clients/java/docs/StagingLocation.md +++ b/clients/java/docs/StagingLocation.md @@ -6,11 +6,11 @@ location for placing an object when staging it ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**physicalAddress** | **String** | | [optional] | -|**token** | **String** | opaque staging token to use to link uploaded object | | -|**presignedUrl** | **String** | if presign=true is passed in the request, this field will contain a presigned URL to use when uploading | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**physicalAddress** | **String** | | [optional] +**token** | **String** | opaque staging token to use to link uploaded object | +**presignedUrl** | **String** | if presign=true is passed in the request, this field will contain a presigned URL to use when uploading | [optional] diff --git a/clients/java/docs/StagingMetadata.md b/clients/java/docs/StagingMetadata.md index f8ef784d31c..569e5edbeca 100644 --- a/clients/java/docs/StagingMetadata.md +++ b/clients/java/docs/StagingMetadata.md @@ -6,13 +6,13 @@ information about uploaded object ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**staging** | [**StagingLocation**](StagingLocation.md) | | | -|**checksum** | **String** | unique identifier of object content on backing store (typically ETag) | | -|**sizeBytes** | **Long** | | | -|**userMetadata** | **Map<String, String>** | | [optional] | -|**contentType** | **String** | Object media type | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**staging** | [**StagingLocation**](StagingLocation.md) | | +**checksum** | **String** | unique identifier of object content on backing store (typically ETag) | +**sizeBytes** | **Long** | | +**userMetadata** | **Map<String, String>** | | [optional] +**contentType** | **String** | Object media type | [optional] diff --git a/clients/java/docs/Statement.md b/clients/java/docs/Statement.md index ccef2c1a7f2..c95e6d3770c 100644 --- a/clients/java/docs/Statement.md +++ b/clients/java/docs/Statement.md @@ -5,20 +5,20 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**effect** | [**EffectEnum**](#EffectEnum) | | | -|**resource** | **String** | | | -|**action** | **List<String>** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effect** | [**EffectEnum**](#EffectEnum) | | +**resource** | **String** | | +**action** | **List<String>** | | ## Enum: EffectEnum -| Name | Value | -|---- | -----| -| ALLOW | "allow" | -| DENY | "deny" | +Name | Value +---- | ----- +ALLOW | "allow" +DENY | "deny" diff --git a/clients/java/docs/StatisticsApi.md b/clients/java/docs/StatisticsApi.md index 2e040992e7b..28c74547bb0 100644 --- a/clients/java/docs/StatisticsApi.md +++ b/clients/java/docs/StatisticsApi.md @@ -1,10 +1,10 @@ # StatisticsApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**postStatsEvents**](StatisticsApi.md#postStatsEvents) | **POST** /statistics | post stats events, this endpoint is meant for internal use only | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**postStatsEvents**](StatisticsApi.md#postStatsEvents) | **POST** /statistics | post stats events, this endpoint is meant for internal use only @@ -26,7 +26,7 @@ import io.lakefs.clients.api.StatisticsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -39,6 +39,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -51,10 +55,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - StatisticsApi apiInstance = new StatisticsApi(defaultClient); StatsEventsList statsEventsList = new StatsEventsList(); // StatsEventsList | try { @@ -72,9 +72,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **statsEventsList** | [**StatsEventsList**](StatsEventsList.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **statsEventsList** | [**StatsEventsList**](StatsEventsList.md)| | ### Return type @@ -82,7 +82,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -92,8 +92,8 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | reported successfully | - | -| **400** | bad request | - | -| **401** | Unauthorized | - | -| **0** | Internal Server Error | - | +**204** | reported successfully | - | +**400** | bad request | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/StatsEvent.md b/clients/java/docs/StatsEvent.md index becac2ed33b..c1de16909c5 100644 --- a/clients/java/docs/StatsEvent.md +++ b/clients/java/docs/StatsEvent.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**propertyClass** | **String** | stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\") | | -|**name** | **String** | stats event name (e.g. \"put_object\", \"create_repository\", \"<experimental-feature-name>\") | | -|**count** | **Integer** | number of events of the class and name | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**propertyClass** | **String** | stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\") | +**name** | **String** | stats event name (e.g. \"put_object\", \"create_repository\", \"<experimental-feature-name>\") | +**count** | **Integer** | number of events of the class and name | diff --git a/clients/java/docs/StatsEventsList.md b/clients/java/docs/StatsEventsList.md index a696adf560c..331b12f6df6 100644 --- a/clients/java/docs/StatsEventsList.md +++ b/clients/java/docs/StatsEventsList.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**events** | [**List<StatsEvent>**](StatsEvent.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List<StatsEvent>**](StatsEvent.md) | | diff --git a/clients/java/docs/StorageConfig.md b/clients/java/docs/StorageConfig.md index 83cff620da6..c351f51cce2 100644 --- a/clients/java/docs/StorageConfig.md +++ b/clients/java/docs/StorageConfig.md @@ -5,15 +5,15 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**blockstoreType** | **String** | | | -|**blockstoreNamespaceExample** | **String** | | | -|**blockstoreNamespaceValidityRegex** | **String** | | | -|**defaultNamespacePrefix** | **String** | | [optional] | -|**preSignSupport** | **Boolean** | | | -|**preSignSupportUI** | **Boolean** | | | -|**importSupport** | **Boolean** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**blockstoreType** | **String** | | +**blockstoreNamespaceExample** | **String** | | +**blockstoreNamespaceValidityRegex** | **String** | | +**defaultNamespacePrefix** | **String** | | [optional] +**preSignSupport** | **Boolean** | | +**preSignSupportUI** | **Boolean** | | +**importSupport** | **Boolean** | | diff --git a/clients/java/docs/StorageURI.md b/clients/java/docs/StorageURI.md index 2ff4a26269a..e890eae4d13 100644 --- a/clients/java/docs/StorageURI.md +++ b/clients/java/docs/StorageURI.md @@ -6,9 +6,9 @@ URI to a path in a storage provider (e.g. \"s3://bucket1/path/to/object\") ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**location** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **String** | | diff --git a/clients/java/docs/TagCreation.md b/clients/java/docs/TagCreation.md index fcb7bc61421..ee60d98d41a 100644 --- a/clients/java/docs/TagCreation.md +++ b/clients/java/docs/TagCreation.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**ref** | **String** | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**ref** | **String** | | diff --git a/clients/java/docs/TagsApi.md b/clients/java/docs/TagsApi.md index fd85ad24fdf..1ca1ae90ac2 100644 --- a/clients/java/docs/TagsApi.md +++ b/clients/java/docs/TagsApi.md @@ -1,13 +1,13 @@ # TagsApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createTag**](TagsApi.md#createTag) | **POST** /repositories/{repository}/tags | create tag | -| [**deleteTag**](TagsApi.md#deleteTag) | **DELETE** /repositories/{repository}/tags/{tag} | delete tag | -| [**getTag**](TagsApi.md#getTag) | **GET** /repositories/{repository}/tags/{tag} | get tag | -| [**listTags**](TagsApi.md#listTags) | **GET** /repositories/{repository}/tags | list tags | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createTag**](TagsApi.md#createTag) | **POST** /repositories/{repository}/tags | create tag +[**deleteTag**](TagsApi.md#deleteTag) | **DELETE** /repositories/{repository}/tags/{tag} | delete tag +[**getTag**](TagsApi.md#getTag) | **GET** /repositories/{repository}/tags/{tag} | get tag +[**listTags**](TagsApi.md#listTags) | **GET** /repositories/{repository}/tags | list tags @@ -29,7 +29,7 @@ import io.lakefs.clients.api.TagsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -42,6 +42,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -54,10 +58,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - TagsApi apiInstance = new TagsApi(defaultClient); String repository = "repository_example"; // String | TagCreation tagCreation = new TagCreation(); // TagCreation | @@ -77,10 +77,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **tagCreation** | [**TagCreation**](TagCreation.md)| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **tagCreation** | [**TagCreation**](TagCreation.md)| | ### Return type @@ -88,7 +88,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -98,12 +98,12 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | tag | - | -| **400** | Validation Error | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **409** | Resource Conflicts With Target | - | -| **0** | Internal Server Error | - | +**201** | tag | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | # **deleteTag** @@ -124,7 +124,7 @@ import io.lakefs.clients.api.TagsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -137,6 +137,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -149,10 +153,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - TagsApi apiInstance = new TagsApi(defaultClient); String repository = "repository_example"; // String | String tag = "tag_example"; // String | @@ -171,10 +171,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **tag** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **tag** | **String**| | ### Return type @@ -182,7 +182,7 @@ null (empty response body) ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -192,10 +192,10 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | tag deleted successfully | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**204** | tag deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **getTag** @@ -216,7 +216,7 @@ import io.lakefs.clients.api.TagsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -229,6 +229,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -241,10 +245,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - TagsApi apiInstance = new TagsApi(defaultClient); String repository = "repository_example"; // String | String tag = "tag_example"; // String | @@ -264,10 +264,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **tag** | **String**| | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **tag** | **String**| | ### Return type @@ -275,7 +275,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -285,10 +285,10 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | tag | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | tag | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | # **listTags** @@ -309,7 +309,7 @@ import io.lakefs.clients.api.TagsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -322,6 +322,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -334,10 +338,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - TagsApi apiInstance = new TagsApi(defaultClient); String repository = "repository_example"; // String | String prefix = "prefix_example"; // String | return items prefixed with this value @@ -359,12 +359,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **repository** | **String**| | | -| **prefix** | **String**| return items prefixed with this value | [optional] | -| **after** | **String**| return items after this value | [optional] | -| **amount** | **Integer**| how many items to return | [optional] [default to 100] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **prefix** | **String**| return items prefixed with this value | [optional] + **after** | **String**| return items after this value | [optional] + **amount** | **Integer**| how many items to return | [optional] [default to 100] ### Return type @@ -372,7 +372,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -382,8 +382,8 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | tag list | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | tag list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/TemplatesApi.md b/clients/java/docs/TemplatesApi.md index 9f6186c1503..cee49474a4a 100644 --- a/clients/java/docs/TemplatesApi.md +++ b/clients/java/docs/TemplatesApi.md @@ -1,10 +1,10 @@ # TemplatesApi -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**expandTemplate**](TemplatesApi.md#expandTemplate) | **GET** /templates/{template_location} | | +Method | HTTP request | Description +------------- | ------------- | ------------- +[**expandTemplate**](TemplatesApi.md#expandTemplate) | **GET** /templates/{template_location} | @@ -28,7 +28,7 @@ import io.lakefs.clients.api.TemplatesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("/api/v1"); + defaultClient.setBasePath("http://localhost/api/v1"); // Configure HTTP basic authorization: basic_auth HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); @@ -41,6 +41,10 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //cookie_auth.setApiKeyPrefix("Token"); + // Configure HTTP bearer authorization: jwt_token + HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); + jwt_token.setBearerToken("BEARER TOKEN"); + // Configure API key authorization: oidc_auth ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth"); oidc_auth.setApiKey("YOUR API KEY"); @@ -53,10 +57,6 @@ public class Example { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //saml_auth.setApiKeyPrefix("Token"); - // Configure HTTP bearer authorization: jwt_token - HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token"); - jwt_token.setBearerToken("BEARER TOKEN"); - TemplatesApi apiInstance = new TemplatesApi(defaultClient); String templateLocation = "spark.submit.conf.tt"; // String | URL of the template; must be relative (to a URL configured on the server). Map params = new HashMap(); // Map | @@ -76,10 +76,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **templateLocation** | **String**| URL of the template; must be relative (to a URL configured on the server). | | -| **params** | [**Map<String, String>**](String.md)| | [optional] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateLocation** | **String**| URL of the template; must be relative (to a URL configured on the server). | + **params** | [**Map<String, String>**](String.md)| | [optional] ### Return type @@ -87,7 +87,7 @@ public class Example { ### Authorization -[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token) +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) ### HTTP request headers @@ -97,8 +97,8 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | expanded template | - | -| **401** | Unauthorized | - | -| **404** | Resource Not Found | - | -| **0** | Internal Server Error | - | +**200** | expanded template | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | diff --git a/clients/java/docs/UnderlyingObjectProperties.md b/clients/java/docs/UnderlyingObjectProperties.md index d3abc8fb19b..f9be999984a 100644 --- a/clients/java/docs/UnderlyingObjectProperties.md +++ b/clients/java/docs/UnderlyingObjectProperties.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**storageClass** | **String** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storageClass** | **String** | | [optional] diff --git a/clients/java/docs/UpdatePasswordByToken.md b/clients/java/docs/UpdatePasswordByToken.md index 14d1d4e2c4d..401c7b16338 100644 --- a/clients/java/docs/UpdatePasswordByToken.md +++ b/clients/java/docs/UpdatePasswordByToken.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**token** | **String** | token used for authentication | | -|**newPassword** | **String** | new password to update | | -|**email** | **String** | optional user email to match the token for verification | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | token used for authentication | +**newPassword** | **String** | new password to update | +**email** | **String** | optional user email to match the token for verification | [optional] diff --git a/clients/java/docs/User.md b/clients/java/docs/User.md index a63cd2750fd..53510057b23 100644 --- a/clients/java/docs/User.md +++ b/clients/java/docs/User.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | a unique identifier for the user. In password-based authentication, this is the email. | | -|**creationDate** | **Long** | Unix Epoch in seconds | | -|**friendlyName** | **String** | | [optional] | -|**email** | **String** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | a unique identifier for the user. In password-based authentication, this is the email. | +**creationDate** | **Long** | Unix Epoch in seconds | +**friendlyName** | **String** | | [optional] +**email** | **String** | | [optional] diff --git a/clients/java/docs/UserCreation.md b/clients/java/docs/UserCreation.md index a04e20a21c0..a384671ee29 100644 --- a/clients/java/docs/UserCreation.md +++ b/clients/java/docs/UserCreation.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | a unique identifier for the user. In password-based authentication, this is the email. | | -|**inviteUser** | **Boolean** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | a unique identifier for the user. In password-based authentication, this is the email. | +**inviteUser** | **Boolean** | | [optional] diff --git a/clients/java/docs/UserList.md b/clients/java/docs/UserList.md index b9d8c421208..b60eea08366 100644 --- a/clients/java/docs/UserList.md +++ b/clients/java/docs/UserList.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**results** | [**List<User>**](User.md) | | | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**List<User>**](User.md) | | diff --git a/clients/java/docs/VersionConfig.md b/clients/java/docs/VersionConfig.md index 5a4d3a64cc5..c2c5ba5093d 100644 --- a/clients/java/docs/VersionConfig.md +++ b/clients/java/docs/VersionConfig.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**version** | **String** | | [optional] | -|**upgradeRecommended** | **Boolean** | | [optional] | -|**upgradeUrl** | **String** | | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **String** | | [optional] +**upgradeRecommended** | **Boolean** | | [optional] +**upgradeUrl** | **String** | | [optional] diff --git a/clients/java/pom.xml b/clients/java/pom.xml index 627be7fcb0e..b3038b2f53f 100644 --- a/clients/java/pom.xml +++ b/clients/java/pom.xml @@ -55,7 +55,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.0.0-M1 enforce-maven @@ -75,7 +75,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.0.0-M4 @@ -87,18 +87,9 @@ methods 10 - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - - maven-dependency-plugin - 3.3.0 package @@ -111,14 +102,16 @@ + org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 2.2 + jar test-jar @@ -126,10 +119,11 @@ + org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 1.10 add_sources @@ -160,7 +154,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.1.1 attach-javadocs @@ -183,7 +177,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 2.2.1 attach-sources @@ -193,48 +187,6 @@ - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - - - - - - - .gitignore - - - - - - true - 4 - - - - - - - - - - 1.8 - - true - - - - - - - - @@ -246,7 +198,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 1.5 sign-artifacts @@ -263,6 +215,11 @@ + + io.swagger + swagger-annotations + ${swagger-core-version} + com.google.code.findbugs @@ -294,6 +251,11 @@ commons-lang3 ${commons-lang3-version} + + org.threeten + threetenbp + ${threetenbp-version} + jakarta.annotation jakarta.annotation-api @@ -305,54 +267,33 @@ jackson-databind-nullable ${jackson-databind-nullable-version} - - - javax.ws.rs - jsr311-api - ${jsr311-api-version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} - - org.junit.jupiter - junit-jupiter-engine + junit + junit ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - org.mockito mockito-core - ${mockito-core-version} + 3.11.2 test - 1.8 + 1.7 ${java.version} ${java.version} 1.8.5 - 1.6.6 - 4.10.0 - 2.9.1 - 3.12.0 - 0.2.4 + 1.6.2 + 4.9.1 + 2.8.6 + 3.11 + 0.2.1 + 1.5.0 1.3.5 - 5.9.1 - 1.9.1 - 3.12.4 - 2.1.1 - 1.1.1 + 4.13.1 UTF-8 - 2.27.2 diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ActionsApi.java b/clients/java/src/main/java/io/lakefs/clients/api/ActionsApi.java index 5802f6b4432..bc0ad1cba1e 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ActionsApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ActionsApi.java @@ -38,12 +38,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class ActionsApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public ActionsApi() { this(Configuration.getDefaultApiClient()); @@ -61,22 +58,6 @@ 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 getRun * @param repository (required) @@ -94,25 +75,12 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call getRunCall(String repository, String runId, 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 = "/repositories/{repository}/actions/runs/{run_id}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "run_id" + "\\}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -129,29 +97,31 @@ public okhttp3.Call getRunCall(String repository, String runId, final ApiCallbac } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRunValidateBeforeCall(String repository, String runId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getRun(Async)"); } - + // verify the required parameter 'runId' is set if (runId == null) { throw new ApiException("Missing the required parameter 'runId' when calling getRun(Async)"); } + - return getRunCall(repository, runId, _callback); + okhttp3.Call localVarCall = getRunCall(repository, runId, _callback); + return localVarCall; } @@ -240,26 +210,13 @@ public okhttp3.Call getRunAsync(String repository, String runId, final ApiCallba */ public okhttp3.Call getRunHookOutputCall(String repository, String runId, String hookRunId, 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 = "/repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())) - .replace("{" + "hook_run_id" + "}", localVarApiClient.escapeString(hookRunId.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "run_id" + "\\}", localVarApiClient.escapeString(runId.toString())) + .replaceAll("\\{" + "hook_run_id" + "\\}", localVarApiClient.escapeString(hookRunId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -268,8 +225,7 @@ public okhttp3.Call getRunHookOutputCall(String repository, String runId, String Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/octet-stream", - "application/json" + "application/octet-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -277,34 +233,36 @@ public okhttp3.Call getRunHookOutputCall(String repository, String runId, String } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRunHookOutputValidateBeforeCall(String repository, String runId, String hookRunId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getRunHookOutput(Async)"); } - + // verify the required parameter 'runId' is set if (runId == null) { throw new ApiException("Missing the required parameter 'runId' when calling getRunHookOutput(Async)"); } - + // verify the required parameter 'hookRunId' is set if (hookRunId == null) { throw new ApiException("Missing the required parameter 'hookRunId' when calling getRunHookOutput(Async)"); } + - return getRunHookOutputCall(repository, runId, hookRunId, _callback); + okhttp3.Call localVarCall = getRunHookOutputCall(repository, runId, hookRunId, _callback); + return localVarCall; } @@ -398,24 +356,11 @@ public okhttp3.Call getRunHookOutputAsync(String repository, String runId, Strin */ public okhttp3.Call listRepositoryRunsCall(String repository, String after, Integer amount, String branch, String commit, 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 = "/repositories/{repository}/actions/runs" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -448,24 +393,26 @@ public okhttp3.Call listRepositoryRunsCall(String repository, String after, Inte } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listRepositoryRunsValidateBeforeCall(String repository, String after, Integer amount, String branch, String commit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling listRepositoryRuns(Async)"); } + - return listRepositoryRunsCall(repository, after, amount, branch, commit, _callback); + okhttp3.Call localVarCall = listRepositoryRunsCall(repository, after, amount, branch, commit, _callback); + return localVarCall; } @@ -564,25 +511,12 @@ public okhttp3.Call listRepositoryRunsAsync(String repository, String after, Int */ public okhttp3.Call listRunHooksCall(String repository, String runId, String after, Integer amount, 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 = "/repositories/{repository}/actions/runs/{run_id}/hooks" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "run_id" + "}", localVarApiClient.escapeString(runId.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "run_id" + "\\}", localVarApiClient.escapeString(runId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -607,29 +541,31 @@ public okhttp3.Call listRunHooksCall(String repository, String runId, String aft } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listRunHooksValidateBeforeCall(String repository, String runId, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling listRunHooks(Async)"); } - + // verify the required parameter 'runId' is set if (runId == null) { throw new ApiException("Missing the required parameter 'runId' when calling listRunHooks(Async)"); } + - return listRunHooksCall(repository, runId, after, amount, _callback); + okhttp3.Call localVarCall = listRunHooksCall(repository, runId, after, amount, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ApiClient.java b/clients/java/src/main/java/io/lakefs/clients/api/ApiClient.java index 7e206d40c24..8f38b12e601 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ApiClient.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ApiClient.java @@ -18,9 +18,11 @@ import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; import okio.BufferedSink; import okio.Okio; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.format.DateTimeFormatter; import javax.net.ssl.*; import java.io.File; @@ -41,9 +43,6 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; @@ -55,21 +54,9 @@ import io.lakefs.clients.api.auth.HttpBearerAuth; import io.lakefs.clients.api.auth.ApiKeyAuth; -/** - *

ApiClient class.

- */ public class ApiClient { - private String basePath = "/api/v1"; - protected List servers = new ArrayList(Arrays.asList( - new ServerConfiguration( - "/api/v1", - "lakeFS server endpoint", - new HashMap() - ) - )); - protected Integer serverIndex = 0; - protected Map serverVariables = null; + private String basePath = "http://localhost/api/v1"; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); private Map defaultCookieMap = new HashMap(); @@ -91,7 +78,7 @@ public class ApiClient { private HttpLoggingInterceptor loggingInterceptor; - /** + /* * Basic constructor for ApiClient */ public ApiClient() { @@ -100,18 +87,16 @@ public ApiClient() { // Setup authentications (key: authentication name, value: authentication). authentications.put("basic_auth", new HttpBasicAuth()); - authentications.put("jwt_token", new HttpBearerAuth("bearer")); authentications.put("cookie_auth", new ApiKeyAuth("cookie", "internal_auth_session")); + authentications.put("jwt_token", new HttpBearerAuth("bearer")); authentications.put("oidc_auth", new ApiKeyAuth("cookie", "oidc_auth_session")); authentications.put("saml_auth", new ApiKeyAuth("cookie", "saml_auth_session")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } - /** + /* * Basic constructor with custom OkHttpClient - * - * @param client a {@link okhttp3.OkHttpClient} object */ public ApiClient(OkHttpClient client) { init(); @@ -120,8 +105,8 @@ public ApiClient(OkHttpClient client) { // Setup authentications (key: authentication name, value: authentication). authentications.put("basic_auth", new HttpBasicAuth()); - authentications.put("jwt_token", new HttpBearerAuth("bearer")); authentications.put("cookie_auth", new ApiKeyAuth("cookie", "internal_auth_session")); + authentications.put("jwt_token", new HttpBearerAuth("bearer")); authentications.put("oidc_auth", new ApiKeyAuth("cookie", "oidc_auth_session")); authentications.put("saml_auth", new ApiKeyAuth("cookie", "saml_auth_session")); // Prevent the authentications from being modified. @@ -165,39 +150,11 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g /api/v1 + * @param basePath Base path of the URL (e.g http://localhost/api/v1 * @return An instance of OkHttpClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; - this.serverIndex = null; - return this; - } - - public List getServers() { - return servers; - } - - public ApiClient setServers(List servers) { - this.servers = servers; - return this; - } - - public Integer getServerIndex() { - return serverIndex; - } - - public ApiClient setServerIndex(Integer serverIndex) { - this.serverIndex = serverIndex; - return this; - } - - public Map getServerVariables() { - return serverVariables; - } - - public ApiClient setServerVariables(Map serverVariables) { - this.serverVariables = serverVariables; return this; } @@ -215,7 +172,7 @@ public OkHttpClient getHttpClient() { * * @param newHttpClient An instance of OkHttpClient * @return Api Client - * @throws java.lang.NullPointerException when newHttpClient is null + * @throws NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); @@ -287,11 +244,6 @@ public ApiClient setSslCaCert(InputStream sslCaCert) { return this; } - /** - *

Getter for the field keyManagers.

- * - * @return an array of {@link javax.net.ssl.KeyManager} objects - */ public KeyManager[] getKeyManagers() { return keyManagers; } @@ -309,67 +261,32 @@ public ApiClient setKeyManagers(KeyManager[] managers) { return this; } - /** - *

Getter for the field dateFormat.

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

Setter for the field dateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link io.lakefs.clients.api.ApiClient} object - */ public ApiClient setDateFormat(DateFormat dateFormat) { - JSON.setDateFormat(dateFormat); + this.json.setDateFormat(dateFormat); return this; } - /** - *

Set SqlDateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link io.lakefs.clients.api.ApiClient} object - */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { - JSON.setSqlDateFormat(dateFormat); + this.json.setSqlDateFormat(dateFormat); return this; } - /** - *

Set OffsetDateTimeFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link io.lakefs.clients.api.ApiClient} object - */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - JSON.setOffsetDateTimeFormat(dateFormat); + this.json.setOffsetDateTimeFormat(dateFormat); return this; } - /** - *

Set LocalDateFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link io.lakefs.clients.api.ApiClient} object - */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - JSON.setLocalDateFormat(dateFormat); + this.json.setLocalDateFormat(dateFormat); return this; } - /** - *

Set LenientOnJson.

- * - * @param lenientOnJson a boolean - * @return a {@link io.lakefs.clients.api.ApiClient} object - */ public ApiClient setLenientOnJson(boolean lenientOnJson) { - JSON.setLenientOnJson(lenientOnJson); + this.json.setLenientOnJson(lenientOnJson); return this; } @@ -475,18 +392,6 @@ public void setAccessToken(String accessToken) { throw new RuntimeException("No OAuth2 authentication configured!"); } - /** - * Helper method to set credentials for AWSV4 Signature - * - * @param accessKey Access Key - * @param secretKey Secret Key - * @param region Region - * @param service Service to access to - */ - public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { - throw new RuntimeException("No AWS4 authentication configured!"); - } - /** * Set the User-Agent header's value (by adding to the default header map). * @@ -589,7 +494,7 @@ public int getConnectTimeout() { /** * Sets the connect timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. + * {@link Integer#MAX_VALUE}. * * @param connectionTimeout connection timeout in milliseconds * @return Api client @@ -611,7 +516,7 @@ public int getReadTimeout() { /** * Sets the read timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. + * {@link Integer#MAX_VALUE}. * * @param readTimeout read timeout in milliseconds * @return Api client @@ -633,7 +538,7 @@ public int getWriteTimeout() { /** * Sets the write timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. + * {@link Integer#MAX_VALUE}. * * @param writeTimeout connection timeout in milliseconds * @return Api client @@ -655,7 +560,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(); @@ -663,7 +568,7 @@ public String parameterToString(Object param) { if (b.length() > 0) { b.append(","); } - b.append(o); + b.append(String.valueOf(o)); } return b.toString(); } else { @@ -831,23 +736,17 @@ public String selectHeaderAccept(String[] accepts) { * * @param contentTypes The Content-Type array to select from * @return The Content-Type header to use. If the given array is empty, - * returns null. If it matches "any", JSON will be used. + * or matches "any", JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0) { - return null; - } - - if (contentTypes[0].equals("*/*")) { + if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { return "application/json"; } - for (String contentType : contentTypes) { if (isJsonMime(contentType)) { return contentType; } } - return contentTypes[0]; } @@ -873,7 +772,7 @@ public String escapeString(String str) { * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws io.lakefs.clients.api.ApiException If fail to deserialize response body, i.e. cannot read response body + * @throws 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") @@ -914,7 +813,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; @@ -934,7 +833,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 io.lakefs.clients.api.ApiException If fail to serialize the given object + * @throws ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -943,18 +842,14 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException } else if (obj instanceof File) { // File body parameter support. return RequestBody.create((File) obj, MediaType.parse(contentType)); - } else if ("text/plain".equals(contentType) && obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); } else if (isJsonMime(contentType)) { String content; if (obj != null) { - content = JSON.serialize(obj); + content = json.serialize(obj); } else { content = null; } return RequestBody.create(content, MediaType.parse(contentType)); - } else if (obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); } else { throw new ApiException("Content type \"" + contentType + "\" is not supported"); } @@ -964,7 +859,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 io.lakefs.clients.api.ApiException If fail to read file content from response and write to disk + * @throws ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -984,7 +879,7 @@ public File downloadFileFromResponse(Response response) throws ApiException { * * @param response An instance of the Response object * @return Prepared file for the download - * @throws java.io.IOException If fail to prepare file for download + * @throws IOException If fail to prepare file for download */ public File prepareDownloadFile(Response response) throws IOException { String filename = null; @@ -1028,7 +923,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws io.lakefs.clients.api.ApiException If fail to execute the call + * @throws ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -1043,7 +938,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 io.lakefs.clients.api.ApiException If fail to execute the call + * @throws ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { try { @@ -1107,7 +1002,7 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws io.lakefs.clients.api.ApiException If the response has an unsuccessful status code or + * @throws 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 { @@ -1142,7 +1037,6 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept /** * Build HTTP call with the given options. * - * @param baseUrl The base URL * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters @@ -1154,10 +1048,10 @@ 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 io.lakefs.clients.api.ApiException If fail to serialize the request body object + * @throws 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); + public Call buildCall(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(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } @@ -1165,7 +1059,6 @@ public Call buildCall(String baseUrl, String path, String method, List que /** * Build an HTTP request with the given options. * - * @param baseUrl The base URL * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters @@ -1177,19 +1070,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 io.lakefs.clients.api.ApiException If fail to serialize the request body object + * @throws 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); + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); - final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); + final String url = buildUrl(path, queryParams, collectionQueryParams); + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); - // prepare HTTP request body - RequestBody reqBody; - String contentType = headerParams.get("Content-Type"); + String contentType = (String) headerParams.get("Content-Type"); + // ensuring a default content type + if (contentType == null) { + contentType = "application/json"; + } + RequestBody reqBody; if (!HttpMethod.permitsRequestBody(method)) { reqBody = null; } else if ("application/x-www-form-urlencoded".equals(contentType)) { @@ -1202,19 +1099,12 @@ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams) { + public String buildUrl(String path, List queryParams, List collectionQueryParams) { final StringBuilder url = new StringBuilder(); - if (baseUrl != null) { - url.append(baseUrl).append(path); - } else { - String baseURL; - if (serverIndex != null) { - if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() - )); - } - baseURL = servers.get(serverIndex).URL(serverVariables); - } else { - baseURL = basePath; - } - url.append(baseURL).append(path); - } + url.append(basePath).append(path); if (queryParams != null && !queryParams.isEmpty()) { // support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -1337,19 +1211,14 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws io.lakefs.clients.api.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 { + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RuntimeException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + auth.applyToParams(queryParams, headerParams, cookieParams); } } @@ -1379,18 +1248,12 @@ public RequestBody buildRequestBodyMultipart(Map formParams) { for (Entry param : formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (File) param.getValue(); - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); - } else if (param.getValue() instanceof List) { - List list = (List) param.getValue(); - for (Object item: list) { - if (item instanceof File) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); + mpBuilder.addPart(partHeaders, RequestBody.create(parameterToString(param.getValue()), null)); } } return mpBuilder.build(); @@ -1411,44 +1274,6 @@ public String guessContentTypeFromFile(File file) { } } - /** - * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param file The file to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } - - /** - * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param obj The complex object to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { - RequestBody requestBody; - if (obj instanceof String) { - requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); - } else { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - requestBody = RequestBody.create(content, MediaType.parse("application/json")); - } - - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); - mpBuilder.addPart(partHeaders, requestBody); - } - /** * Get network interceptor to add it to the httpClient to track download progress for * async requests. @@ -1516,7 +1341,7 @@ public boolean verify(String hostname, SSLSession session) { KeyStore caKeyStore = newEmptyKeyStore(password); int index = 0; for (Certificate certificate : certificates) { - String certificateAlias = "ca" + (index++); + String certificateAlias = "ca" + Integer.toString(index++); caKeyStore.setCertificateEntry(certificateAlias, certificate); } trustManagerFactory.init(caKeyStore); @@ -1545,26 +1370,4 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti throw new AssertionError(e); } } - - /** - * Convert the HTTP request body to a string. - * - * @param requestBody The HTTP request object - * @return The string representation of the HTTP request body - * @throws io.lakefs.clients.api.ApiException If fail to serialize the request body object into a string - */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { - if (requestBody != null) { - try { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return buffer.readUtf8(); - } catch (final IOException e) { - throw new ApiException(e); - } - } - - // empty http request body - return ""; - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ApiException.java b/clients/java/src/main/java/io/lakefs/clients/api/ApiException.java index 5c9e62c7619..cb7256181d0 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ApiException.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ApiException.java @@ -16,50 +16,22 @@ 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") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - - /** - *

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message the error message - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ public ApiException(int code, String message, Map> responseHeaders, String responseBody) { this(code, message); this.responseHeaders = responseHeaders; @@ -153,14 +88,4 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } - - /** - * Get the exception message including HTTP response data. - * - * @return The exception message - */ - public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", - super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ApiResponse.java b/clients/java/src/main/java/io/lakefs/clients/api/ApiResponse.java index 85f7ff2f787..4a696a96c8d 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ApiResponse.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ApiResponse.java @@ -18,6 +18,8 @@ /** * API response returned by API call. + * + * @param The type of data that is deserialized from response body */ public class ApiResponse { final private int statusCode; @@ -25,8 +27,6 @@ public class ApiResponse { final private T data; /** - *

Constructor for ApiResponse.

- * * @param statusCode The status code of HTTP response * @param headers The headers of HTTP response */ @@ -35,8 +35,6 @@ public ApiResponse(int statusCode, Map> headers) { } /** - *

Constructor for ApiResponse.

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

Get the status code.

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

Get the headers.

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

Get the data.

- * - * @return the data - */ public T getData() { return data; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/AuthApi.java b/clients/java/src/main/java/io/lakefs/clients/api/AuthApi.java index 5fec2522bb7..8b5266d4d65 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/AuthApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/AuthApi.java @@ -51,12 +51,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class AuthApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public AuthApi() { this(Configuration.getDefaultApiClient()); @@ -74,22 +71,6 @@ 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 addGroupMembership * @param groupId (required) @@ -107,25 +88,12 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call addGroupMembershipCall(String groupId, String userId, 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 = "/auth/groups/{groupId}/members/{userId}" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())) + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -142,29 +110,31 @@ public okhttp3.Call addGroupMembershipCall(String groupId, String userId, final } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addGroupMembershipValidateBeforeCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling addGroupMembership(Async)"); } - + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling addGroupMembership(Async)"); } + - return addGroupMembershipCall(groupId, userId, _callback); + okhttp3.Call localVarCall = addGroupMembershipCall(groupId, userId, _callback); + return localVarCall; } @@ -248,25 +218,12 @@ public okhttp3.Call addGroupMembershipAsync(String groupId, String userId, final */ public okhttp3.Call attachPolicyToGroupCall(String groupId, String policyId, 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 = "/auth/groups/{groupId}/policies/{policyId}" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) - .replace("{" + "policyId" + "}", localVarApiClient.escapeString(policyId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())) + .replaceAll("\\{" + "policyId" + "\\}", localVarApiClient.escapeString(policyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -283,29 +240,31 @@ public okhttp3.Call attachPolicyToGroupCall(String groupId, String policyId, fin } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call attachPolicyToGroupValidateBeforeCall(String groupId, String policyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling attachPolicyToGroup(Async)"); } - + // verify the required parameter 'policyId' is set if (policyId == null) { throw new ApiException("Missing the required parameter 'policyId' when calling attachPolicyToGroup(Async)"); } + - return attachPolicyToGroupCall(groupId, policyId, _callback); + okhttp3.Call localVarCall = attachPolicyToGroupCall(groupId, policyId, _callback); + return localVarCall; } @@ -389,25 +348,12 @@ public okhttp3.Call attachPolicyToGroupAsync(String groupId, String policyId, fi */ public okhttp3.Call attachPolicyToUserCall(String userId, String policyId, 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 = "/auth/users/{userId}/policies/{policyId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) - .replace("{" + "policyId" + "}", localVarApiClient.escapeString(policyId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) + .replaceAll("\\{" + "policyId" + "\\}", localVarApiClient.escapeString(policyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -424,29 +370,31 @@ public okhttp3.Call attachPolicyToUserCall(String userId, String policyId, final } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call attachPolicyToUserValidateBeforeCall(String userId, String policyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling attachPolicyToUser(Async)"); } - + // verify the required parameter 'policyId' is set if (policyId == null) { throw new ApiException("Missing the required parameter 'policyId' when calling attachPolicyToUser(Async)"); } + - return attachPolicyToUserCall(userId, policyId, _callback); + okhttp3.Call localVarCall = attachPolicyToUserCall(userId, policyId, _callback); + return localVarCall; } @@ -529,24 +477,11 @@ public okhttp3.Call attachPolicyToUserAsync(String userId, String policyId, fina */ public okhttp3.Call createCredentialsCall(String userId, 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 = "/auth/users/{userId}/credentials" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -563,24 +498,26 @@ public okhttp3.Call createCredentialsCall(String userId, final ApiCallback _call } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createCredentialsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling createCredentials(Async)"); } + - return createCredentialsCall(userId, _callback); + okhttp3.Call localVarCall = createCredentialsCall(userId, _callback); + return localVarCall; } @@ -664,19 +601,6 @@ public okhttp3.Call createCredentialsAsync(String userId, final ApiCallback */ public okhttp3.Call createGroupCall(GroupCreation groupCreation, 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 = groupCreation; // create path and map variables @@ -700,17 +624,18 @@ public okhttp3.Call createGroupCall(GroupCreation groupCreation, final ApiCallba "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createGroupValidateBeforeCall(GroupCreation groupCreation, final ApiCallback _callback) throws ApiException { - return createGroupCall(groupCreation, _callback); + + + okhttp3.Call localVarCall = createGroupCall(groupCreation, _callback); + return localVarCall; } @@ -795,19 +720,6 @@ public okhttp3.Call createGroupAsync(GroupCreation groupCreation, final ApiCallb */ public okhttp3.Call createPolicyCall(Policy policy, 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 = policy; // create path and map variables @@ -831,22 +743,23 @@ public okhttp3.Call createPolicyCall(Policy policy, final ApiCallback _callback) "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createPolicyValidateBeforeCall(Policy policy, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'policy' is set if (policy == null) { throw new ApiException("Missing the required parameter 'policy' when calling createPolicy(Async)"); } + - return createPolicyCall(policy, _callback); + okhttp3.Call localVarCall = createPolicyCall(policy, _callback); + return localVarCall; } @@ -934,19 +847,6 @@ public okhttp3.Call createPolicyAsync(Policy policy, final ApiCallback _ */ public okhttp3.Call createUserCall(UserCreation userCreation, 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 = userCreation; // create path and map variables @@ -970,17 +870,18 @@ public okhttp3.Call createUserCall(UserCreation userCreation, final ApiCallback "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createUserValidateBeforeCall(UserCreation userCreation, final ApiCallback _callback) throws ApiException { - return createUserCall(userCreation, _callback); + + + okhttp3.Call localVarCall = createUserCall(userCreation, _callback); + return localVarCall; } @@ -1068,25 +969,12 @@ public okhttp3.Call createUserAsync(UserCreation userCreation, final ApiCallback */ public okhttp3.Call deleteCredentialsCall(String userId, String accessKeyId, 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 = "/auth/users/{userId}/credentials/{accessKeyId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) - .replace("{" + "accessKeyId" + "}", localVarApiClient.escapeString(accessKeyId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) + .replaceAll("\\{" + "accessKeyId" + "\\}", localVarApiClient.escapeString(accessKeyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1103,29 +991,31 @@ public okhttp3.Call deleteCredentialsCall(String userId, String accessKeyId, fin } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCredentialsValidateBeforeCall(String userId, String accessKeyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling deleteCredentials(Async)"); } - + // verify the required parameter 'accessKeyId' is set if (accessKeyId == null) { throw new ApiException("Missing the required parameter 'accessKeyId' when calling deleteCredentials(Async)"); } + - return deleteCredentialsCall(userId, accessKeyId, _callback); + okhttp3.Call localVarCall = deleteCredentialsCall(userId, accessKeyId, _callback); + return localVarCall; } @@ -1208,24 +1098,11 @@ public okhttp3.Call deleteCredentialsAsync(String userId, String accessKeyId, fi */ public okhttp3.Call deleteGroupCall(String groupId, 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 = "/auth/groups/{groupId}" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1242,24 +1119,26 @@ public okhttp3.Call deleteGroupCall(String groupId, final ApiCallback _callback) } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteGroupValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroup(Async)"); } + - return deleteGroupCall(groupId, _callback); + okhttp3.Call localVarCall = deleteGroupCall(groupId, _callback); + return localVarCall; } @@ -1340,25 +1219,12 @@ public okhttp3.Call deleteGroupAsync(String groupId, final ApiCallback _ca */ public okhttp3.Call deleteGroupMembershipCall(String groupId, String userId, 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 = "/auth/groups/{groupId}/members/{userId}" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())) + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1375,29 +1241,31 @@ public okhttp3.Call deleteGroupMembershipCall(String groupId, String userId, fin } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteGroupMembershipValidateBeforeCall(String groupId, String userId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling deleteGroupMembership(Async)"); } - + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling deleteGroupMembership(Async)"); } + - return deleteGroupMembershipCall(groupId, userId, _callback); + okhttp3.Call localVarCall = deleteGroupMembershipCall(groupId, userId, _callback); + return localVarCall; } @@ -1480,24 +1348,11 @@ public okhttp3.Call deleteGroupMembershipAsync(String groupId, String userId, fi */ public okhttp3.Call deletePolicyCall(String policyId, 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 = "/auth/policies/{policyId}" - .replace("{" + "policyId" + "}", localVarApiClient.escapeString(policyId.toString())); + .replaceAll("\\{" + "policyId" + "\\}", localVarApiClient.escapeString(policyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1514,24 +1369,26 @@ public okhttp3.Call deletePolicyCall(String policyId, final ApiCallback _callbac } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deletePolicyValidateBeforeCall(String policyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'policyId' is set if (policyId == null) { throw new ApiException("Missing the required parameter 'policyId' when calling deletePolicy(Async)"); } + - return deletePolicyCall(policyId, _callback); + okhttp3.Call localVarCall = deletePolicyCall(policyId, _callback); + return localVarCall; } @@ -1611,24 +1468,11 @@ public okhttp3.Call deletePolicyAsync(String policyId, final ApiCallback _ */ public okhttp3.Call deleteUserCall(String userId, 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 = "/auth/users/{userId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1645,24 +1489,26 @@ public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) t } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteUserValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling deleteUser(Async)"); } + - return deleteUserCall(userId, _callback); + okhttp3.Call localVarCall = deleteUserCall(userId, _callback); + return localVarCall; } @@ -1743,25 +1589,12 @@ public okhttp3.Call deleteUserAsync(String userId, final ApiCallback _call */ public okhttp3.Call detachPolicyFromGroupCall(String groupId, String policyId, 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 = "/auth/groups/{groupId}/policies/{policyId}" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) - .replace("{" + "policyId" + "}", localVarApiClient.escapeString(policyId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())) + .replaceAll("\\{" + "policyId" + "\\}", localVarApiClient.escapeString(policyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1778,29 +1611,31 @@ public okhttp3.Call detachPolicyFromGroupCall(String groupId, String policyId, f } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call detachPolicyFromGroupValidateBeforeCall(String groupId, String policyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling detachPolicyFromGroup(Async)"); } - + // verify the required parameter 'policyId' is set if (policyId == null) { throw new ApiException("Missing the required parameter 'policyId' when calling detachPolicyFromGroup(Async)"); } + - return detachPolicyFromGroupCall(groupId, policyId, _callback); + okhttp3.Call localVarCall = detachPolicyFromGroupCall(groupId, policyId, _callback); + return localVarCall; } @@ -1884,25 +1719,12 @@ public okhttp3.Call detachPolicyFromGroupAsync(String groupId, String policyId, */ public okhttp3.Call detachPolicyFromUserCall(String userId, String policyId, 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 = "/auth/users/{userId}/policies/{policyId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) - .replace("{" + "policyId" + "}", localVarApiClient.escapeString(policyId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) + .replaceAll("\\{" + "policyId" + "\\}", localVarApiClient.escapeString(policyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1919,29 +1741,31 @@ public okhttp3.Call detachPolicyFromUserCall(String userId, String policyId, fin } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call detachPolicyFromUserValidateBeforeCall(String userId, String policyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling detachPolicyFromUser(Async)"); } - + // verify the required parameter 'policyId' is set if (policyId == null) { throw new ApiException("Missing the required parameter 'policyId' when calling detachPolicyFromUser(Async)"); } + - return detachPolicyFromUserCall(userId, policyId, _callback); + okhttp3.Call localVarCall = detachPolicyFromUserCall(userId, policyId, _callback); + return localVarCall; } @@ -2023,19 +1847,6 @@ public okhttp3.Call detachPolicyFromUserAsync(String userId, String policyId, fi */ public okhttp3.Call forgotPasswordCall(ForgotPasswordRequest forgotPasswordRequest, 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 = forgotPasswordRequest; // create path and map variables @@ -2059,22 +1870,23 @@ public okhttp3.Call forgotPasswordCall(ForgotPasswordRequest forgotPasswordReque "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call forgotPasswordValidateBeforeCall(ForgotPasswordRequest forgotPasswordRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'forgotPasswordRequest' is set if (forgotPasswordRequest == null) { throw new ApiException("Missing the required parameter 'forgotPasswordRequest' when calling forgotPassword(Async)"); } + - return forgotPasswordCall(forgotPasswordRequest, _callback); + okhttp3.Call localVarCall = forgotPasswordCall(forgotPasswordRequest, _callback); + return localVarCall; } @@ -2148,19 +1960,6 @@ public okhttp3.Call forgotPasswordAsync(ForgotPasswordRequest forgotPasswordRequ */ public okhttp3.Call getAuthCapabilitiesCall(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 @@ -2181,19 +1980,21 @@ public okhttp3.Call getAuthCapabilitiesCall(final ApiCallback _callback) throws } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAuthCapabilitiesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getAuthCapabilitiesCall(_callback); + + + okhttp3.Call localVarCall = getAuthCapabilitiesCall(_callback); + return localVarCall; } @@ -2269,25 +2070,12 @@ public okhttp3.Call getAuthCapabilitiesAsync(final ApiCallback */ public okhttp3.Call getCredentialsCall(String userId, String accessKeyId, 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 = "/auth/users/{userId}/credentials/{accessKeyId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) - .replace("{" + "accessKeyId" + "}", localVarApiClient.escapeString(accessKeyId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) + .replaceAll("\\{" + "accessKeyId" + "\\}", localVarApiClient.escapeString(accessKeyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2304,29 +2092,31 @@ public okhttp3.Call getCredentialsCall(String userId, String accessKeyId, final } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getCredentialsValidateBeforeCall(String userId, String accessKeyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling getCredentials(Async)"); } - + // verify the required parameter 'accessKeyId' is set if (accessKeyId == null) { throw new ApiException("Missing the required parameter 'accessKeyId' when calling getCredentials(Async)"); } + - return getCredentialsCall(userId, accessKeyId, _callback); + okhttp3.Call localVarCall = getCredentialsCall(userId, accessKeyId, _callback); + return localVarCall; } @@ -2409,19 +2199,6 @@ public okhttp3.Call getCredentialsAsync(String userId, String accessKeyId, final */ public okhttp3.Call getCurrentUserCall(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 @@ -2442,19 +2219,21 @@ public okhttp3.Call getCurrentUserCall(final ApiCallback _callback) throws ApiEx } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getCurrentUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getCurrentUserCall(_callback); + + + okhttp3.Call localVarCall = getCurrentUserCall(_callback); + return localVarCall; } @@ -2526,24 +2305,11 @@ public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback */ public okhttp3.Call getGroupCall(String groupId, 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 = "/auth/groups/{groupId}" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2560,24 +2326,26 @@ public okhttp3.Call getGroupCall(String groupId, final ApiCallback _callback) th } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGroupValidateBeforeCall(String groupId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling getGroup(Async)"); } + - return getGroupCall(groupId, _callback); + okhttp3.Call localVarCall = getGroupCall(groupId, _callback); + return localVarCall; } @@ -2661,24 +2429,11 @@ public okhttp3.Call getGroupAsync(String groupId, final ApiCallback _call */ public okhttp3.Call getPolicyCall(String policyId, 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 = "/auth/policies/{policyId}" - .replace("{" + "policyId" + "}", localVarApiClient.escapeString(policyId.toString())); + .replaceAll("\\{" + "policyId" + "\\}", localVarApiClient.escapeString(policyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2695,24 +2450,26 @@ public okhttp3.Call getPolicyCall(String policyId, final ApiCallback _callback) } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getPolicyValidateBeforeCall(String policyId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'policyId' is set if (policyId == null) { throw new ApiException("Missing the required parameter 'policyId' when calling getPolicy(Async)"); } + - return getPolicyCall(policyId, _callback); + okhttp3.Call localVarCall = getPolicyCall(policyId, _callback); + return localVarCall; } @@ -2796,24 +2553,11 @@ public okhttp3.Call getPolicyAsync(String policyId, final ApiCallback _c */ public okhttp3.Call getUserCall(String userId, 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 = "/auth/users/{userId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2830,24 +2574,26 @@ public okhttp3.Call getUserCall(String userId, final ApiCallback _callback) thro } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUserValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling getUser(Async)"); } + - return getUserCall(userId, _callback); + okhttp3.Call localVarCall = getUserCall(userId, _callback); + return localVarCall; } @@ -2933,24 +2679,11 @@ public okhttp3.Call getUserAsync(String userId, final ApiCallback _callbac */ public okhttp3.Call listGroupMembersCall(String groupId, String prefix, String after, Integer amount, 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 = "/auth/groups/{groupId}/members" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2979,24 +2712,26 @@ public okhttp3.Call listGroupMembersCall(String groupId, String prefix, String a } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listGroupMembersValidateBeforeCall(String groupId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling listGroupMembers(Async)"); } + - return listGroupMembersCall(groupId, prefix, after, amount, _callback); + okhttp3.Call localVarCall = listGroupMembersCall(groupId, prefix, after, amount, _callback); + return localVarCall; } @@ -3089,24 +2824,11 @@ public okhttp3.Call listGroupMembersAsync(String groupId, String prefix, String */ public okhttp3.Call listGroupPoliciesCall(String groupId, String prefix, String after, Integer amount, 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 = "/auth/groups/{groupId}/policies" - .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + .replaceAll("\\{" + "groupId" + "\\}", localVarApiClient.escapeString(groupId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3135,24 +2857,26 @@ public okhttp3.Call listGroupPoliciesCall(String groupId, String prefix, String } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listGroupPoliciesValidateBeforeCall(String groupId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'groupId' is set if (groupId == null) { throw new ApiException("Missing the required parameter 'groupId' when calling listGroupPolicies(Async)"); } + - return listGroupPoliciesCall(groupId, prefix, after, amount, _callback); + okhttp3.Call localVarCall = listGroupPoliciesCall(groupId, prefix, after, amount, _callback); + return localVarCall; } @@ -3246,19 +2970,6 @@ public okhttp3.Call listGroupPoliciesAsync(String groupId, String prefix, String */ public okhttp3.Call listGroupsCall(String prefix, String after, Integer amount, 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 @@ -3291,19 +3002,21 @@ public okhttp3.Call listGroupsCall(String prefix, String after, Integer amount, } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listGroupsValidateBeforeCall(String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { - return listGroupsCall(prefix, after, amount, _callback); + + + okhttp3.Call localVarCall = listGroupsCall(prefix, after, amount, _callback); + return localVarCall; } @@ -3391,19 +3104,6 @@ public okhttp3.Call listGroupsAsync(String prefix, String after, Integer amount, */ public okhttp3.Call listPoliciesCall(String prefix, String after, Integer amount, 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 @@ -3436,19 +3136,21 @@ public okhttp3.Call listPoliciesCall(String prefix, String after, Integer amount } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listPoliciesValidateBeforeCall(String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { - return listPoliciesCall(prefix, after, amount, _callback); + + + okhttp3.Call localVarCall = listPoliciesCall(prefix, after, amount, _callback); + return localVarCall; } @@ -3538,24 +3240,11 @@ public okhttp3.Call listPoliciesAsync(String prefix, String after, Integer amoun */ public okhttp3.Call listUserCredentialsCall(String userId, String prefix, String after, Integer amount, 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 = "/auth/users/{userId}/credentials" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3584,24 +3273,26 @@ public okhttp3.Call listUserCredentialsCall(String userId, String prefix, String } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserCredentialsValidateBeforeCall(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling listUserCredentials(Async)"); } + - return listUserCredentialsCall(userId, prefix, after, amount, _callback); + okhttp3.Call localVarCall = listUserCredentialsCall(userId, prefix, after, amount, _callback); + return localVarCall; } @@ -3697,24 +3388,11 @@ public okhttp3.Call listUserCredentialsAsync(String userId, String prefix, Strin */ public okhttp3.Call listUserGroupsCall(String userId, String prefix, String after, Integer amount, 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 = "/auth/users/{userId}/groups" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3743,24 +3421,26 @@ public okhttp3.Call listUserGroupsCall(String userId, String prefix, String afte } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserGroupsValidateBeforeCall(String userId, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling listUserGroups(Async)"); } + - return listUserGroupsCall(userId, prefix, after, amount, _callback); + okhttp3.Call localVarCall = listUserGroupsCall(userId, prefix, after, amount, _callback); + return localVarCall; } @@ -3857,24 +3537,11 @@ public okhttp3.Call listUserGroupsAsync(String userId, String prefix, String aft */ public okhttp3.Call listUserPoliciesCall(String userId, String prefix, String after, Integer amount, Boolean effective, 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 = "/auth/users/{userId}/policies" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3907,24 +3574,26 @@ public okhttp3.Call listUserPoliciesCall(String userId, String prefix, String af } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUserPoliciesValidateBeforeCall(String userId, String prefix, String after, Integer amount, Boolean effective, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling listUserPolicies(Async)"); } + - return listUserPoliciesCall(userId, prefix, after, amount, effective, _callback); + okhttp3.Call localVarCall = listUserPoliciesCall(userId, prefix, after, amount, effective, _callback); + return localVarCall; } @@ -4021,19 +3690,6 @@ public okhttp3.Call listUserPoliciesAsync(String userId, String prefix, String a */ public okhttp3.Call listUsersCall(String prefix, String after, Integer amount, 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 @@ -4066,19 +3722,21 @@ public okhttp3.Call listUsersCall(String prefix, String after, Integer amount, f } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listUsersValidateBeforeCall(String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { - return listUsersCall(prefix, after, amount, _callback); + + + okhttp3.Call localVarCall = listUsersCall(prefix, after, amount, _callback); + return localVarCall; } @@ -4164,19 +3822,6 @@ public okhttp3.Call listUsersAsync(String prefix, String after, Integer amount, */ public okhttp3.Call loginCall(LoginInformation loginInformation, 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 = loginInformation; // create path and map variables @@ -4200,17 +3845,18 @@ public okhttp3.Call loginCall(LoginInformation loginInformation, final ApiCallba "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call loginValidateBeforeCall(LoginInformation loginInformation, final ApiCallback _callback) throws ApiException { - return loginCall(loginInformation, _callback); + + + okhttp3.Call localVarCall = loginCall(loginInformation, _callback); + return localVarCall; } @@ -4290,19 +3936,6 @@ public okhttp3.Call loginAsync(LoginInformation loginInformation, final ApiCallb */ public okhttp3.Call updatePasswordCall(UpdatePasswordByToken updatePasswordByToken, 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 = updatePasswordByToken; // create path and map variables @@ -4326,22 +3959,23 @@ public okhttp3.Call updatePasswordCall(UpdatePasswordByToken updatePasswordByTok "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "cookie_auth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updatePasswordValidateBeforeCall(UpdatePasswordByToken updatePasswordByToken, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'updatePasswordByToken' is set if (updatePasswordByToken == null) { throw new ApiException("Missing the required parameter 'updatePasswordByToken' when calling updatePassword(Async)"); } + - return updatePasswordCall(updatePasswordByToken, _callback); + okhttp3.Call localVarCall = updatePasswordCall(updatePasswordByToken, _callback); + return localVarCall; } @@ -4420,24 +4054,11 @@ public okhttp3.Call updatePasswordAsync(UpdatePasswordByToken updatePasswordByTo */ public okhttp3.Call updatePolicyCall(String policyId, Policy policy, 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 = policy; // create path and map variables String localVarPath = "/auth/policies/{policyId}" - .replace("{" + "policyId" + "}", localVarApiClient.escapeString(policyId.toString())); + .replaceAll("\\{" + "policyId" + "\\}", localVarApiClient.escapeString(policyId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4457,27 +4078,28 @@ public okhttp3.Call updatePolicyCall(String policyId, Policy policy, final ApiCa "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updatePolicyValidateBeforeCall(String policyId, Policy policy, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'policyId' is set if (policyId == null) { throw new ApiException("Missing the required parameter 'policyId' when calling updatePolicy(Async)"); } - + // verify the required parameter 'policy' is set if (policy == null) { throw new ApiException("Missing the required parameter 'policy' when calling updatePolicy(Async)"); } + - return updatePolicyCall(policyId, policy, _callback); + okhttp3.Call localVarCall = updatePolicyCall(policyId, policy, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/BranchesApi.java b/clients/java/src/main/java/io/lakefs/clients/api/BranchesApi.java index ba0b064977e..e0a1b2d73f1 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/BranchesApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/BranchesApi.java @@ -42,12 +42,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class BranchesApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public BranchesApi() { this(Configuration.getDefaultApiClient()); @@ -65,22 +62,6 @@ 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 cherryPick * @param repository (required) @@ -101,25 +82,12 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call cherryPickCall(String repository, String branch, CherryPickCreation cherryPickCreation, 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 = cherryPickCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/cherry-pick" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -139,32 +107,33 @@ public okhttp3.Call cherryPickCall(String repository, String branch, CherryPickC "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call cherryPickValidateBeforeCall(String repository, String branch, CherryPickCreation cherryPickCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling cherryPick(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling cherryPick(Async)"); } - + // verify the required parameter 'cherryPickCreation' is set if (cherryPickCreation == null) { throw new ApiException("Missing the required parameter 'cherryPickCreation' when calling cherryPick(Async)"); } + - return cherryPickCall(repository, branch, cherryPickCreation, _callback); + okhttp3.Call localVarCall = cherryPickCall(repository, branch, cherryPickCreation, _callback); + return localVarCall; } @@ -263,24 +232,11 @@ public okhttp3.Call cherryPickAsync(String repository, String branch, CherryPick */ public okhttp3.Call createBranchCall(String repository, BranchCreation branchCreation, 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 = branchCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -289,8 +245,7 @@ public okhttp3.Call createBranchCall(String repository, BranchCreation branchCre Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/html", - "application/json" + "text/html", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -301,27 +256,28 @@ public okhttp3.Call createBranchCall(String repository, BranchCreation branchCre "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createBranchValidateBeforeCall(String repository, BranchCreation branchCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling createBranch(Async)"); } - + // verify the required parameter 'branchCreation' is set if (branchCreation == null) { throw new ApiException("Missing the required parameter 'branchCreation' when calling createBranch(Async)"); } + - return createBranchCall(repository, branchCreation, _callback); + okhttp3.Call localVarCall = createBranchCall(repository, branchCreation, _callback); + return localVarCall; } @@ -416,25 +372,12 @@ public okhttp3.Call createBranchAsync(String repository, BranchCreation branchCr */ public okhttp3.Call deleteBranchCall(String repository, String branch, 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 = "/repositories/{repository}/branches/{branch}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -451,29 +394,31 @@ public okhttp3.Call deleteBranchCall(String repository, String branch, final Api } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteBranchValidateBeforeCall(String repository, String branch, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling deleteBranch(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling deleteBranch(Async)"); } + - return deleteBranchCall(repository, branch, _callback); + okhttp3.Call localVarCall = deleteBranchCall(repository, branch, _callback); + return localVarCall; } @@ -564,25 +509,12 @@ public okhttp3.Call deleteBranchAsync(String repository, String branch, final Ap */ public okhttp3.Call diffBranchCall(String repository, String branch, String after, Integer amount, String prefix, String delimiter, 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 = "/repositories/{repository}/branches/{branch}/diff" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -615,29 +547,31 @@ public okhttp3.Call diffBranchCall(String repository, String branch, String afte } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call diffBranchValidateBeforeCall(String repository, String branch, String after, Integer amount, String prefix, String delimiter, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling diffBranch(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling diffBranch(Async)"); } + - return diffBranchCall(repository, branch, after, amount, prefix, delimiter, _callback); + okhttp3.Call localVarCall = diffBranchCall(repository, branch, after, amount, prefix, delimiter, _callback); + return localVarCall; } @@ -737,25 +671,12 @@ public okhttp3.Call diffBranchAsync(String repository, String branch, String aft */ public okhttp3.Call getBranchCall(String repository, String branch, 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 = "/repositories/{repository}/branches/{branch}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -772,29 +693,31 @@ public okhttp3.Call getBranchCall(String repository, String branch, final ApiCal } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getBranchValidateBeforeCall(String repository, String branch, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getBranch(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling getBranch(Async)"); } + - return getBranchCall(repository, branch, _callback); + okhttp3.Call localVarCall = getBranchCall(repository, branch, _callback); + return localVarCall; } @@ -884,24 +807,11 @@ public okhttp3.Call getBranchAsync(String repository, String branch, final ApiCa */ public okhttp3.Call listBranchesCall(String repository, String prefix, String after, Integer amount, 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 = "/repositories/{repository}/branches" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -930,24 +840,26 @@ public okhttp3.Call listBranchesCall(String repository, String prefix, String af } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listBranchesValidateBeforeCall(String repository, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling listBranches(Async)"); } + - return listBranchesCall(repository, prefix, after, amount, _callback); + okhttp3.Call localVarCall = listBranchesCall(repository, prefix, after, amount, _callback); + return localVarCall; } @@ -1042,25 +954,12 @@ public okhttp3.Call listBranchesAsync(String repository, String prefix, String a */ public okhttp3.Call resetBranchCall(String repository, String branch, ResetCreation resetCreation, 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 = resetCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1080,32 +979,33 @@ public okhttp3.Call resetBranchCall(String repository, String branch, ResetCreat "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call resetBranchValidateBeforeCall(String repository, String branch, ResetCreation resetCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling resetBranch(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling resetBranch(Async)"); } - + // verify the required parameter 'resetCreation' is set if (resetCreation == null) { throw new ApiException("Missing the required parameter 'resetCreation' when calling resetBranch(Async)"); } + - return resetBranchCall(repository, branch, resetCreation, _callback); + okhttp3.Call localVarCall = resetBranchCall(repository, branch, resetCreation, _callback); + return localVarCall; } @@ -1195,25 +1095,12 @@ public okhttp3.Call resetBranchAsync(String repository, String branch, ResetCrea */ public okhttp3.Call revertBranchCall(String repository, String branch, RevertCreation revertCreation, 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 = revertCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/revert" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1233,32 +1120,33 @@ public okhttp3.Call revertBranchCall(String repository, String branch, RevertCre "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call revertBranchValidateBeforeCall(String repository, String branch, RevertCreation revertCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling revertBranch(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling revertBranch(Async)"); } - + // verify the required parameter 'revertCreation' is set if (revertCreation == null) { throw new ApiException("Missing the required parameter 'revertCreation' when calling revertBranch(Async)"); } + - return revertBranchCall(repository, branch, revertCreation, _callback); + okhttp3.Call localVarCall = revertBranchCall(repository, branch, revertCreation, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/CommitsApi.java b/clients/java/src/main/java/io/lakefs/clients/api/CommitsApi.java index 129505c9164..b7d6e71e6dc 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/CommitsApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/CommitsApi.java @@ -37,12 +37,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class CommitsApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public CommitsApi() { this(Configuration.getDefaultApiClient()); @@ -60,22 +57,6 @@ 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 commit * @param repository (required) @@ -98,25 +79,12 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call commitCall(String repository, String branch, CommitCreation commitCreation, String sourceMetarange, 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 = commitCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/commits" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -140,32 +108,33 @@ public okhttp3.Call commitCall(String repository, String branch, CommitCreation "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call commitValidateBeforeCall(String repository, String branch, CommitCreation commitCreation, String sourceMetarange, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling commit(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling commit(Async)"); } - + // verify the required parameter 'commitCreation' is set if (commitCreation == null) { throw new ApiException("Missing the required parameter 'commitCreation' when calling commit(Async)"); } + - return commitCall(repository, branch, commitCreation, sourceMetarange, _callback); + okhttp3.Call localVarCall = commitCall(repository, branch, commitCreation, sourceMetarange, _callback); + return localVarCall; } @@ -268,25 +237,12 @@ public okhttp3.Call commitAsync(String repository, String branch, CommitCreation */ public okhttp3.Call getCommitCall(String repository, String commitId, 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 = "/repositories/{repository}/commits/{commitId}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "commitId" + "}", localVarApiClient.escapeString(commitId.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "commitId" + "\\}", localVarApiClient.escapeString(commitId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -303,29 +259,31 @@ public okhttp3.Call getCommitCall(String repository, String commitId, final ApiC } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getCommitValidateBeforeCall(String repository, String commitId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getCommit(Async)"); } - + // verify the required parameter 'commitId' is set if (commitId == null) { throw new ApiException("Missing the required parameter 'commitId' when calling getCommit(Async)"); } + - return getCommitCall(repository, commitId, _callback); + okhttp3.Call localVarCall = getCommitCall(repository, commitId, _callback); + return localVarCall; } @@ -417,25 +375,12 @@ public okhttp3.Call getCommitAsync(String repository, String commitId, final Api */ @Deprecated public okhttp3.Call logBranchCommitsCall(String repository, String branch, String after, Integer amount, 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 = "/repositories/{repository}/branches/{branch}/commits" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -460,30 +405,32 @@ public okhttp3.Call logBranchCommitsCall(String repository, String branch, Strin } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call logBranchCommitsValidateBeforeCall(String repository, String branch, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling logBranchCommits(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling logBranchCommits(Async)"); } + - return logBranchCommitsCall(repository, branch, after, amount, _callback); + okhttp3.Call localVarCall = logBranchCommitsCall(repository, branch, after, amount, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ConfigApi.java b/clients/java/src/main/java/io/lakefs/clients/api/ConfigApi.java index b75436265f2..47adab346bd 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ConfigApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ConfigApi.java @@ -42,12 +42,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class ConfigApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public ConfigApi() { this(Configuration.getDefaultApiClient()); @@ -65,22 +62,6 @@ 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 getGarbageCollectionConfig * @param _callback Callback for upload/download progress @@ -94,19 +75,6 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call getGarbageCollectionConfigCall(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 @@ -127,19 +95,21 @@ public okhttp3.Call getGarbageCollectionConfigCall(final ApiCallback _callback) } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGarbageCollectionConfigValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getGarbageCollectionConfigCall(_callback); + + + okhttp3.Call localVarCall = getGarbageCollectionConfigCall(_callback); + return localVarCall; } @@ -211,19 +181,6 @@ public okhttp3.Call getGarbageCollectionConfigAsync(final ApiCallback */ public okhttp3.Call getLakeFSVersionCall(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 @@ -244,19 +201,21 @@ public okhttp3.Call getLakeFSVersionCall(final ApiCallback _callback) throws Api } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getLakeFSVersionValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getLakeFSVersionCall(_callback); + + + okhttp3.Call localVarCall = getLakeFSVersionCall(_callback); + return localVarCall; } @@ -328,19 +287,6 @@ public okhttp3.Call getLakeFSVersionAsync(final ApiCallback _call */ public okhttp3.Call getSetupStateCall(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 @@ -361,19 +307,21 @@ public okhttp3.Call getSetupStateCall(final ApiCallback _callback) throws ApiExc } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSetupStateValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getSetupStateCall(_callback); + + + okhttp3.Call localVarCall = getSetupStateCall(_callback); + return localVarCall; } @@ -445,19 +393,6 @@ public okhttp3.Call getSetupStateAsync(final ApiCallback _callback) */ public okhttp3.Call getStorageConfigCall(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 @@ -478,19 +413,21 @@ public okhttp3.Call getStorageConfigCall(final ApiCallback _callback) throws Api } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getStorageConfigValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getStorageConfigCall(_callback); + + + okhttp3.Call localVarCall = getStorageConfigCall(_callback); + return localVarCall; } @@ -565,19 +502,6 @@ public okhttp3.Call getStorageConfigAsync(final ApiCallback _call */ public okhttp3.Call setupCall(Setup setup, 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 = setup; // create path and map variables @@ -601,22 +525,23 @@ public okhttp3.Call setupCall(Setup setup, final ApiCallback _callback) throws A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setupValidateBeforeCall(Setup setup, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'setup' is set if (setup == null) { throw new ApiException("Missing the required parameter 'setup' when calling setup(Async)"); } + - return setupCall(setup, _callback); + okhttp3.Call localVarCall = setupCall(setup, _callback); + return localVarCall; } @@ -700,19 +625,6 @@ public okhttp3.Call setupAsync(Setup setup, final ApiCallback */ public okhttp3.Call setupCommPrefsCall(CommPrefsInput commPrefsInput, 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 = commPrefsInput; // create path and map variables @@ -736,22 +648,23 @@ public okhttp3.Call setupCommPrefsCall(CommPrefsInput commPrefsInput, final ApiC "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setupCommPrefsValidateBeforeCall(CommPrefsInput commPrefsInput, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'commPrefsInput' is set if (commPrefsInput == null) { throw new ApiException("Missing the required parameter 'commPrefsInput' when calling setupCommPrefs(Async)"); } + - return setupCommPrefsCall(commPrefsInput, _callback); + okhttp3.Call localVarCall = setupCommPrefsCall(commPrefsInput, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ExperimentalApi.java b/clients/java/src/main/java/io/lakefs/clients/api/ExperimentalApi.java index 00057b11fe8..67d2dc558c0 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ExperimentalApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ExperimentalApi.java @@ -35,12 +35,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class ExperimentalApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public ExperimentalApi() { this(Configuration.getDefaultApiClient()); @@ -58,22 +55,6 @@ 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 otfDiff * @param repository (required) @@ -95,26 +76,13 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call otfDiffCall(String repository, String leftRef, String rightRef, String tablePath, String type, 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 = "/repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "left_ref" + "}", localVarApiClient.escapeString(leftRef.toString())) - .replace("{" + "right_ref" + "}", localVarApiClient.escapeString(rightRef.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "left_ref" + "\\}", localVarApiClient.escapeString(leftRef.toString())) + .replaceAll("\\{" + "right_ref" + "\\}", localVarApiClient.escapeString(rightRef.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -139,44 +107,46 @@ public okhttp3.Call otfDiffCall(String repository, String leftRef, String rightR } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call otfDiffValidateBeforeCall(String repository, String leftRef, String rightRef, String tablePath, String type, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling otfDiff(Async)"); } - + // verify the required parameter 'leftRef' is set if (leftRef == null) { throw new ApiException("Missing the required parameter 'leftRef' when calling otfDiff(Async)"); } - + // verify the required parameter 'rightRef' is set if (rightRef == null) { throw new ApiException("Missing the required parameter 'rightRef' when calling otfDiff(Async)"); } - + // verify the required parameter 'tablePath' is set if (tablePath == null) { throw new ApiException("Missing the required parameter 'tablePath' when calling otfDiff(Async)"); } - + // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling otfDiff(Async)"); } + - return otfDiffCall(repository, leftRef, rightRef, tablePath, type, _callback); + okhttp3.Call localVarCall = otfDiffCall(repository, leftRef, rightRef, tablePath, type, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/HealthCheckApi.java b/clients/java/src/main/java/io/lakefs/clients/api/HealthCheckApi.java index 368c09ce431..c58b29fb1fa 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/HealthCheckApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/HealthCheckApi.java @@ -33,12 +33,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class HealthCheckApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public HealthCheckApi() { this(Configuration.getDefaultApiClient()); @@ -56,22 +53,6 @@ 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 healthCheck * @param _callback Callback for upload/download progress @@ -84,19 +65,6 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call healthCheckCall(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 @@ -109,6 +77,7 @@ public okhttp3.Call healthCheckCall(final ApiCallback _callback) throws ApiExcep Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -116,19 +85,21 @@ public okhttp3.Call healthCheckCall(final ApiCallback _callback) throws ApiExcep } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call healthCheckValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return healthCheckCall(_callback); + + + okhttp3.Call localVarCall = healthCheckCall(_callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ImportApi.java b/clients/java/src/main/java/io/lakefs/clients/api/ImportApi.java index 797b404443e..847b8423b2c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ImportApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ImportApi.java @@ -38,12 +38,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class ImportApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public ImportApi() { this(Configuration.getDefaultApiClient()); @@ -61,22 +58,6 @@ 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 createMetaRange * @param repository (required) @@ -96,24 +77,11 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call createMetaRangeCall(String repository, MetaRangeCreation metaRangeCreation, 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 = metaRangeCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/metaranges" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -133,27 +101,28 @@ public okhttp3.Call createMetaRangeCall(String repository, MetaRangeCreation met "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createMetaRangeValidateBeforeCall(String repository, MetaRangeCreation metaRangeCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling createMetaRange(Async)"); } - + // verify the required parameter 'metaRangeCreation' is set if (metaRangeCreation == null) { throw new ApiException("Missing the required parameter 'metaRangeCreation' when calling createMetaRange(Async)"); } + - return createMetaRangeCall(repository, metaRangeCreation, _callback); + okhttp3.Call localVarCall = createMetaRangeCall(repository, metaRangeCreation, _callback); + return localVarCall; } @@ -248,24 +217,11 @@ public okhttp3.Call createMetaRangeAsync(String repository, MetaRangeCreation me */ public okhttp3.Call ingestRangeCall(String repository, StageRangeCreation stageRangeCreation, 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 = stageRangeCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/ranges" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -285,27 +241,28 @@ public okhttp3.Call ingestRangeCall(String repository, StageRangeCreation stageR "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call ingestRangeValidateBeforeCall(String repository, StageRangeCreation stageRangeCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling ingestRange(Async)"); } - + // verify the required parameter 'stageRangeCreation' is set if (stageRangeCreation == null) { throw new ApiException("Missing the required parameter 'stageRangeCreation' when calling ingestRange(Async)"); } + - return ingestRangeCall(repository, stageRangeCreation, _callback); + okhttp3.Call localVarCall = ingestRangeCall(repository, stageRangeCreation, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/JSON.java b/clients/java/src/main/java/io/lakefs/clients/api/JSON.java index c2b1c8bb6a5..d88199b0a38 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/JSON.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/JSON.java @@ -23,7 +23,11 @@ import com.google.gson.JsonElement; import io.gsonfire.GsonFireBuilder; import io.gsonfire.TypeSelector; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.format.DateTimeFormatter; +import io.lakefs.clients.api.model.*; import okio.ByteString; import java.io.IOException; @@ -32,28 +36,19 @@ import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.Locale; import java.util.Map; import java.util.HashMap; -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + private Gson gson; + private boolean isLenientOnJson = false; + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); @SuppressWarnings("unchecked") public static GsonBuilder createGson() { @@ -86,96 +81,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri return clazz; } - { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.AccessKeyCredentials.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ActionRun.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ActionRunList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.AuthCapabilities.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.AuthenticationToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.BranchCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.BranchProtectionRule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.CherryPickCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.CommPrefsInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Commit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.CommitCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.CommitList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Credentials.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.CredentialsList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.CredentialsWithSecret.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.CurrentUser.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.DeleteBranchProtectionRuleRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Diff.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.DiffList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Error.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.FindMergeBaseResult.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ForgotPasswordRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.GarbageCollectionConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.GarbageCollectionPrepareRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.GarbageCollectionPrepareResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.GarbageCollectionRule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.GarbageCollectionRules.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Group.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.GroupCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.GroupList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.HookRun.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.HookRunList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ImportPagination.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.IngestRangeCreationResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.LoginConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.LoginInformation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Merge.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.MergeResult.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.MergeResultSummary.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.MetaRangeCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.MetaRangeCreationResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.NextStep.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ObjectCopyCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ObjectError.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ObjectErrorList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ObjectStageCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ObjectStats.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ObjectStatsList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.OtfDiffEntry.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.OtfDiffList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Pagination.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.PathList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Policy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.PolicyList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.PrepareGCUncommittedRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.PrepareGCUncommittedResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.RangeMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Ref.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.RefList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.RefsDump.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Repository.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.RepositoryCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.RepositoryList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.ResetCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.RevertCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Setup.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.SetupState.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.StageRangeCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.StagingLocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.StagingMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.Statement.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.StatsEvent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.StatsEventsList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.StorageConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.StorageURI.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.TagCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.UnderlyingObjectProperties.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.UpdatePasswordByToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.User.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.UserCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.UserList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new io.lakefs.clients.api.model.VersionConfig.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); + public JSON() { + gson = createGson() + .registerTypeAdapter(Date.class, dateTypeAdapter) + .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) + .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + .registerTypeAdapter(byte[].class, byteArrayAdapter) + .create(); } /** @@ -183,7 +96,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri * * @return Gson */ - public static Gson getGson() { + public Gson getGson() { return gson; } @@ -191,13 +104,16 @@ public static Gson getGson() { * Set Gson. * * @param gson Gson + * @return JSON */ - public static void setGson(Gson gson) { - JSON.gson = gson; + public JSON setGson(Gson gson) { + this.gson = gson; + return this; } - public static void setLenientOnJson(boolean lenientOnJson) { + public JSON setLenientOnJson(boolean lenientOnJson) { isLenientOnJson = lenientOnJson; + return this; } /** @@ -206,7 +122,7 @@ public static void setLenientOnJson(boolean lenientOnJson) { * @param obj Object * @return String representation of the JSON */ - public static String serialize(Object obj) { + public String serialize(Object obj) { return gson.toJson(obj); } @@ -219,7 +135,7 @@ public static String serialize(Object obj) { * @return The deserialized Java object */ @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { + public T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { JsonReader jsonReader = new JsonReader(new StringReader(body)); @@ -243,7 +159,7 @@ public static T deserialize(String body, Type returnType) { /** * Gson TypeAdapter for Byte Array type */ - public static class ByteArrayAdapter extends TypeAdapter { + public class ByteArrayAdapter extends TypeAdapter { @Override public void write(JsonWriter out, byte[] value) throws IOException { @@ -315,7 +231,7 @@ public OffsetDateTime read(JsonReader in) throws IOException { /** * Gson TypeAdapter for JSR310 LocalDate type */ - public static class LocalDateTypeAdapter extends TypeAdapter { + public class LocalDateTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -353,12 +269,14 @@ public LocalDate read(JsonReader in) throws IOException { } } - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { offsetDateTimeTypeAdapter.setFormat(dateFormat); + return this; } - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { localDateTypeAdapter.setFormat(dateFormat); + return this; } /** @@ -472,11 +390,14 @@ public Date read(JsonReader in) throws IOException { } } - public static void setDateFormat(DateFormat dateFormat) { + public JSON setDateFormat(DateFormat dateFormat) { dateTypeAdapter.setFormat(dateFormat); + return this; } - public static void setSqlDateFormat(DateFormat dateFormat) { + public JSON setSqlDateFormat(DateFormat dateFormat) { sqlDateTypeAdapter.setFormat(dateFormat); + return this; } + } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/MetadataApi.java b/clients/java/src/main/java/io/lakefs/clients/api/MetadataApi.java index 7c77e0369cc..0985c15a17b 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/MetadataApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/MetadataApi.java @@ -35,12 +35,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class MetadataApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public MetadataApi() { this(Configuration.getDefaultApiClient()); @@ -58,22 +55,6 @@ 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 createSymlinkFile * @param repository (required) @@ -92,25 +73,12 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call createSymlinkFileCall(String repository, String branch, String location, 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 = "/repositories/{repository}/refs/{branch}/symlink" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -131,29 +99,31 @@ public okhttp3.Call createSymlinkFileCall(String repository, String branch, Stri } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createSymlinkFileValidateBeforeCall(String repository, String branch, String location, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling createSymlinkFile(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling createSymlinkFile(Async)"); } + - return createSymlinkFileCall(repository, branch, location, _callback); + okhttp3.Call localVarCall = createSymlinkFileCall(repository, branch, location, _callback); + return localVarCall; } @@ -244,25 +214,12 @@ public okhttp3.Call createSymlinkFileAsync(String repository, String branch, Str */ public okhttp3.Call getMetaRangeCall(String repository, String metaRange, 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 = "/repositories/{repository}/metadata/meta_range/{meta_range}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "meta_range" + "}", localVarApiClient.escapeString(metaRange.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "meta_range" + "\\}", localVarApiClient.escapeString(metaRange.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -279,29 +236,31 @@ public okhttp3.Call getMetaRangeCall(String repository, String metaRange, final } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getMetaRangeValidateBeforeCall(String repository, String metaRange, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getMetaRange(Async)"); } - + // verify the required parameter 'metaRange' is set if (metaRange == null) { throw new ApiException("Missing the required parameter 'metaRange' when calling getMetaRange(Async)"); } + - return getMetaRangeCall(repository, metaRange, _callback); + okhttp3.Call localVarCall = getMetaRangeCall(repository, metaRange, _callback); + return localVarCall; } @@ -389,25 +348,12 @@ public okhttp3.Call getMetaRangeAsync(String repository, String metaRange, final */ public okhttp3.Call getRangeCall(String repository, String range, 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 = "/repositories/{repository}/metadata/range/{range}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "range" + "}", localVarApiClient.escapeString(range.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "range" + "\\}", localVarApiClient.escapeString(range.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -424,29 +370,31 @@ public okhttp3.Call getRangeCall(String repository, String range, final ApiCallb } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRangeValidateBeforeCall(String repository, String range, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getRange(Async)"); } - + // verify the required parameter 'range' is set if (range == null) { throw new ApiException("Missing the required parameter 'range' when calling getRange(Async)"); } + - return getRangeCall(repository, range, _callback); + okhttp3.Call localVarCall = getRangeCall(repository, range, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ObjectsApi.java b/clients/java/src/main/java/io/lakefs/clients/api/ObjectsApi.java index 78416c48393..3b5e726106c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ObjectsApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ObjectsApi.java @@ -42,12 +42,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class ObjectsApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public ObjectsApi() { this(Configuration.getDefaultApiClient()); @@ -65,22 +62,6 @@ 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 copyObject * @param repository (required) @@ -101,25 +82,12 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call copyObjectCall(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation, 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 = objectCopyCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/objects/copy" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -143,37 +111,38 @@ public okhttp3.Call copyObjectCall(String repository, String branch, String dest "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call copyObjectValidateBeforeCall(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling copyObject(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling copyObject(Async)"); } - + // verify the required parameter 'destPath' is set if (destPath == null) { throw new ApiException("Missing the required parameter 'destPath' when calling copyObject(Async)"); } - + // verify the required parameter 'objectCopyCreation' is set if (objectCopyCreation == null) { throw new ApiException("Missing the required parameter 'objectCopyCreation' when calling copyObject(Async)"); } + - return copyObjectCall(repository, branch, destPath, objectCopyCreation, _callback); + okhttp3.Call localVarCall = copyObjectCall(repository, branch, destPath, objectCopyCreation, _callback); + return localVarCall; } @@ -272,25 +241,12 @@ public okhttp3.Call copyObjectAsync(String repository, String branch, String des */ public okhttp3.Call deleteObjectCall(String repository, String branch, String path, 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 = "/repositories/{repository}/branches/{branch}/objects" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -311,34 +267,36 @@ public okhttp3.Call deleteObjectCall(String repository, String branch, String pa } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteObjectValidateBeforeCall(String repository, String branch, String path, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling deleteObject(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling deleteObject(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling deleteObject(Async)"); } + - return deleteObjectCall(repository, branch, path, _callback); + okhttp3.Call localVarCall = deleteObjectCall(repository, branch, path, _callback); + return localVarCall; } @@ -430,25 +388,12 @@ public okhttp3.Call deleteObjectAsync(String repository, String branch, String p */ public okhttp3.Call deleteObjectsCall(String repository, String branch, PathList pathList, 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 = pathList; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/objects/delete" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -468,32 +413,33 @@ public okhttp3.Call deleteObjectsCall(String repository, String branch, PathList "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteObjectsValidateBeforeCall(String repository, String branch, PathList pathList, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling deleteObjects(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling deleteObjects(Async)"); } - + // verify the required parameter 'pathList' is set if (pathList == null) { throw new ApiException("Missing the required parameter 'pathList' when calling deleteObjects(Async)"); } + - return deleteObjectsCall(repository, branch, pathList, _callback); + okhttp3.Call localVarCall = deleteObjectsCall(repository, branch, pathList, _callback); + return localVarCall; } @@ -594,25 +540,12 @@ public okhttp3.Call deleteObjectsAsync(String repository, String branch, PathLis */ public okhttp3.Call getObjectCall(String repository, String ref, String path, String range, Boolean presign, 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 = "/repositories/{repository}/refs/{ref}/objects" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "ref" + "}", localVarApiClient.escapeString(ref.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "ref" + "\\}", localVarApiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -633,8 +566,7 @@ public okhttp3.Call getObjectCall(String repository, String ref, String path, St } final String[] localVarAccepts = { - "application/octet-stream", - "application/json" + "application/octet-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -642,34 +574,36 @@ public okhttp3.Call getObjectCall(String repository, String ref, String path, St } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getObjectValidateBeforeCall(String repository, String ref, String path, String range, Boolean presign, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getObject(Async)"); } - + // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling getObject(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling getObject(Async)"); } + - return getObjectCall(repository, ref, path, range, presign, _callback); + okhttp3.Call localVarCall = getObjectCall(repository, ref, path, range, presign, _callback); + return localVarCall; } @@ -779,25 +713,12 @@ public okhttp3.Call getObjectAsync(String repository, String ref, String path, S */ public okhttp3.Call getUnderlyingPropertiesCall(String repository, String ref, String path, 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 = "/repositories/{repository}/refs/{ref}/objects/underlyingProperties" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "ref" + "}", localVarApiClient.escapeString(ref.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "ref" + "\\}", localVarApiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -818,34 +739,36 @@ public okhttp3.Call getUnderlyingPropertiesCall(String repository, String ref, S } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getUnderlyingPropertiesValidateBeforeCall(String repository, String ref, String path, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getUnderlyingProperties(Async)"); } - + // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling getUnderlyingProperties(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling getUnderlyingProperties(Async)"); } + - return getUnderlyingPropertiesCall(repository, ref, path, _callback); + okhttp3.Call localVarCall = getUnderlyingPropertiesCall(repository, ref, path, _callback); + return localVarCall; } @@ -941,25 +864,12 @@ public okhttp3.Call getUnderlyingPropertiesAsync(String repository, String ref, */ public okhttp3.Call headObjectCall(String repository, String ref, String path, String range, 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 = "/repositories/{repository}/refs/{ref}/objects" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "ref" + "}", localVarApiClient.escapeString(ref.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "ref" + "\\}", localVarApiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -976,6 +886,7 @@ public okhttp3.Call headObjectCall(String repository, String ref, String path, S } final String[] localVarAccepts = { + }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -983,34 +894,36 @@ public okhttp3.Call headObjectCall(String repository, String ref, String path, S } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "HEAD", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "HEAD", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call headObjectValidateBeforeCall(String repository, String ref, String path, String range, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling headObject(Async)"); } - + // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling headObject(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling headObject(Async)"); } + - return headObjectCall(repository, ref, path, range, _callback); + okhttp3.Call localVarCall = headObjectCall(repository, ref, path, range, _callback); + return localVarCall; } @@ -1115,25 +1028,12 @@ public okhttp3.Call headObjectAsync(String repository, String ref, String path, */ public okhttp3.Call listObjectsCall(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix, 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 = "/repositories/{repository}/refs/{ref}/objects/ls" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "ref" + "}", localVarApiClient.escapeString(ref.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "ref" + "\\}", localVarApiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1174,29 +1074,31 @@ public okhttp3.Call listObjectsCall(String repository, String ref, Boolean userM } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listObjectsValidateBeforeCall(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling listObjects(Async)"); } - + // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling listObjects(Async)"); } + - return listObjectsCall(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, _callback); + okhttp3.Call localVarCall = listObjectsCall(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, _callback); + return localVarCall; } @@ -1306,25 +1208,12 @@ public okhttp3.Call listObjectsAsync(String repository, String ref, Boolean user */ public okhttp3.Call stageObjectCall(String repository, String branch, String path, ObjectStageCreation objectStageCreation, 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 = objectStageCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/objects" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1348,37 +1237,38 @@ public okhttp3.Call stageObjectCall(String repository, String branch, String pat "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call stageObjectValidateBeforeCall(String repository, String branch, String path, ObjectStageCreation objectStageCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling stageObject(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling stageObject(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling stageObject(Async)"); } - + // verify the required parameter 'objectStageCreation' is set if (objectStageCreation == null) { throw new ApiException("Missing the required parameter 'objectStageCreation' when calling stageObject(Async)"); } + - return stageObjectCall(repository, branch, path, objectStageCreation, _callback); + okhttp3.Call localVarCall = stageObjectCall(repository, branch, path, objectStageCreation, _callback); + return localVarCall; } @@ -1482,25 +1372,12 @@ public okhttp3.Call stageObjectAsync(String repository, String branch, String pa */ public okhttp3.Call statObjectCall(String repository, String ref, String path, Boolean userMetadata, Boolean presign, 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 = "/repositories/{repository}/refs/{ref}/objects/stat" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "ref" + "}", localVarApiClient.escapeString(ref.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "ref" + "\\}", localVarApiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1529,34 +1406,36 @@ public okhttp3.Call statObjectCall(String repository, String ref, String path, B } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call statObjectValidateBeforeCall(String repository, String ref, String path, Boolean userMetadata, Boolean presign, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling statObject(Async)"); } - + // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling statObject(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling statObject(Async)"); } + - return statObjectCall(repository, ref, path, userMetadata, presign, _callback); + okhttp3.Call localVarCall = statObjectCall(repository, ref, path, userMetadata, presign, _callback); + return localVarCall; } @@ -1663,25 +1542,12 @@ public okhttp3.Call statObjectAsync(String repository, String ref, String path, */ public okhttp3.Call uploadObjectCall(String repository, String branch, String path, String storageClass, String ifNoneMatch, File content, 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 = "/repositories/{repository}/branches/{branch}/objects" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1717,32 +1583,33 @@ public okhttp3.Call uploadObjectCall(String repository, String branch, String pa "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call uploadObjectValidateBeforeCall(String repository, String branch, String path, String storageClass, String ifNoneMatch, File content, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling uploadObject(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling uploadObject(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling uploadObject(Async)"); } + - return uploadObjectCall(repository, branch, path, storageClass, ifNoneMatch, content, _callback); + okhttp3.Call localVarCall = uploadObjectCall(repository, branch, path, storageClass, ifNoneMatch, content, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/OtfDiffApi.java b/clients/java/src/main/java/io/lakefs/clients/api/OtfDiffApi.java index f02a6e52884..f3db7f518b3 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/OtfDiffApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/OtfDiffApi.java @@ -35,12 +35,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class OtfDiffApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public OtfDiffApi() { this(Configuration.getDefaultApiClient()); @@ -58,22 +55,6 @@ 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 otfDiff * @param repository (required) @@ -95,26 +76,13 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call otfDiffCall(String repository, String leftRef, String rightRef, String tablePath, String type, 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 = "/repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "left_ref" + "}", localVarApiClient.escapeString(leftRef.toString())) - .replace("{" + "right_ref" + "}", localVarApiClient.escapeString(rightRef.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "left_ref" + "\\}", localVarApiClient.escapeString(leftRef.toString())) + .replaceAll("\\{" + "right_ref" + "\\}", localVarApiClient.escapeString(rightRef.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -139,44 +107,46 @@ public okhttp3.Call otfDiffCall(String repository, String leftRef, String rightR } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call otfDiffValidateBeforeCall(String repository, String leftRef, String rightRef, String tablePath, String type, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling otfDiff(Async)"); } - + // verify the required parameter 'leftRef' is set if (leftRef == null) { throw new ApiException("Missing the required parameter 'leftRef' when calling otfDiff(Async)"); } - + // verify the required parameter 'rightRef' is set if (rightRef == null) { throw new ApiException("Missing the required parameter 'rightRef' when calling otfDiff(Async)"); } - + // verify the required parameter 'tablePath' is set if (tablePath == null) { throw new ApiException("Missing the required parameter 'tablePath' when calling otfDiff(Async)"); } - + // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling otfDiff(Async)"); } + - return otfDiffCall(repository, leftRef, rightRef, tablePath, type, _callback); + okhttp3.Call localVarCall = otfDiffCall(repository, leftRef, rightRef, tablePath, type, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/Pair.java b/clients/java/src/main/java/io/lakefs/clients/api/Pair.java index e2f86e815fb..a3d7a854041 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/Pair.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/Pair.java @@ -52,6 +52,10 @@ private boolean isValidString(String arg) { return false; } + if (arg.trim().isEmpty()) { + return false; + } + return true; } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/RefsApi.java b/clients/java/src/main/java/io/lakefs/clients/api/RefsApi.java index 3bb217d7ea1..4d7bf96c8e0 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/RefsApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/RefsApi.java @@ -40,12 +40,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class RefsApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public RefsApi() { this(Configuration.getDefaultApiClient()); @@ -63,22 +60,6 @@ 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 diffRefs * @param repository (required) @@ -102,26 +83,13 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call diffRefsCall(String repository, String leftRef, String rightRef, String after, Integer amount, String prefix, String delimiter, String type, 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 = "/repositories/{repository}/refs/{leftRef}/diff/{rightRef}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "leftRef" + "}", localVarApiClient.escapeString(leftRef.toString())) - .replace("{" + "rightRef" + "}", localVarApiClient.escapeString(rightRef.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "leftRef" + "\\}", localVarApiClient.escapeString(leftRef.toString())) + .replaceAll("\\{" + "rightRef" + "\\}", localVarApiClient.escapeString(rightRef.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -158,34 +126,36 @@ public okhttp3.Call diffRefsCall(String repository, String leftRef, String right } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call diffRefsValidateBeforeCall(String repository, String leftRef, String rightRef, String after, Integer amount, String prefix, String delimiter, String type, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling diffRefs(Async)"); } - + // verify the required parameter 'leftRef' is set if (leftRef == null) { throw new ApiException("Missing the required parameter 'leftRef' when calling diffRefs(Async)"); } - + // verify the required parameter 'rightRef' is set if (rightRef == null) { throw new ApiException("Missing the required parameter 'rightRef' when calling diffRefs(Async)"); } + - return diffRefsCall(repository, leftRef, rightRef, after, amount, prefix, delimiter, type, _callback); + okhttp3.Call localVarCall = diffRefsCall(repository, leftRef, rightRef, after, amount, prefix, delimiter, type, _callback); + return localVarCall; } @@ -291,24 +261,11 @@ public okhttp3.Call diffRefsAsync(String repository, String leftRef, String righ */ public okhttp3.Call dumpRefsCall(String repository, 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 = "/repositories/{repository}/refs/dump" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -325,24 +282,26 @@ public okhttp3.Call dumpRefsCall(String repository, final ApiCallback _callback) } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call dumpRefsValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling dumpRefs(Async)"); } + - return dumpRefsCall(repository, _callback); + okhttp3.Call localVarCall = dumpRefsCall(repository, _callback); + return localVarCall; } @@ -432,26 +391,13 @@ public okhttp3.Call dumpRefsAsync(String repository, final ApiCallback */ public okhttp3.Call findMergeBaseCall(String repository, String sourceRef, String destinationBranch, 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 = "/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "sourceRef" + "}", localVarApiClient.escapeString(sourceRef.toString())) - .replace("{" + "destinationBranch" + "}", localVarApiClient.escapeString(destinationBranch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "sourceRef" + "\\}", localVarApiClient.escapeString(sourceRef.toString())) + .replaceAll("\\{" + "destinationBranch" + "\\}", localVarApiClient.escapeString(destinationBranch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -468,34 +414,36 @@ public okhttp3.Call findMergeBaseCall(String repository, String sourceRef, Strin } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call findMergeBaseValidateBeforeCall(String repository, String sourceRef, String destinationBranch, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling findMergeBase(Async)"); } - + // verify the required parameter 'sourceRef' is set if (sourceRef == null) { throw new ApiException("Missing the required parameter 'sourceRef' when calling findMergeBase(Async)"); } - + // verify the required parameter 'destinationBranch' is set if (destinationBranch == null) { throw new ApiException("Missing the required parameter 'destinationBranch' when calling findMergeBase(Async)"); } + - return findMergeBaseCall(repository, sourceRef, destinationBranch, _callback); + okhttp3.Call localVarCall = findMergeBaseCall(repository, sourceRef, destinationBranch, _callback); + return localVarCall; } @@ -594,25 +542,12 @@ public okhttp3.Call findMergeBaseAsync(String repository, String sourceRef, Stri */ public okhttp3.Call logCommitsCall(String repository, String ref, String after, Integer amount, List objects, List prefixes, Boolean limit, 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 = "/repositories/{repository}/refs/{ref}/commits" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "ref" + "}", localVarApiClient.escapeString(ref.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "ref" + "\\}", localVarApiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -649,29 +584,31 @@ public okhttp3.Call logCommitsCall(String repository, String ref, String after, } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call logCommitsValidateBeforeCall(String repository, String ref, String after, Integer amount, List objects, List prefixes, Boolean limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling logCommits(Async)"); } - + // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling logCommits(Async)"); } + - return logCommitsCall(repository, ref, after, amount, objects, prefixes, limit, _callback); + okhttp3.Call localVarCall = logCommitsCall(repository, ref, after, amount, objects, prefixes, limit, _callback); + return localVarCall; } @@ -780,26 +717,13 @@ public okhttp3.Call logCommitsAsync(String repository, String ref, String after, */ public okhttp3.Call mergeIntoBranchCall(String repository, String sourceRef, String destinationBranch, Merge merge, 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 = merge; // create path and map variables String localVarPath = "/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "sourceRef" + "}", localVarApiClient.escapeString(sourceRef.toString())) - .replace("{" + "destinationBranch" + "}", localVarApiClient.escapeString(destinationBranch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "sourceRef" + "\\}", localVarApiClient.escapeString(sourceRef.toString())) + .replaceAll("\\{" + "destinationBranch" + "\\}", localVarApiClient.escapeString(destinationBranch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -819,32 +743,33 @@ public okhttp3.Call mergeIntoBranchCall(String repository, String sourceRef, Str "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call mergeIntoBranchValidateBeforeCall(String repository, String sourceRef, String destinationBranch, Merge merge, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling mergeIntoBranch(Async)"); } - + // verify the required parameter 'sourceRef' is set if (sourceRef == null) { throw new ApiException("Missing the required parameter 'sourceRef' when calling mergeIntoBranch(Async)"); } - + // verify the required parameter 'destinationBranch' is set if (destinationBranch == null) { throw new ApiException("Missing the required parameter 'destinationBranch' when calling mergeIntoBranch(Async)"); } + - return mergeIntoBranchCall(repository, sourceRef, destinationBranch, merge, _callback); + okhttp3.Call localVarCall = mergeIntoBranchCall(repository, sourceRef, destinationBranch, merge, _callback); + return localVarCall; } @@ -951,24 +876,11 @@ public okhttp3.Call mergeIntoBranchAsync(String repository, String sourceRef, St */ public okhttp3.Call restoreRefsCall(String repository, RefsDump refsDump, 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 = refsDump; // create path and map variables String localVarPath = "/repositories/{repository}/refs/restore" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -988,27 +900,28 @@ public okhttp3.Call restoreRefsCall(String repository, RefsDump refsDump, final "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call restoreRefsValidateBeforeCall(String repository, RefsDump refsDump, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling restoreRefs(Async)"); } - + // verify the required parameter 'refsDump' is set if (refsDump == null) { throw new ApiException("Missing the required parameter 'refsDump' when calling restoreRefs(Async)"); } + - return restoreRefsCall(repository, refsDump, _callback); + okhttp3.Call localVarCall = restoreRefsCall(repository, refsDump, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/RepositoriesApi.java b/clients/java/src/main/java/io/lakefs/clients/api/RepositoriesApi.java index f263ae68ee7..a6969f3af59 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/RepositoriesApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/RepositoriesApi.java @@ -28,8 +28,8 @@ import io.lakefs.clients.api.model.BranchProtectionRule; -import io.lakefs.clients.api.model.DeleteBranchProtectionRuleRequest; import io.lakefs.clients.api.model.Error; +import io.lakefs.clients.api.model.InlineObject1; import io.lakefs.clients.api.model.Repository; import io.lakefs.clients.api.model.RepositoryCreation; import io.lakefs.clients.api.model.RepositoryList; @@ -39,12 +39,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class RepositoriesApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public RepositoriesApi() { this(Configuration.getDefaultApiClient()); @@ -62,22 +59,6 @@ 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 createBranchProtectionRule * @param repository (required) @@ -95,24 +76,11 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call createBranchProtectionRuleCall(String repository, BranchProtectionRule branchProtectionRule, 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 = branchProtectionRule; // create path and map variables String localVarPath = "/repositories/{repository}/branch_protection" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -132,27 +100,28 @@ public okhttp3.Call createBranchProtectionRuleCall(String repository, BranchProt "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createBranchProtectionRuleValidateBeforeCall(String repository, BranchProtectionRule branchProtectionRule, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling createBranchProtectionRule(Async)"); } - + // verify the required parameter 'branchProtectionRule' is set if (branchProtectionRule == null) { throw new ApiException("Missing the required parameter 'branchProtectionRule' when calling createBranchProtectionRule(Async)"); } + - return createBranchProtectionRuleCall(repository, branchProtectionRule, _callback); + okhttp3.Call localVarCall = createBranchProtectionRuleCall(repository, branchProtectionRule, _callback); + return localVarCall; } @@ -237,19 +206,6 @@ public okhttp3.Call createBranchProtectionRuleAsync(String repository, BranchPro */ public okhttp3.Call createRepositoryCall(RepositoryCreation repositoryCreation, Boolean bare, 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 = repositoryCreation; // create path and map variables @@ -277,22 +233,23 @@ public okhttp3.Call createRepositoryCall(RepositoryCreation repositoryCreation, "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createRepositoryValidateBeforeCall(RepositoryCreation repositoryCreation, Boolean bare, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repositoryCreation' is set if (repositoryCreation == null) { throw new ApiException("Missing the required parameter 'repositoryCreation' when calling createRepository(Async)"); } + - return createRepositoryCall(repositoryCreation, bare, _callback); + okhttp3.Call localVarCall = createRepositoryCall(repositoryCreation, bare, _callback); + return localVarCall; } @@ -369,7 +326,7 @@ public okhttp3.Call createRepositoryAsync(RepositoryCreation repositoryCreation, /** * Build call for deleteBranchProtectionRule * @param repository (required) - * @param deleteBranchProtectionRuleRequest (required) + * @param inlineObject1 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -382,25 +339,12 @@ public okhttp3.Call createRepositoryAsync(RepositoryCreation repositoryCreation, 0 Internal Server Error - */ - public okhttp3.Call deleteBranchProtectionRuleCall(String repository, DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest, 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 = deleteBranchProtectionRuleRequest; + public okhttp3.Call deleteBranchProtectionRuleCall(String repository, InlineObject1 inlineObject1, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = inlineObject1; // create path and map variables String localVarPath = "/repositories/{repository}/branch_protection" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -420,27 +364,28 @@ public okhttp3.Call deleteBranchProtectionRuleCall(String repository, DeleteBran "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteBranchProtectionRuleValidateBeforeCall(String repository, DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteBranchProtectionRuleValidateBeforeCall(String repository, InlineObject1 inlineObject1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling deleteBranchProtectionRule(Async)"); } - - // verify the required parameter 'deleteBranchProtectionRuleRequest' is set - if (deleteBranchProtectionRuleRequest == null) { - throw new ApiException("Missing the required parameter 'deleteBranchProtectionRuleRequest' when calling deleteBranchProtectionRule(Async)"); + + // verify the required parameter 'inlineObject1' is set + if (inlineObject1 == null) { + throw new ApiException("Missing the required parameter 'inlineObject1' when calling deleteBranchProtectionRule(Async)"); } + - return deleteBranchProtectionRuleCall(repository, deleteBranchProtectionRuleRequest, _callback); + okhttp3.Call localVarCall = deleteBranchProtectionRuleCall(repository, inlineObject1, _callback); + return localVarCall; } @@ -448,7 +393,7 @@ private okhttp3.Call deleteBranchProtectionRuleValidateBeforeCall(String reposit * * * @param repository (required) - * @param deleteBranchProtectionRuleRequest (required) + * @param inlineObject1 (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -459,15 +404,15 @@ private okhttp3.Call deleteBranchProtectionRuleValidateBeforeCall(String reposit
0 Internal Server Error -
*/ - public void deleteBranchProtectionRule(String repository, DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest) throws ApiException { - deleteBranchProtectionRuleWithHttpInfo(repository, deleteBranchProtectionRuleRequest); + public void deleteBranchProtectionRule(String repository, InlineObject1 inlineObject1) throws ApiException { + deleteBranchProtectionRuleWithHttpInfo(repository, inlineObject1); } /** * * * @param repository (required) - * @param deleteBranchProtectionRuleRequest (required) + * @param inlineObject1 (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 @@ -479,8 +424,8 @@ public void deleteBranchProtectionRule(String repository, DeleteBranchProtection 0 Internal Server Error - */ - public ApiResponse deleteBranchProtectionRuleWithHttpInfo(String repository, DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest) throws ApiException { - okhttp3.Call localVarCall = deleteBranchProtectionRuleValidateBeforeCall(repository, deleteBranchProtectionRuleRequest, null); + public ApiResponse deleteBranchProtectionRuleWithHttpInfo(String repository, InlineObject1 inlineObject1) throws ApiException { + okhttp3.Call localVarCall = deleteBranchProtectionRuleValidateBeforeCall(repository, inlineObject1, null); return localVarApiClient.execute(localVarCall); } @@ -488,7 +433,7 @@ public ApiResponse deleteBranchProtectionRuleWithHttpInfo(String repositor * (asynchronously) * * @param repository (required) - * @param deleteBranchProtectionRuleRequest (required) + * @param inlineObject1 (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 @@ -501,9 +446,9 @@ public ApiResponse deleteBranchProtectionRuleWithHttpInfo(String repositor 0 Internal Server Error - */ - public okhttp3.Call deleteBranchProtectionRuleAsync(String repository, DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteBranchProtectionRuleAsync(String repository, InlineObject1 inlineObject1, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteBranchProtectionRuleValidateBeforeCall(repository, deleteBranchProtectionRuleRequest, _callback); + okhttp3.Call localVarCall = deleteBranchProtectionRuleValidateBeforeCall(repository, inlineObject1, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } @@ -523,24 +468,11 @@ public okhttp3.Call deleteBranchProtectionRuleAsync(String repository, DeleteBra */ public okhttp3.Call deleteRepositoryCall(String repository, 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 = "/repositories/{repository}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -557,24 +489,26 @@ public okhttp3.Call deleteRepositoryCall(String repository, final ApiCallback _c } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteRepositoryValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling deleteRepository(Async)"); } + - return deleteRepositoryCall(repository, _callback); + okhttp3.Call localVarCall = deleteRepositoryCall(repository, _callback); + return localVarCall; } @@ -654,24 +588,11 @@ public okhttp3.Call deleteRepositoryAsync(String repository, final ApiCallback */ public okhttp3.Call getBranchProtectionRulesCall(String repository, 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 = "/repositories/{repository}/branch_protection" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -688,24 +609,26 @@ public okhttp3.Call getBranchProtectionRulesCall(String repository, final ApiCal } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getBranchProtectionRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getBranchProtectionRules(Async)"); } + - return getBranchProtectionRulesCall(repository, _callback); + okhttp3.Call localVarCall = getBranchProtectionRulesCall(repository, _callback); + return localVarCall; } @@ -789,24 +712,11 @@ public okhttp3.Call getBranchProtectionRulesAsync(String repository, final ApiCa */ public okhttp3.Call getRepositoryCall(String repository, 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 = "/repositories/{repository}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -823,24 +733,26 @@ public okhttp3.Call getRepositoryCall(String repository, final ApiCallback _call } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRepositoryValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getRepository(Async)"); } + - return getRepositoryCall(repository, _callback); + okhttp3.Call localVarCall = getRepositoryCall(repository, _callback); + return localVarCall; } @@ -925,19 +837,6 @@ public okhttp3.Call getRepositoryAsync(String repository, final ApiCallback */ public okhttp3.Call listRepositoriesCall(String prefix, String after, Integer amount, 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 @@ -970,19 +869,21 @@ public okhttp3.Call listRepositoriesCall(String prefix, String after, Integer am } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listRepositoriesValidateBeforeCall(String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { - return listRepositoriesCall(prefix, after, amount, _callback); + + + okhttp3.Call localVarCall = listRepositoriesCall(prefix, after, amount, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/RetentionApi.java b/clients/java/src/main/java/io/lakefs/clients/api/RetentionApi.java index 8cd3497c980..0eeab6924cc 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/RetentionApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/RetentionApi.java @@ -39,12 +39,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class RetentionApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public RetentionApi() { this(Configuration.getDefaultApiClient()); @@ -62,22 +59,6 @@ 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 deleteGarbageCollectionRules * @param repository (required) @@ -94,24 +75,11 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call deleteGarbageCollectionRulesCall(String repository, 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 = "/repositories/{repository}/gc/rules" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -128,24 +96,26 @@ public okhttp3.Call deleteGarbageCollectionRulesCall(String repository, final Ap } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteGarbageCollectionRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling deleteGarbageCollectionRules(Async)"); } + - return deleteGarbageCollectionRulesCall(repository, _callback); + okhttp3.Call localVarCall = deleteGarbageCollectionRulesCall(repository, _callback); + return localVarCall; } @@ -225,24 +195,11 @@ public okhttp3.Call deleteGarbageCollectionRulesAsync(String repository, final A */ public okhttp3.Call getGarbageCollectionRulesCall(String repository, 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 = "/repositories/{repository}/gc/rules" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -259,24 +216,26 @@ public okhttp3.Call getGarbageCollectionRulesCall(String repository, final ApiCa } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getGarbageCollectionRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getGarbageCollectionRules(Async)"); } + - return getGarbageCollectionRulesCall(repository, _callback); + okhttp3.Call localVarCall = getGarbageCollectionRulesCall(repository, _callback); + return localVarCall; } @@ -361,24 +320,11 @@ public okhttp3.Call getGarbageCollectionRulesAsync(String repository, final ApiC */ public okhttp3.Call prepareGarbageCollectionCommitsCall(String repository, GarbageCollectionPrepareRequest garbageCollectionPrepareRequest, 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 = garbageCollectionPrepareRequest; // create path and map variables String localVarPath = "/repositories/{repository}/gc/prepare_commits" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -398,22 +344,23 @@ public okhttp3.Call prepareGarbageCollectionCommitsCall(String repository, Garba "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call prepareGarbageCollectionCommitsValidateBeforeCall(String repository, GarbageCollectionPrepareRequest garbageCollectionPrepareRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling prepareGarbageCollectionCommits(Async)"); } + - return prepareGarbageCollectionCommitsCall(repository, garbageCollectionPrepareRequest, _callback); + okhttp3.Call localVarCall = prepareGarbageCollectionCommitsCall(repository, garbageCollectionPrepareRequest, _callback); + return localVarCall; } @@ -502,24 +449,11 @@ public okhttp3.Call prepareGarbageCollectionCommitsAsync(String repository, Garb */ public okhttp3.Call prepareGarbageCollectionUncommittedCall(String repository, PrepareGCUncommittedRequest prepareGCUncommittedRequest, 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 = prepareGCUncommittedRequest; // create path and map variables String localVarPath = "/repositories/{repository}/gc/prepare_uncommited" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -539,22 +473,23 @@ public okhttp3.Call prepareGarbageCollectionUncommittedCall(String repository, P "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call prepareGarbageCollectionUncommittedValidateBeforeCall(String repository, PrepareGCUncommittedRequest prepareGCUncommittedRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling prepareGarbageCollectionUncommitted(Async)"); } + - return prepareGarbageCollectionUncommittedCall(repository, prepareGCUncommittedRequest, _callback); + okhttp3.Call localVarCall = prepareGarbageCollectionUncommittedCall(repository, prepareGCUncommittedRequest, _callback); + return localVarCall; } @@ -645,24 +580,11 @@ public okhttp3.Call prepareGarbageCollectionUncommittedAsync(String repository, */ public okhttp3.Call setGarbageCollectionRulesCall(String repository, GarbageCollectionRules garbageCollectionRules, 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 = garbageCollectionRules; // create path and map variables String localVarPath = "/repositories/{repository}/gc/rules" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -682,27 +604,28 @@ public okhttp3.Call setGarbageCollectionRulesCall(String repository, GarbageColl "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setGarbageCollectionRulesValidateBeforeCall(String repository, GarbageCollectionRules garbageCollectionRules, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling setGarbageCollectionRules(Async)"); } - + // verify the required parameter 'garbageCollectionRules' is set if (garbageCollectionRules == null) { throw new ApiException("Missing the required parameter 'garbageCollectionRules' when calling setGarbageCollectionRules(Async)"); } + - return setGarbageCollectionRulesCall(repository, garbageCollectionRules, _callback); + okhttp3.Call localVarCall = setGarbageCollectionRulesCall(repository, garbageCollectionRules, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/ServerConfiguration.java b/clients/java/src/main/java/io/lakefs/clients/api/ServerConfiguration.java index e124e1db56d..8853049edd4 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/ServerConfiguration.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/ServerConfiguration.java @@ -39,10 +39,10 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); } } - url = url.replace("{" + name + "}", value); + url = url.replaceAll("\\{" + name + "\\}", value); } return url; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/StagingApi.java b/clients/java/src/main/java/io/lakefs/clients/api/StagingApi.java index 67f8d9733ff..62de78544d9 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/StagingApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/StagingApi.java @@ -37,12 +37,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class StagingApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public StagingApi() { this(Configuration.getDefaultApiClient()); @@ -60,22 +57,6 @@ 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 getPhysicalAddress * @param repository (required) @@ -95,25 +76,12 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call getPhysicalAddressCall(String repository, String branch, String path, Boolean presign, 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 = "/repositories/{repository}/branches/{branch}/staging/backing" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -138,34 +106,36 @@ public okhttp3.Call getPhysicalAddressCall(String repository, String branch, Str } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getPhysicalAddressValidateBeforeCall(String repository, String branch, String path, Boolean presign, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getPhysicalAddress(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling getPhysicalAddress(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling getPhysicalAddress(Async)"); } + - return getPhysicalAddressCall(repository, branch, path, presign, _callback); + okhttp3.Call localVarCall = getPhysicalAddressCall(repository, branch, path, presign, _callback); + return localVarCall; } @@ -263,25 +233,12 @@ public okhttp3.Call getPhysicalAddressAsync(String repository, String branch, St */ public okhttp3.Call linkPhysicalAddressCall(String repository, String branch, String path, StagingMetadata stagingMetadata, 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 = stagingMetadata; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/staging/backing" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "branch" + "}", localVarApiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -305,37 +262,38 @@ public okhttp3.Call linkPhysicalAddressCall(String repository, String branch, St "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call linkPhysicalAddressValidateBeforeCall(String repository, String branch, String path, StagingMetadata stagingMetadata, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling linkPhysicalAddress(Async)"); } - + // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling linkPhysicalAddress(Async)"); } - + // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling linkPhysicalAddress(Async)"); } - + // verify the required parameter 'stagingMetadata' is set if (stagingMetadata == null) { throw new ApiException("Missing the required parameter 'stagingMetadata' when calling linkPhysicalAddress(Async)"); } + - return linkPhysicalAddressCall(repository, branch, path, stagingMetadata, _callback); + okhttp3.Call localVarCall = linkPhysicalAddressCall(repository, branch, path, stagingMetadata, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/StatisticsApi.java b/clients/java/src/main/java/io/lakefs/clients/api/StatisticsApi.java index 48b94e52995..56983216c92 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/StatisticsApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/StatisticsApi.java @@ -35,12 +35,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class StatisticsApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public StatisticsApi() { this(Configuration.getDefaultApiClient()); @@ -58,22 +55,6 @@ 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 postStatsEvents * @param statsEventsList (required) @@ -90,19 +71,6 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call postStatsEventsCall(StatsEventsList statsEventsList, 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 = statsEventsList; // create path and map variables @@ -126,22 +94,23 @@ public okhttp3.Call postStatsEventsCall(StatsEventsList statsEventsList, final A "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call postStatsEventsValidateBeforeCall(StatsEventsList statsEventsList, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'statsEventsList' is set if (statsEventsList == null) { throw new ApiException("Missing the required parameter 'statsEventsList' when calling postStatsEvents(Async)"); } + - return postStatsEventsCall(statsEventsList, _callback); + okhttp3.Call localVarCall = postStatsEventsCall(statsEventsList, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/TagsApi.java b/clients/java/src/main/java/io/lakefs/clients/api/TagsApi.java index 5ca3f43ac2f..71573f1ab1b 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/TagsApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/TagsApi.java @@ -37,12 +37,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class TagsApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public TagsApi() { this(Configuration.getDefaultApiClient()); @@ -60,22 +57,6 @@ 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 createTag * @param repository (required) @@ -95,24 +76,11 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call createTagCall(String repository, TagCreation tagCreation, 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 = tagCreation; // create path and map variables String localVarPath = "/repositories/{repository}/tags" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -132,27 +100,28 @@ public okhttp3.Call createTagCall(String repository, TagCreation tagCreation, fi "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createTagValidateBeforeCall(String repository, TagCreation tagCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling createTag(Async)"); } - + // verify the required parameter 'tagCreation' is set if (tagCreation == null) { throw new ApiException("Missing the required parameter 'tagCreation' when calling createTag(Async)"); } + - return createTagCall(repository, tagCreation, _callback); + okhttp3.Call localVarCall = createTagCall(repository, tagCreation, _callback); + return localVarCall; } @@ -246,25 +215,12 @@ public okhttp3.Call createTagAsync(String repository, TagCreation tagCreation, f */ public okhttp3.Call deleteTagCall(String repository, String tag, 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 = "/repositories/{repository}/tags/{tag}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "tag" + "}", localVarApiClient.escapeString(tag.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "tag" + "\\}", localVarApiClient.escapeString(tag.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -281,29 +237,31 @@ public okhttp3.Call deleteTagCall(String repository, String tag, final ApiCallba } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteTagValidateBeforeCall(String repository, String tag, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling deleteTag(Async)"); } - + // verify the required parameter 'tag' is set if (tag == null) { throw new ApiException("Missing the required parameter 'tag' when calling deleteTag(Async)"); } + - return deleteTagCall(repository, tag, _callback); + okhttp3.Call localVarCall = deleteTagCall(repository, tag, _callback); + return localVarCall; } @@ -387,25 +345,12 @@ public okhttp3.Call deleteTagAsync(String repository, String tag, final ApiCallb */ public okhttp3.Call getTagCall(String repository, String tag, 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 = "/repositories/{repository}/tags/{tag}" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) - .replace("{" + "tag" + "}", localVarApiClient.escapeString(tag.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) + .replaceAll("\\{" + "tag" + "\\}", localVarApiClient.escapeString(tag.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -422,29 +367,31 @@ public okhttp3.Call getTagCall(String repository, String tag, final ApiCallback } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTagValidateBeforeCall(String repository, String tag, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling getTag(Async)"); } - + // verify the required parameter 'tag' is set if (tag == null) { throw new ApiException("Missing the required parameter 'tag' when calling getTag(Async)"); } + - return getTagCall(repository, tag, _callback); + okhttp3.Call localVarCall = getTagCall(repository, tag, _callback); + return localVarCall; } @@ -534,24 +481,11 @@ public okhttp3.Call getTagAsync(String repository, String tag, final ApiCallback */ public okhttp3.Call listTagsCall(String repository, String prefix, String after, Integer amount, 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 = "/repositories/{repository}/tags" - .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())); + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -580,24 +514,26 @@ public okhttp3.Call listTagsCall(String repository, String prefix, String after, } final String[] localVarContentTypes = { + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } + localVarHeaderParams.put("Content-Type", localVarContentType); - String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listTagsValidateBeforeCall(String repository, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'repository' is set if (repository == null) { throw new ApiException("Missing the required parameter 'repository' when calling listTags(Async)"); } + - return listTagsCall(repository, prefix, after, amount, _callback); + okhttp3.Call localVarCall = listTagsCall(repository, prefix, after, amount, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/TemplatesApi.java b/clients/java/src/main/java/io/lakefs/clients/api/TemplatesApi.java index f0d2bc2e2f7..c4a22d2c00a 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/TemplatesApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/TemplatesApi.java @@ -34,12 +34,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.core.GenericType; public class TemplatesApi { private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; public TemplatesApi() { this(Configuration.getDefaultApiClient()); @@ -57,22 +54,6 @@ 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 expandTemplate * @param templateLocation URL of the template; must be relative (to a URL configured on the server). (required) @@ -90,24 +71,11 @@ public void setCustomBaseUrl(String customBaseUrl) { */ public okhttp3.Call expandTemplateCall(String templateLocation, Map params, 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 = "/templates/{template_location}" - .replace("{" + "template_location" + "}", localVarApiClient.escapeString(templateLocation.toString())); + .replaceAll("\\{" + "template_location" + "\\}", localVarApiClient.escapeString(templateLocation.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -120,8 +88,7 @@ public okhttp3.Call expandTemplateCall(String templateLocation, Map params, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'templateLocation' is set if (templateLocation == null) { throw new ApiException("Missing the required parameter 'templateLocation' when calling expandTemplate(Async)"); } + - return expandTemplateCall(templateLocation, params, _callback); + okhttp3.Call localVarCall = expandTemplateCall(templateLocation, params, _callback); + return localVarCall; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/auth/ApiKeyAuth.java b/clients/java/src/main/java/io/lakefs/clients/api/auth/ApiKeyAuth.java index 7aca8711994..2684eac9b3d 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/auth/ApiKeyAuth.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/auth/ApiKeyAuth.java @@ -13,10 +13,8 @@ package io.lakefs.clients.api.auth; -import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.Pair; -import java.net.URI; import java.util.Map; import java.util.List; @@ -58,8 +56,7 @@ public void setApiKeyPrefix(String apiKeyPrefix) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (apiKey == null) { return; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/auth/Authentication.java b/clients/java/src/main/java/io/lakefs/clients/api/auth/Authentication.java index dd7ab0f4008..fcc0d378800 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/auth/Authentication.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/auth/Authentication.java @@ -14,9 +14,7 @@ package io.lakefs.clients.api.auth; import io.lakefs.clients.api.Pair; -import io.lakefs.clients.api.ApiException; -import java.net.URI; import java.util.Map; import java.util.List; @@ -27,10 +25,6 @@ public interface Authentication { * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws ApiException if failed to update the parameters */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; + void applyToParams(List queryParams, Map headerParams, Map cookieParams); } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBasicAuth.java b/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBasicAuth.java index 892c38cf008..8e028096585 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBasicAuth.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBasicAuth.java @@ -14,11 +14,9 @@ package io.lakefs.clients.api.auth; import io.lakefs.clients.api.Pair; -import io.lakefs.clients.api.ApiException; import okhttp3.Credentials; -import java.net.URI; import java.util.Map; import java.util.List; @@ -45,8 +43,7 @@ public void setPassword(String password) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { if (username == null && password == null) { return; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBearerAuth.java b/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBearerAuth.java index b236c3cbb1b..da41ba2f7b6 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBearerAuth.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/auth/HttpBearerAuth.java @@ -13,10 +13,8 @@ package io.lakefs.clients.api.auth; -import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.Pair; -import java.net.URI; import java.util.Map; import java.util.List; @@ -48,9 +46,8 @@ public void setBearerToken(String bearerToken) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (bearerToken == null) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if(bearerToken == null) { return; } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/AbstractOpenApiSchema.java b/clients/java/src/main/java/io/lakefs/clients/api/model/AbstractOpenApiSchema.java deleted file mode 100644 index 6ef24327a8f..00000000000 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/AbstractOpenApiSchema.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * lakeFS API - * lakeFS HTTP API - * - * The version of the OpenAPI document: 0.1.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package io.lakefs.clients.api.model; - -import io.lakefs.clients.api.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") -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - //@JsonValue - public Object getActualInstance() {return instance;} - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) {this.instance = instance;} - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) && - Objects.equals(this.isNullable, a.isNullable) && - Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } - - - -} diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/AccessKeyCredentials.java b/clients/java/src/main/java/io/lakefs/clients/api/model/AccessKeyCredentials.java index 84d9ef646d3..bb0d17207dc 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/AccessKeyCredentials.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/AccessKeyCredentials.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * AccessKeyCredentials */ @@ -56,8 +37,6 @@ public class AccessKeyCredentials { @SerializedName(SERIALIZED_NAME_SECRET_ACCESS_KEY) private String secretAccessKey; - public AccessKeyCredentials() { - } public AccessKeyCredentials accessKeyId(String accessKeyId) { @@ -70,6 +49,7 @@ public AccessKeyCredentials accessKeyId(String accessKeyId) { * @return accessKeyId **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "AKIAIOSFODNN7EXAMPLE", required = true, value = "access key ID to set for user for use in integration testing.") public String getAccessKeyId() { return accessKeyId; @@ -92,6 +72,7 @@ public AccessKeyCredentials secretAccessKey(String secretAccessKey) { * @return secretAccessKey **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", required = true, value = "secret access key to set for user for use in integration testing.") public String getSecretAccessKey() { return secretAccessKey; @@ -103,7 +84,6 @@ public void setSecretAccessKey(String secretAccessKey) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,104 +123,5 @@ private String toIndentedString(Object o) { 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_key_id"); - openapiFields.add("secret_access_key"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("access_key_id"); - openapiRequiredFields.add("secret_access_key"); - } - - /** - * 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 AccessKeyCredentials - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AccessKeyCredentials.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccessKeyCredentials is not found in the empty JSON string", AccessKeyCredentials.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AccessKeyCredentials.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AccessKeyCredentials` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AccessKeyCredentials.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 (!jsonObj.get("access_key_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `access_key_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_key_id").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AccessKeyCredentials.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AccessKeyCredentials' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AccessKeyCredentials.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AccessKeyCredentials value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AccessKeyCredentials read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AccessKeyCredentials given an JSON string - * - * @param jsonString JSON string - * @return An instance of AccessKeyCredentials - * @throws IOException if the JSON string is invalid with respect to AccessKeyCredentials - */ - public static AccessKeyCredentials fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AccessKeyCredentials.class); - } - - /** - * Convert an instance of AccessKeyCredentials to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRun.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRun.java index b40a8c8290c..9b511e5b3c3 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRun.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRun.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; +import org.threeten.bp.OffsetDateTime; /** * ActionRun @@ -124,8 +105,6 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_COMMIT_ID) private String commitId; - public ActionRun() { - } public ActionRun runId(String runId) { @@ -138,6 +117,7 @@ public ActionRun runId(String runId) { * @return runId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getRunId() { return runId; @@ -160,6 +140,7 @@ public ActionRun branch(String branch) { * @return branch **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getBranch() { return branch; @@ -182,6 +163,7 @@ public ActionRun startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public OffsetDateTime getStartTime() { return startTime; @@ -204,6 +186,7 @@ public ActionRun endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public OffsetDateTime getEndTime() { return endTime; @@ -226,6 +209,7 @@ public ActionRun eventType(String eventType) { * @return eventType **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getEventType() { return eventType; @@ -248,6 +232,7 @@ public ActionRun status(StatusEnum status) { * @return status **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public StatusEnum getStatus() { return status; @@ -270,6 +255,7 @@ public ActionRun commitId(String commitId) { * @return commitId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getCommitId() { return commitId; @@ -281,7 +267,6 @@ public void setCommitId(String commitId) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -331,122 +316,5 @@ private String toIndentedString(Object o) { 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("run_id"); - openapiFields.add("branch"); - openapiFields.add("start_time"); - openapiFields.add("end_time"); - openapiFields.add("event_type"); - openapiFields.add("status"); - openapiFields.add("commit_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("run_id"); - openapiRequiredFields.add("branch"); - openapiRequiredFields.add("start_time"); - openapiRequiredFields.add("event_type"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("commit_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 ActionRun - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ActionRun.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ActionRun is not found in the empty JSON string", ActionRun.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ActionRun.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionRun` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ActionRun.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 (!jsonObj.get("run_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `run_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("run_id").toString())); - } - if (!jsonObj.get("branch").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `branch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch").toString())); - } - if (!jsonObj.get("event_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `event_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("event_type").toString())); - } - if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if (!jsonObj.get("commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionRun.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionRun' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ActionRun.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionRun value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionRun read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ActionRun given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionRun - * @throws IOException if the JSON string is invalid with respect to ActionRun - */ - public static ActionRun fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionRun.class); - } - - /** - * Convert an instance of ActionRun to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRunList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRunList.java index c8398a77a9e..7838ab6eb0a 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRunList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ActionRunList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ActionRun; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ActionRunList */ @@ -58,10 +39,8 @@ public class ActionRunList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public ActionRunList() { - } public ActionRunList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public ActionRunList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public ActionRunList addResultsItem(ActionRun resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 ActionRunList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ActionRunList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ActionRunList is not found in the empty JSON string", ActionRunList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ActionRunList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ActionRunList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ActionRunList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - ActionRun.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActionRunList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActionRunList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ActionRunList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ActionRunList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ActionRunList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ActionRunList given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActionRunList - * @throws IOException if the JSON string is invalid with respect to ActionRunList - */ - public static ActionRunList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActionRunList.class); - } - - /** - * Convert an instance of ActionRunList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/AuthCapabilities.java b/clients/java/src/main/java/io/lakefs/clients/api/model/AuthCapabilities.java index 886de792587..0b2632f5bc4 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/AuthCapabilities.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/AuthCapabilities.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * AuthCapabilities */ @@ -56,8 +37,6 @@ public class AuthCapabilities { @SerializedName(SERIALIZED_NAME_FORGOT_PASSWORD) private Boolean forgotPassword; - public AuthCapabilities() { - } public AuthCapabilities inviteUser(Boolean inviteUser) { @@ -70,6 +49,7 @@ public AuthCapabilities inviteUser(Boolean inviteUser) { * @return inviteUser **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Boolean getInviteUser() { return inviteUser; @@ -92,6 +72,7 @@ public AuthCapabilities forgotPassword(Boolean forgotPassword) { * @return forgotPassword **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Boolean getForgotPassword() { return forgotPassword; @@ -103,7 +84,6 @@ public void setForgotPassword(Boolean forgotPassword) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,89 +123,5 @@ private String toIndentedString(Object o) { 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("invite_user"); - openapiFields.add("forgot_password"); - - // 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 AuthCapabilities - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AuthCapabilities.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthCapabilities is not found in the empty JSON string", AuthCapabilities.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AuthCapabilities.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthCapabilities` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthCapabilities.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthCapabilities' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthCapabilities.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthCapabilities value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthCapabilities read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthCapabilities given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthCapabilities - * @throws IOException if the JSON string is invalid with respect to AuthCapabilities - */ - public static AuthCapabilities fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthCapabilities.class); - } - - /** - * Convert an instance of AuthCapabilities to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/AuthenticationToken.java b/clients/java/src/main/java/io/lakefs/clients/api/model/AuthenticationToken.java index 8b9318db419..c34c1ada4c8 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/AuthenticationToken.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/AuthenticationToken.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * AuthenticationToken */ @@ -56,8 +37,6 @@ public class AuthenticationToken { @SerializedName(SERIALIZED_NAME_TOKEN_EXPIRATION) private Long tokenExpiration; - public AuthenticationToken() { - } public AuthenticationToken token(String token) { @@ -70,6 +49,7 @@ public AuthenticationToken token(String token) { * @return token **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "a JWT token that could be used to authenticate requests") public String getToken() { return token; @@ -92,6 +72,7 @@ public AuthenticationToken tokenExpiration(Long tokenExpiration) { * @return tokenExpiration **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Unix Epoch in seconds") public Long getTokenExpiration() { return tokenExpiration; @@ -103,7 +84,6 @@ public void setTokenExpiration(Long tokenExpiration) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,100 +123,5 @@ private String toIndentedString(Object o) { 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("token"); - openapiFields.add("token_expiration"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); - } - - /** - * 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 AuthenticationToken - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AuthenticationToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthenticationToken is not found in the empty JSON string", AuthenticationToken.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!AuthenticationToken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthenticationToken` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AuthenticationToken.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 (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthenticationToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthenticationToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthenticationToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthenticationToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AuthenticationToken read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthenticationToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthenticationToken - * @throws IOException if the JSON string is invalid with respect to AuthenticationToken - */ - public static AuthenticationToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthenticationToken.class); - } - - /** - * Convert an instance of AuthenticationToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/BranchCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/BranchCreation.java index 5f3f7790555..c71f976aa47 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/BranchCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/BranchCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * BranchCreation */ @@ -56,8 +37,6 @@ public class BranchCreation { @SerializedName(SERIALIZED_NAME_SOURCE) private String source; - public BranchCreation() { - } public BranchCreation name(String name) { @@ -70,6 +49,7 @@ public BranchCreation name(String name) { * @return name **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -92,6 +72,7 @@ public BranchCreation source(String source) { * @return source **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getSource() { return source; @@ -103,7 +84,6 @@ public void setSource(String source) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,104 +123,5 @@ private String toIndentedString(Object o) { 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("source"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("source"); - } - - /** - * 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 BranchCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BranchCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BranchCreation is not found in the empty JSON string", BranchCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BranchCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BranchCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BranchCreation.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 (!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("source").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BranchCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BranchCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BranchCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BranchCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BranchCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BranchCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of BranchCreation - * @throws IOException if the JSON string is invalid with respect to BranchCreation - */ - public static BranchCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BranchCreation.class); - } - - /** - * Convert an instance of BranchCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/BranchProtectionRule.java b/clients/java/src/main/java/io/lakefs/clients/api/model/BranchProtectionRule.java index 69ebe4e0b88..817b3d2ff76 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/BranchProtectionRule.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/BranchProtectionRule.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * BranchProtectionRule */ @@ -52,8 +33,6 @@ public class BranchProtectionRule { @SerializedName(SERIALIZED_NAME_PATTERN) private String pattern; - public BranchProtectionRule() { - } public BranchProtectionRule pattern(String pattern) { @@ -66,6 +45,7 @@ public BranchProtectionRule pattern(String pattern) { * @return pattern **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "stable_*", required = true, value = "fnmatch pattern for the branch name, supporting * and ? wildcards") public String getPattern() { return pattern; @@ -77,7 +57,6 @@ public void setPattern(String pattern) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,99 +94,5 @@ private String toIndentedString(Object o) { 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("pattern"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pattern"); - } - - /** - * 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 BranchProtectionRule - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BranchProtectionRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BranchProtectionRule is not found in the empty JSON string", BranchProtectionRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BranchProtectionRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BranchProtectionRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BranchProtectionRule.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 (!jsonObj.get("pattern").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pattern").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BranchProtectionRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BranchProtectionRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BranchProtectionRule.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BranchProtectionRule value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BranchProtectionRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BranchProtectionRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of BranchProtectionRule - * @throws IOException if the JSON string is invalid with respect to BranchProtectionRule - */ - public static BranchProtectionRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BranchProtectionRule.class); - } - - /** - * Convert an instance of BranchProtectionRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/CherryPickCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/CherryPickCreation.java index 7602e95657a..249e0c4019c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/CherryPickCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/CherryPickCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * CherryPickCreation */ @@ -56,8 +37,6 @@ public class CherryPickCreation { @SerializedName(SERIALIZED_NAME_PARENT_NUMBER) private Integer parentNumber; - public CherryPickCreation() { - } public CherryPickCreation ref(String ref) { @@ -70,6 +49,7 @@ public CherryPickCreation ref(String ref) { * @return ref **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "the commit to cherry-pick, given by a ref") public String getRef() { return ref; @@ -92,6 +72,7 @@ public CherryPickCreation parentNumber(Integer parentNumber) { * @return parentNumber **/ @javax.annotation.Nullable + @ApiModelProperty(value = "when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. The destination branch is parent 1, which is the default behaviour. ") public Integer getParentNumber() { return parentNumber; @@ -103,7 +84,6 @@ public void setParentNumber(Integer parentNumber) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,100 +123,5 @@ private String toIndentedString(Object o) { 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("ref"); - openapiFields.add("parent_number"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ref"); - } - - /** - * 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 CherryPickCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CherryPickCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CherryPickCreation is not found in the empty JSON string", CherryPickCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CherryPickCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CherryPickCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CherryPickCreation.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 (!jsonObj.get("ref").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ref").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CherryPickCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CherryPickCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CherryPickCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CherryPickCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CherryPickCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CherryPickCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of CherryPickCreation - * @throws IOException if the JSON string is invalid with respect to CherryPickCreation - */ - public static CherryPickCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CherryPickCreation.class); - } - - /** - * Convert an instance of CherryPickCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/CommPrefsInput.java b/clients/java/src/main/java/io/lakefs/clients/api/model/CommPrefsInput.java index 7a1d1d0b20a..ff3e3b882cb 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/CommPrefsInput.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/CommPrefsInput.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * CommPrefsInput */ @@ -60,8 +41,6 @@ public class CommPrefsInput { @SerializedName(SERIALIZED_NAME_SECURITY_UPDATES) private Boolean securityUpdates; - public CommPrefsInput() { - } public CommPrefsInput email(String email) { @@ -74,6 +53,7 @@ public CommPrefsInput email(String email) { * @return email **/ @javax.annotation.Nullable + @ApiModelProperty(value = "the provided email") public String getEmail() { return email; @@ -96,6 +76,7 @@ public CommPrefsInput featureUpdates(Boolean featureUpdates) { * @return featureUpdates **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "was \"feature updates\" checked") public Boolean getFeatureUpdates() { return featureUpdates; @@ -118,6 +99,7 @@ public CommPrefsInput securityUpdates(Boolean securityUpdates) { * @return securityUpdates **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "was \"security updates\" checked") public Boolean getSecurityUpdates() { return securityUpdates; @@ -129,7 +111,6 @@ public void setSecurityUpdates(Boolean securityUpdates) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,102 +152,5 @@ private String toIndentedString(Object o) { 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("email"); - openapiFields.add("featureUpdates"); - openapiFields.add("securityUpdates"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("featureUpdates"); - openapiRequiredFields.add("securityUpdates"); - } - - /** - * 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 CommPrefsInput - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CommPrefsInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CommPrefsInput is not found in the empty JSON string", CommPrefsInput.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CommPrefsInput.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommPrefsInput` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CommPrefsInput.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 ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommPrefsInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommPrefsInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CommPrefsInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CommPrefsInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommPrefsInput read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CommPrefsInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommPrefsInput - * @throws IOException if the JSON string is invalid with respect to CommPrefsInput - */ - public static CommPrefsInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommPrefsInput.class); - } - - /** - * Convert an instance of CommPrefsInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Commit.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Commit.java index fdce31fbeb9..86297f84028 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Commit.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Commit.java @@ -20,33 +20,14 @@ 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.HashMap; import java.util.List; import java.util.Map; -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Commit */ @@ -58,7 +39,7 @@ public class Commit { public static final String SERIALIZED_NAME_PARENTS = "parents"; @SerializedName(SERIALIZED_NAME_PARENTS) - private List parents = new ArrayList<>(); + private List parents = new ArrayList(); public static final String SERIALIZED_NAME_COMMITTER = "committer"; @SerializedName(SERIALIZED_NAME_COMMITTER) @@ -78,10 +59,8 @@ public class Commit { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) - private Map metadata = new HashMap<>(); + private Map metadata = null; - public Commit() { - } public Commit id(String id) { @@ -94,6 +73,7 @@ public Commit id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -121,6 +101,7 @@ public Commit addParentsItem(String parentsItem) { * @return parents **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getParents() { return parents; @@ -143,6 +124,7 @@ public Commit committer(String committer) { * @return committer **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getCommitter() { return committer; @@ -165,6 +147,7 @@ public Commit message(String message) { * @return message **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getMessage() { return message; @@ -187,6 +170,7 @@ public Commit creationDate(Long creationDate) { * @return creationDate **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Unix Epoch in seconds") public Long getCreationDate() { return creationDate; @@ -209,6 +193,7 @@ public Commit metaRangeId(String metaRangeId) { * @return metaRangeId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getMetaRangeId() { return metaRangeId; @@ -228,7 +213,7 @@ public Commit metadata(Map metadata) { public Commit putMetadataItem(String key, String metadataItem) { if (this.metadata == null) { - this.metadata = new HashMap<>(); + this.metadata = new HashMap(); } this.metadata.put(key, metadataItem); return this; @@ -239,6 +224,7 @@ public Commit putMetadataItem(String key, String metadataItem) { * @return metadata **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Map getMetadata() { return metadata; @@ -250,7 +236,6 @@ public void setMetadata(Map metadata) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -300,125 +285,5 @@ private String toIndentedString(Object o) { 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("parents"); - openapiFields.add("committer"); - openapiFields.add("message"); - openapiFields.add("creation_date"); - openapiFields.add("meta_range_id"); - openapiFields.add("metadata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("parents"); - openapiRequiredFields.add("committer"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("creation_date"); - openapiRequiredFields.add("meta_range_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 Commit - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Commit.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Commit is not found in the empty JSON string", Commit.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Commit.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Commit` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Commit.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 (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // ensure the required json array is present - if (jsonObj.get("parents") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("parents").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `parents` to be an array in the JSON string but got `%s`", jsonObj.get("parents").toString())); - } - if (!jsonObj.get("committer").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `committer` to be a primitive type in the JSON string but got `%s`", jsonObj.get("committer").toString())); - } - if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if (!jsonObj.get("meta_range_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `meta_range_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("meta_range_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Commit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Commit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Commit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Commit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Commit read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Commit given an JSON string - * - * @param jsonString JSON string - * @return An instance of Commit - * @throws IOException if the JSON string is invalid with respect to Commit - */ - public static Commit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Commit.class); - } - - /** - * Convert an instance of Commit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/CommitCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/CommitCreation.java index d4ba8fbc950..71c9f79145c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/CommitCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/CommitCreation.java @@ -20,30 +20,12 @@ 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.HashMap; -import java.util.Map; - -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; /** * CommitCreation @@ -56,14 +38,12 @@ public class CommitCreation { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) - private Map metadata = new HashMap<>(); + private Map metadata = null; public static final String SERIALIZED_NAME_DATE = "date"; @SerializedName(SERIALIZED_NAME_DATE) private Long date; - public CommitCreation() { - } public CommitCreation message(String message) { @@ -76,6 +56,7 @@ public CommitCreation message(String message) { * @return message **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getMessage() { return message; @@ -95,7 +76,7 @@ public CommitCreation metadata(Map metadata) { public CommitCreation putMetadataItem(String key, String metadataItem) { if (this.metadata == null) { - this.metadata = new HashMap<>(); + this.metadata = new HashMap(); } this.metadata.put(key, metadataItem); return this; @@ -106,6 +87,7 @@ public CommitCreation putMetadataItem(String key, String metadataItem) { * @return metadata **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Map getMetadata() { return metadata; @@ -128,6 +110,7 @@ public CommitCreation date(Long date) { * @return date **/ @javax.annotation.Nullable + @ApiModelProperty(value = "set date to override creation date in the commit (Unix Epoch in seconds)") public Long getDate() { return date; @@ -139,7 +122,6 @@ public void setDate(Long date) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -181,101 +163,5 @@ private String toIndentedString(Object o) { 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("message"); - openapiFields.add("metadata"); - openapiFields.add("date"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("message"); - } - - /** - * 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 CommitCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CommitCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CommitCreation is not found in the empty JSON string", CommitCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CommitCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommitCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CommitCreation.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 (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommitCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommitCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CommitCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CommitCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommitCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CommitCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommitCreation - * @throws IOException if the JSON string is invalid with respect to CommitCreation - */ - public static CommitCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommitCreation.class); - } - - /** - * Convert an instance of CommitCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/CommitList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/CommitList.java index 56f74c7eaf5..0a08c8f7d6e 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/CommitList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/CommitList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Commit; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * CommitList */ @@ -58,10 +39,8 @@ public class CommitList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public CommitList() { - } public CommitList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public CommitList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public CommitList addResultsItem(Commit resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 CommitList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CommitList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CommitList is not found in the empty JSON string", CommitList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CommitList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CommitList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CommitList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - Commit.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CommitList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CommitList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CommitList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CommitList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CommitList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CommitList given an JSON string - * - * @param jsonString JSON string - * @return An instance of CommitList - * @throws IOException if the JSON string is invalid with respect to CommitList - */ - public static CommitList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CommitList.class); - } - - /** - * Convert an instance of CommitList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Credentials.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Credentials.java index 4f9d0b5cd25..63eca708cbf 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Credentials.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Credentials.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Credentials */ @@ -56,8 +37,6 @@ public class Credentials { @SerializedName(SERIALIZED_NAME_CREATION_DATE) private Long creationDate; - public Credentials() { - } public Credentials accessKeyId(String accessKeyId) { @@ -70,6 +49,7 @@ public Credentials accessKeyId(String accessKeyId) { * @return accessKeyId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getAccessKeyId() { return accessKeyId; @@ -92,6 +72,7 @@ public Credentials creationDate(Long creationDate) { * @return creationDate **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Unix Epoch in seconds") public Long getCreationDate() { return creationDate; @@ -103,7 +84,6 @@ public void setCreationDate(Long creationDate) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,101 +123,5 @@ private String toIndentedString(Object o) { 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_key_id"); - openapiFields.add("creation_date"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("access_key_id"); - openapiRequiredFields.add("creation_date"); - } - - /** - * 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 Credentials - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Credentials.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Credentials is not found in the empty JSON string", Credentials.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Credentials.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Credentials` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Credentials.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 (!jsonObj.get("access_key_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `access_key_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_key_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Credentials.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Credentials' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Credentials.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Credentials value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Credentials read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Credentials given an JSON string - * - * @param jsonString JSON string - * @return An instance of Credentials - * @throws IOException if the JSON string is invalid with respect to Credentials - */ - public static Credentials fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Credentials.class); - } - - /** - * Convert an instance of Credentials to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsList.java index ceda9866ded..4233b1d7060 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Credentials; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * CredentialsList */ @@ -58,10 +39,8 @@ public class CredentialsList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public CredentialsList() { - } public CredentialsList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public CredentialsList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public CredentialsList addResultsItem(Credentials resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 CredentialsList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CredentialsList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CredentialsList is not found in the empty JSON string", CredentialsList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CredentialsList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CredentialsList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CredentialsList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - Credentials.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CredentialsList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CredentialsList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CredentialsList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CredentialsList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CredentialsList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CredentialsList given an JSON string - * - * @param jsonString JSON string - * @return An instance of CredentialsList - * @throws IOException if the JSON string is invalid with respect to CredentialsList - */ - public static CredentialsList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CredentialsList.class); - } - - /** - * Convert an instance of CredentialsList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsWithSecret.java b/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsWithSecret.java index 16c089cbc40..7e8ebfc3f45 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsWithSecret.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/CredentialsWithSecret.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * CredentialsWithSecret */ @@ -60,8 +41,6 @@ public class CredentialsWithSecret { @SerializedName(SERIALIZED_NAME_CREATION_DATE) private Long creationDate; - public CredentialsWithSecret() { - } public CredentialsWithSecret accessKeyId(String accessKeyId) { @@ -74,6 +53,7 @@ public CredentialsWithSecret accessKeyId(String accessKeyId) { * @return accessKeyId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getAccessKeyId() { return accessKeyId; @@ -96,6 +76,7 @@ public CredentialsWithSecret secretAccessKey(String secretAccessKey) { * @return secretAccessKey **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getSecretAccessKey() { return secretAccessKey; @@ -118,6 +99,7 @@ public CredentialsWithSecret creationDate(Long creationDate) { * @return creationDate **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Unix Epoch in seconds") public Long getCreationDate() { return creationDate; @@ -129,7 +111,6 @@ public void setCreationDate(Long creationDate) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,106 +152,5 @@ private String toIndentedString(Object o) { 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_key_id"); - openapiFields.add("secret_access_key"); - openapiFields.add("creation_date"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("access_key_id"); - openapiRequiredFields.add("secret_access_key"); - openapiRequiredFields.add("creation_date"); - } - - /** - * 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 CredentialsWithSecret - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CredentialsWithSecret.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CredentialsWithSecret is not found in the empty JSON string", CredentialsWithSecret.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CredentialsWithSecret.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CredentialsWithSecret` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CredentialsWithSecret.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 (!jsonObj.get("access_key_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `access_key_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_key_id").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CredentialsWithSecret.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CredentialsWithSecret' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CredentialsWithSecret.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CredentialsWithSecret value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CredentialsWithSecret read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CredentialsWithSecret given an JSON string - * - * @param jsonString JSON string - * @return An instance of CredentialsWithSecret - * @throws IOException if the JSON string is invalid with respect to CredentialsWithSecret - */ - public static CredentialsWithSecret fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CredentialsWithSecret.class); - } - - /** - * Convert an instance of CredentialsWithSecret to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/CurrentUser.java b/clients/java/src/main/java/io/lakefs/clients/api/model/CurrentUser.java index 81911380389..ba1851cbfa0 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/CurrentUser.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/CurrentUser.java @@ -21,29 +21,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.User; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * CurrentUser */ @@ -53,8 +34,6 @@ public class CurrentUser { @SerializedName(SERIALIZED_NAME_USER) private User user; - public CurrentUser() { - } public CurrentUser user(User user) { @@ -67,6 +46,7 @@ public CurrentUser user(User user) { * @return user **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public User getUser() { return user; @@ -78,7 +58,6 @@ public void setUser(User user) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -116,98 +95,5 @@ private String toIndentedString(Object o) { 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("user"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("user"); - } - - /** - * 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 CurrentUser - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CurrentUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CurrentUser is not found in the empty JSON string", CurrentUser.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CurrentUser.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CurrentUser` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CurrentUser.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())); - } - } - // validate the required field `user` - User.validateJsonObject(jsonObj.getAsJsonObject("user")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CurrentUser.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CurrentUser' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CurrentUser.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CurrentUser value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CurrentUser read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CurrentUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of CurrentUser - * @throws IOException if the JSON string is invalid with respect to CurrentUser - */ - public static CurrentUser fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CurrentUser.class); - } - - /** - * Convert an instance of CurrentUser to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/DeleteBranchProtectionRuleRequest.java b/clients/java/src/main/java/io/lakefs/clients/api/model/DeleteBranchProtectionRuleRequest.java deleted file mode 100644 index cc8b0206e4f..00000000000 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/DeleteBranchProtectionRuleRequest.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * lakeFS API - * lakeFS HTTP API - * - * The version of the OpenAPI document: 0.1.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package io.lakefs.clients.api.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 java.io.IOException; - -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - -/** - * DeleteBranchProtectionRuleRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteBranchProtectionRuleRequest { - public static final String SERIALIZED_NAME_PATTERN = "pattern"; - @SerializedName(SERIALIZED_NAME_PATTERN) - private String pattern; - - public DeleteBranchProtectionRuleRequest() { - } - - public DeleteBranchProtectionRuleRequest pattern(String pattern) { - - this.pattern = pattern; - return this; - } - - /** - * Get pattern - * @return pattern - **/ - @javax.annotation.Nonnull - - public String getPattern() { - return pattern; - } - - - public void setPattern(String pattern) { - this.pattern = pattern; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest = (DeleteBranchProtectionRuleRequest) o; - return Objects.equals(this.pattern, deleteBranchProtectionRuleRequest.pattern); - } - - @Override - public int hashCode() { - return Objects.hash(pattern); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteBranchProtectionRuleRequest {\n"); - sb.append(" pattern: ").append(toIndentedString(pattern)).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("pattern"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pattern"); - } - - /** - * 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 DeleteBranchProtectionRuleRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteBranchProtectionRuleRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteBranchProtectionRuleRequest is not found in the empty JSON string", DeleteBranchProtectionRuleRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DeleteBranchProtectionRuleRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteBranchProtectionRuleRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteBranchProtectionRuleRequest.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 (!jsonObj.get("pattern").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pattern").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteBranchProtectionRuleRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteBranchProtectionRuleRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeleteBranchProtectionRuleRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteBranchProtectionRuleRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DeleteBranchProtectionRuleRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteBranchProtectionRuleRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteBranchProtectionRuleRequest - * @throws IOException if the JSON string is invalid with respect to DeleteBranchProtectionRuleRequest - */ - public static DeleteBranchProtectionRuleRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteBranchProtectionRuleRequest.class); - } - - /** - * Convert an instance of DeleteBranchProtectionRuleRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java index b5d9896566d..70baf55b23e 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Diff.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Diff */ @@ -164,8 +145,6 @@ public PathTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_SIZE_BYTES) private Long sizeBytes; - public Diff() { - } public Diff type(TypeEnum type) { @@ -178,6 +157,7 @@ public Diff type(TypeEnum type) { * @return type **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public TypeEnum getType() { return type; @@ -200,6 +180,7 @@ public Diff path(String path) { * @return path **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getPath() { return path; @@ -222,6 +203,7 @@ public Diff pathType(PathTypeEnum pathType) { * @return pathType **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public PathTypeEnum getPathType() { return pathType; @@ -244,6 +226,7 @@ public Diff sizeBytes(Long sizeBytes) { * @return sizeBytes **/ @javax.annotation.Nullable + @ApiModelProperty(value = "represents the size of the added/changed/deleted entry") public Long getSizeBytes() { return sizeBytes; @@ -255,7 +238,6 @@ public void setSizeBytes(Long sizeBytes) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -299,110 +281,5 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("path"); - openapiFields.add("path_type"); - openapiFields.add("size_bytes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("path"); - openapiRequiredFields.add("path_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 Diff - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Diff.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Diff is not found in the empty JSON string", Diff.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Diff.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Diff` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Diff.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 (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!jsonObj.get("path").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); - } - if (!jsonObj.get("path_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `path_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path_type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Diff.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Diff' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Diff.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Diff value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Diff read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Diff given an JSON string - * - * @param jsonString JSON string - * @return An instance of Diff - * @throws IOException if the JSON string is invalid with respect to Diff - */ - public static Diff fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Diff.class); - } - - /** - * Convert an instance of Diff to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/DiffList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/DiffList.java index 88f73470c48..49e8acc037c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/DiffList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/DiffList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Diff; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * DiffList */ @@ -58,10 +39,8 @@ public class DiffList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public DiffList() { - } public DiffList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public DiffList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public DiffList addResultsItem(Diff resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 DiffList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DiffList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DiffList is not found in the empty JSON string", DiffList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DiffList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DiffList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DiffList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - Diff.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DiffList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DiffList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DiffList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DiffList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DiffList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DiffList given an JSON string - * - * @param jsonString JSON string - * @return An instance of DiffList - * @throws IOException if the JSON string is invalid with respect to DiffList - */ - public static DiffList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DiffList.class); - } - - /** - * Convert an instance of DiffList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Error.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Error.java index da00ebf0ab8..e808c129818 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Error.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Error.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Error */ @@ -52,8 +33,6 @@ public class Error { @SerializedName(SERIALIZED_NAME_MESSAGE) private String message; - public Error() { - } public Error message(String message) { @@ -66,6 +45,7 @@ public Error message(String message) { * @return message **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "short message explaining the error") public String getMessage() { return message; @@ -77,7 +57,6 @@ public void setMessage(String message) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,99 +94,5 @@ private String toIndentedString(Object o) { 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("message"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("message"); - } - - /** - * 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()) { // has required fields but JSON object 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (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(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Error.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 (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Error.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Error' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Error.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Error value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Error read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Error given an JSON string - * - * @param jsonString JSON string - * @return An instance of Error - * @throws IOException if the JSON string is invalid with respect to Error - */ - public static Error fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Error.class); - } - - /** - * Convert an instance of Error to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/FindMergeBaseResult.java b/clients/java/src/main/java/io/lakefs/clients/api/model/FindMergeBaseResult.java index 3d1b5f80041..92e66056479 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/FindMergeBaseResult.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/FindMergeBaseResult.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * FindMergeBaseResult */ @@ -60,8 +41,6 @@ public class FindMergeBaseResult { @SerializedName(SERIALIZED_NAME_BASE_COMMIT_ID) private String baseCommitId; - public FindMergeBaseResult() { - } public FindMergeBaseResult sourceCommitId(String sourceCommitId) { @@ -74,6 +53,7 @@ public FindMergeBaseResult sourceCommitId(String sourceCommitId) { * @return sourceCommitId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The commit ID of the merge source") public String getSourceCommitId() { return sourceCommitId; @@ -96,6 +76,7 @@ public FindMergeBaseResult destinationCommitId(String destinationCommitId) { * @return destinationCommitId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The commit ID of the merge destination") public String getDestinationCommitId() { return destinationCommitId; @@ -118,6 +99,7 @@ public FindMergeBaseResult baseCommitId(String baseCommitId) { * @return baseCommitId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The commit ID of the merge base") public String getBaseCommitId() { return baseCommitId; @@ -129,7 +111,6 @@ public void setBaseCommitId(String baseCommitId) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,109 +152,5 @@ private String toIndentedString(Object o) { 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("source_commit_id"); - openapiFields.add("destination_commit_id"); - openapiFields.add("base_commit_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("source_commit_id"); - openapiRequiredFields.add("destination_commit_id"); - openapiRequiredFields.add("base_commit_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 FindMergeBaseResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FindMergeBaseResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FindMergeBaseResult is not found in the empty JSON string", FindMergeBaseResult.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!FindMergeBaseResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FindMergeBaseResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FindMergeBaseResult.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 (!jsonObj.get("source_commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `source_commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_commit_id").toString())); - } - if (!jsonObj.get("destination_commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `destination_commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destination_commit_id").toString())); - } - if (!jsonObj.get("base_commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `base_commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("base_commit_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FindMergeBaseResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FindMergeBaseResult' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FindMergeBaseResult.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FindMergeBaseResult value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FindMergeBaseResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FindMergeBaseResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of FindMergeBaseResult - * @throws IOException if the JSON string is invalid with respect to FindMergeBaseResult - */ - public static FindMergeBaseResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FindMergeBaseResult.class); - } - - /** - * Convert an instance of FindMergeBaseResult to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ForgotPasswordRequest.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ForgotPasswordRequest.java index 312f764e35d..4aecfceeb90 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ForgotPasswordRequest.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ForgotPasswordRequest.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ForgotPasswordRequest */ @@ -52,8 +33,6 @@ public class ForgotPasswordRequest { @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public ForgotPasswordRequest() { - } public ForgotPasswordRequest email(String email) { @@ -66,6 +45,7 @@ public ForgotPasswordRequest email(String email) { * @return email **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getEmail() { return email; @@ -77,7 +57,6 @@ public void setEmail(String email) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,99 +94,5 @@ private String toIndentedString(Object o) { 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("email"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("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 ForgotPasswordRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ForgotPasswordRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ForgotPasswordRequest is not found in the empty JSON string", ForgotPasswordRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ForgotPasswordRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ForgotPasswordRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ForgotPasswordRequest.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 (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ForgotPasswordRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ForgotPasswordRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ForgotPasswordRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ForgotPasswordRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ForgotPasswordRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ForgotPasswordRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ForgotPasswordRequest - * @throws IOException if the JSON string is invalid with respect to ForgotPasswordRequest - */ - public static ForgotPasswordRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ForgotPasswordRequest.class); - } - - /** - * Convert an instance of ForgotPasswordRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionConfig.java b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionConfig.java index 7c6d316af53..feeac0d79f3 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionConfig.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionConfig.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * GarbageCollectionConfig */ @@ -52,8 +33,6 @@ public class GarbageCollectionConfig { @SerializedName(SERIALIZED_NAME_GRACE_PERIOD) private Integer gracePeriod; - public GarbageCollectionConfig() { - } public GarbageCollectionConfig gracePeriod(Integer gracePeriod) { @@ -66,6 +45,7 @@ public GarbageCollectionConfig gracePeriod(Integer gracePeriod) { * @return gracePeriod **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Duration in seconds. Objects created in the recent grace_period will not be collected.") public Integer getGracePeriod() { return gracePeriod; @@ -77,7 +57,6 @@ public void setGracePeriod(Integer gracePeriod) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,88 +94,5 @@ private String toIndentedString(Object o) { 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("grace_period"); - - // 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 GarbageCollectionConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GarbageCollectionConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GarbageCollectionConfig is not found in the empty JSON string", GarbageCollectionConfig.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!GarbageCollectionConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GarbageCollectionConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GarbageCollectionConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GarbageCollectionConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GarbageCollectionConfig.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GarbageCollectionConfig value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GarbageCollectionConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GarbageCollectionConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of GarbageCollectionConfig - * @throws IOException if the JSON string is invalid with respect to GarbageCollectionConfig - */ - public static GarbageCollectionConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GarbageCollectionConfig.class); - } - - /** - * Convert an instance of GarbageCollectionConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequest.java b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequest.java index 22e198e4da9..d959ea81f11 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequest.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequest.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * GarbageCollectionPrepareRequest */ @@ -52,8 +33,6 @@ public class GarbageCollectionPrepareRequest { @SerializedName(SERIALIZED_NAME_PREVIOUS_RUN_ID) private String previousRunId; - public GarbageCollectionPrepareRequest() { - } public GarbageCollectionPrepareRequest previousRunId(String previousRunId) { @@ -66,6 +45,7 @@ public GarbageCollectionPrepareRequest previousRunId(String previousRunId) { * @return previousRunId **/ @javax.annotation.Nullable + @ApiModelProperty(example = "64eaa103-d726-4a33-bcb8-7c0b4abfe09e", value = "run id of a previous successful GC job") public String getPreviousRunId() { return previousRunId; @@ -77,7 +57,6 @@ public void setPreviousRunId(String previousRunId) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,91 +94,5 @@ private String toIndentedString(Object o) { 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("previous_run_id"); - - // 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 GarbageCollectionPrepareRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GarbageCollectionPrepareRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GarbageCollectionPrepareRequest is not found in the empty JSON string", GarbageCollectionPrepareRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!GarbageCollectionPrepareRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GarbageCollectionPrepareRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("previous_run_id") != null && !jsonObj.get("previous_run_id").isJsonNull()) && !jsonObj.get("previous_run_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `previous_run_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previous_run_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GarbageCollectionPrepareRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GarbageCollectionPrepareRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GarbageCollectionPrepareRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GarbageCollectionPrepareRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GarbageCollectionPrepareRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GarbageCollectionPrepareRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of GarbageCollectionPrepareRequest - * @throws IOException if the JSON string is invalid with respect to GarbageCollectionPrepareRequest - */ - public static GarbageCollectionPrepareRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GarbageCollectionPrepareRequest.class); - } - - /** - * Convert an instance of GarbageCollectionPrepareRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponse.java b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponse.java index 8a13a54bbee..7dea0fc9ad4 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponse.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponse.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * GarbageCollectionPrepareResponse */ @@ -60,8 +41,6 @@ public class GarbageCollectionPrepareResponse { @SerializedName(SERIALIZED_NAME_GC_ADDRESSES_LOCATION) private String gcAddressesLocation; - public GarbageCollectionPrepareResponse() { - } public GarbageCollectionPrepareResponse runId(String runId) { @@ -74,6 +53,7 @@ public GarbageCollectionPrepareResponse runId(String runId) { * @return runId **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "64eaa103-d726-4a33-bcb8-7c0b4abfe09e", required = true, value = "a unique identifier generated for this GC job") public String getRunId() { return runId; @@ -96,6 +76,7 @@ public GarbageCollectionPrepareResponse gcCommitsLocation(String gcCommitsLocati * @return gcCommitsLocation **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "s3://my-storage-namespace/_lakefs/retention/commits", required = true, value = "location of the resulting commits csv table (partitioned by run_id)") public String getGcCommitsLocation() { return gcCommitsLocation; @@ -118,6 +99,7 @@ public GarbageCollectionPrepareResponse gcAddressesLocation(String gcAddressesLo * @return gcAddressesLocation **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "s3://my-storage-namespace/_lakefs/retention/addresses", required = true, value = "location to use for expired addresses parquet table (partitioned by run_id)") public String getGcAddressesLocation() { return gcAddressesLocation; @@ -129,7 +111,6 @@ public void setGcAddressesLocation(String gcAddressesLocation) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,109 +152,5 @@ private String toIndentedString(Object o) { 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("run_id"); - openapiFields.add("gc_commits_location"); - openapiFields.add("gc_addresses_location"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("run_id"); - openapiRequiredFields.add("gc_commits_location"); - openapiRequiredFields.add("gc_addresses_location"); - } - - /** - * 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 GarbageCollectionPrepareResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GarbageCollectionPrepareResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GarbageCollectionPrepareResponse is not found in the empty JSON string", GarbageCollectionPrepareResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!GarbageCollectionPrepareResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GarbageCollectionPrepareResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GarbageCollectionPrepareResponse.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 (!jsonObj.get("run_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `run_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("run_id").toString())); - } - if (!jsonObj.get("gc_commits_location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `gc_commits_location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gc_commits_location").toString())); - } - if (!jsonObj.get("gc_addresses_location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `gc_addresses_location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gc_addresses_location").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GarbageCollectionPrepareResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GarbageCollectionPrepareResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GarbageCollectionPrepareResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GarbageCollectionPrepareResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GarbageCollectionPrepareResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GarbageCollectionPrepareResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GarbageCollectionPrepareResponse - * @throws IOException if the JSON string is invalid with respect to GarbageCollectionPrepareResponse - */ - public static GarbageCollectionPrepareResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GarbageCollectionPrepareResponse.class); - } - - /** - * Convert an instance of GarbageCollectionPrepareResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRule.java b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRule.java index 2c66d81c86e..ba7671d0c3c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRule.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRule.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * GarbageCollectionRule */ @@ -56,8 +37,6 @@ public class GarbageCollectionRule { @SerializedName(SERIALIZED_NAME_RETENTION_DAYS) private Integer retentionDays; - public GarbageCollectionRule() { - } public GarbageCollectionRule branchId(String branchId) { @@ -70,6 +49,7 @@ public GarbageCollectionRule branchId(String branchId) { * @return branchId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getBranchId() { return branchId; @@ -92,6 +72,7 @@ public GarbageCollectionRule retentionDays(Integer retentionDays) { * @return retentionDays **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Integer getRetentionDays() { return retentionDays; @@ -103,7 +84,6 @@ public void setRetentionDays(Integer retentionDays) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,101 +123,5 @@ private String toIndentedString(Object o) { 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("branch_id"); - openapiFields.add("retention_days"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("branch_id"); - openapiRequiredFields.add("retention_days"); - } - - /** - * 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 GarbageCollectionRule - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GarbageCollectionRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GarbageCollectionRule is not found in the empty JSON string", GarbageCollectionRule.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!GarbageCollectionRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GarbageCollectionRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GarbageCollectionRule.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 (!jsonObj.get("branch_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `branch_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branch_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GarbageCollectionRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GarbageCollectionRule' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GarbageCollectionRule.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GarbageCollectionRule value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GarbageCollectionRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GarbageCollectionRule given an JSON string - * - * @param jsonString JSON string - * @return An instance of GarbageCollectionRule - * @throws IOException if the JSON string is invalid with respect to GarbageCollectionRule - */ - public static GarbageCollectionRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GarbageCollectionRule.class); - } - - /** - * Convert an instance of GarbageCollectionRule to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRules.java b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRules.java index e477d2e22f8..0de28d93399 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRules.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/GarbageCollectionRules.java @@ -21,31 +21,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.GarbageCollectionRule; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * GarbageCollectionRules */ @@ -57,10 +38,8 @@ public class GarbageCollectionRules { public static final String SERIALIZED_NAME_BRANCHES = "branches"; @SerializedName(SERIALIZED_NAME_BRANCHES) - private List branches = new ArrayList<>(); + private List branches = new ArrayList(); - public GarbageCollectionRules() { - } public GarbageCollectionRules defaultRetentionDays(Integer defaultRetentionDays) { @@ -73,6 +52,7 @@ public GarbageCollectionRules defaultRetentionDays(Integer defaultRetentionDays) * @return defaultRetentionDays **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Integer getDefaultRetentionDays() { return defaultRetentionDays; @@ -100,6 +80,7 @@ public GarbageCollectionRules addBranchesItem(GarbageCollectionRule branchesItem * @return branches **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getBranches() { return branches; @@ -111,7 +92,6 @@ public void setBranches(List branches) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -151,108 +131,5 @@ private String toIndentedString(Object o) { 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("default_retention_days"); - openapiFields.add("branches"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("default_retention_days"); - openapiRequiredFields.add("branches"); - } - - /** - * 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 GarbageCollectionRules - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GarbageCollectionRules.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GarbageCollectionRules is not found in the empty JSON string", GarbageCollectionRules.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!GarbageCollectionRules.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GarbageCollectionRules` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GarbageCollectionRules.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())); - } - } - // ensure the json data is an array - if (!jsonObj.get("branches").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `branches` to be an array in the JSON string but got `%s`", jsonObj.get("branches").toString())); - } - - JsonArray jsonArraybranches = jsonObj.getAsJsonArray("branches"); - // validate the required field `branches` (array) - for (int i = 0; i < jsonArraybranches.size(); i++) { - GarbageCollectionRule.validateJsonObject(jsonArraybranches.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GarbageCollectionRules.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GarbageCollectionRules' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GarbageCollectionRules.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GarbageCollectionRules value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GarbageCollectionRules read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GarbageCollectionRules given an JSON string - * - * @param jsonString JSON string - * @return An instance of GarbageCollectionRules - * @throws IOException if the JSON string is invalid with respect to GarbageCollectionRules - */ - public static GarbageCollectionRules fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GarbageCollectionRules.class); - } - - /** - * Convert an instance of GarbageCollectionRules to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Group.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Group.java index ad69da7db5c..ac9811adf89 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Group.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Group.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Group */ @@ -56,8 +37,6 @@ public class Group { @SerializedName(SERIALIZED_NAME_CREATION_DATE) private Long creationDate; - public Group() { - } public Group id(String id) { @@ -70,6 +49,7 @@ public Group id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -92,6 +72,7 @@ public Group creationDate(Long creationDate) { * @return creationDate **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Unix Epoch in seconds") public Long getCreationDate() { return creationDate; @@ -103,7 +84,6 @@ public void setCreationDate(Long creationDate) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,101 +123,5 @@ private String toIndentedString(Object o) { 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("creation_date"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("creation_date"); - } - - /** - * 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 Group - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Group.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Group is not found in the empty JSON string", Group.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Group.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Group` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Group.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 (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Group.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Group' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Group.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Group value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Group read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Group given an JSON string - * - * @param jsonString JSON string - * @return An instance of Group - * @throws IOException if the JSON string is invalid with respect to Group - */ - public static Group fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Group.class); - } - - /** - * Convert an instance of Group to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/GroupCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/GroupCreation.java index 8ba03ec4dd3..84d873353f0 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/GroupCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/GroupCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * GroupCreation */ @@ -52,8 +33,6 @@ public class GroupCreation { @SerializedName(SERIALIZED_NAME_ID) private String id; - public GroupCreation() { - } public GroupCreation id(String id) { @@ -66,6 +45,7 @@ public GroupCreation id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -77,7 +57,6 @@ public void setId(String id) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,99 +94,5 @@ private String toIndentedString(Object o) { 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"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - 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 GroupCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupCreation is not found in the empty JSON string", GroupCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!GroupCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GroupCreation.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 (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GroupCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GroupCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GroupCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GroupCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GroupCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GroupCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupCreation - * @throws IOException if the JSON string is invalid with respect to GroupCreation - */ - public static GroupCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GroupCreation.class); - } - - /** - * Convert an instance of GroupCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/GroupList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/GroupList.java index 999403d0d8a..3efa5cc641d 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/GroupList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/GroupList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Group; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * GroupList */ @@ -58,10 +39,8 @@ public class GroupList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public GroupList() { - } public GroupList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public GroupList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public GroupList addResultsItem(Group resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 GroupList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GroupList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GroupList is not found in the empty JSON string", GroupList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!GroupList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GroupList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - Group.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GroupList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GroupList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GroupList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GroupList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GroupList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GroupList given an JSON string - * - * @param jsonString JSON string - * @return An instance of GroupList - * @throws IOException if the JSON string is invalid with respect to GroupList - */ - public static GroupList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GroupList.class); - } - - /** - * Convert an instance of GroupList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/HookRun.java b/clients/java/src/main/java/io/lakefs/clients/api/model/HookRun.java index 010a30113b5..fec12340d06 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/HookRun.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/HookRun.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; +import org.threeten.bp.OffsetDateTime; /** * HookRun @@ -120,8 +101,6 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_STATUS) private StatusEnum status; - public HookRun() { - } public HookRun hookRunId(String hookRunId) { @@ -134,6 +113,7 @@ public HookRun hookRunId(String hookRunId) { * @return hookRunId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getHookRunId() { return hookRunId; @@ -156,6 +136,7 @@ public HookRun action(String action) { * @return action **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getAction() { return action; @@ -178,6 +159,7 @@ public HookRun hookId(String hookId) { * @return hookId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getHookId() { return hookId; @@ -200,6 +182,7 @@ public HookRun startTime(OffsetDateTime startTime) { * @return startTime **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public OffsetDateTime getStartTime() { return startTime; @@ -222,6 +205,7 @@ public HookRun endTime(OffsetDateTime endTime) { * @return endTime **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public OffsetDateTime getEndTime() { return endTime; @@ -244,6 +228,7 @@ public HookRun status(StatusEnum status) { * @return status **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public StatusEnum getStatus() { return status; @@ -255,7 +240,6 @@ public void setStatus(StatusEnum status) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -303,117 +287,5 @@ private String toIndentedString(Object o) { 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("hook_run_id"); - openapiFields.add("action"); - openapiFields.add("hook_id"); - openapiFields.add("start_time"); - openapiFields.add("end_time"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("hook_run_id"); - openapiRequiredFields.add("action"); - openapiRequiredFields.add("hook_id"); - openapiRequiredFields.add("start_time"); - openapiRequiredFields.add("status"); - } - - /** - * 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 HookRun - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!HookRun.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in HookRun is not found in the empty JSON string", HookRun.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!HookRun.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HookRun` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : HookRun.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 (!jsonObj.get("hook_run_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hook_run_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hook_run_id").toString())); - } - if (!jsonObj.get("action").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `action` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action").toString())); - } - if (!jsonObj.get("hook_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hook_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hook_id").toString())); - } - if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HookRun.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HookRun' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(HookRun.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, HookRun value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HookRun read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of HookRun given an JSON string - * - * @param jsonString JSON string - * @return An instance of HookRun - * @throws IOException if the JSON string is invalid with respect to HookRun - */ - public static HookRun fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HookRun.class); - } - - /** - * Convert an instance of HookRun to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/HookRunList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/HookRunList.java index c331388ada8..2d3683f039d 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/HookRunList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/HookRunList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.HookRun; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * HookRunList */ @@ -58,10 +39,8 @@ public class HookRunList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public HookRunList() { - } public HookRunList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public HookRunList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public HookRunList addResultsItem(HookRun resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 HookRunList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!HookRunList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in HookRunList is not found in the empty JSON string", HookRunList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!HookRunList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HookRunList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : HookRunList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - HookRun.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HookRunList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HookRunList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(HookRunList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, HookRunList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HookRunList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of HookRunList given an JSON string - * - * @param jsonString JSON string - * @return An instance of HookRunList - * @throws IOException if the JSON string is invalid with respect to HookRunList - */ - public static HookRunList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HookRunList.class); - } - - /** - * Convert an instance of HookRunList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ImportPagination.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ImportPagination.java index 15bcbe5a3ef..3eff47ce538 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ImportPagination.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ImportPagination.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ImportPagination */ @@ -60,8 +41,6 @@ public class ImportPagination { @SerializedName(SERIALIZED_NAME_LAST_KEY) private String lastKey; - public ImportPagination() { - } public ImportPagination hasMore(Boolean hasMore) { @@ -74,6 +53,7 @@ public ImportPagination hasMore(Boolean hasMore) { * @return hasMore **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "More keys to be ingested.") public Boolean getHasMore() { return hasMore; @@ -96,6 +76,7 @@ public ImportPagination continuationToken(String continuationToken) { * @return continuationToken **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Opaque. Token used to import the next range.") public String getContinuationToken() { return continuationToken; @@ -118,6 +99,7 @@ public ImportPagination lastKey(String lastKey) { * @return lastKey **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Last object store key that was ingested.") public String getLastKey() { return lastKey; @@ -129,7 +111,6 @@ public void setLastKey(String lastKey) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,105 +152,5 @@ private String toIndentedString(Object o) { 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("has_more"); - openapiFields.add("continuation_token"); - openapiFields.add("last_key"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("has_more"); - openapiRequiredFields.add("last_key"); - } - - /** - * 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 ImportPagination - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ImportPagination.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ImportPagination is not found in the empty JSON string", ImportPagination.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ImportPagination.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportPagination` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ImportPagination.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 ((jsonObj.get("continuation_token") != null && !jsonObj.get("continuation_token").isJsonNull()) && !jsonObj.get("continuation_token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `continuation_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("continuation_token").toString())); - } - if (!jsonObj.get("last_key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_key").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ImportPagination.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ImportPagination' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ImportPagination.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ImportPagination value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ImportPagination read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ImportPagination given an JSON string - * - * @param jsonString JSON string - * @return An instance of ImportPagination - * @throws IOException if the JSON string is invalid with respect to ImportPagination - */ - public static ImportPagination fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ImportPagination.class); - } - - /** - * Convert an instance of ImportPagination to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/IngestRangeCreationResponse.java b/clients/java/src/main/java/io/lakefs/clients/api/model/IngestRangeCreationResponse.java index 9330194cda9..eef58e3a41c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/IngestRangeCreationResponse.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/IngestRangeCreationResponse.java @@ -22,29 +22,10 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ImportPagination; import io.lakefs.clients.api.model.RangeMetadata; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * IngestRangeCreationResponse */ @@ -58,8 +39,6 @@ public class IngestRangeCreationResponse { @SerializedName(SERIALIZED_NAME_PAGINATION) private ImportPagination pagination; - public IngestRangeCreationResponse() { - } public IngestRangeCreationResponse range(RangeMetadata range) { @@ -72,6 +51,7 @@ public IngestRangeCreationResponse range(RangeMetadata range) { * @return range **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public RangeMetadata getRange() { return range; @@ -94,6 +74,7 @@ public IngestRangeCreationResponse pagination(ImportPagination pagination) { * @return pagination **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public ImportPagination getPagination() { return pagination; @@ -105,7 +86,6 @@ public void setPagination(ImportPagination pagination) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -145,97 +125,5 @@ private String toIndentedString(Object o) { 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("range"); - openapiFields.add("pagination"); - - // 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 IngestRangeCreationResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!IngestRangeCreationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IngestRangeCreationResponse is not found in the empty JSON string", IngestRangeCreationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!IngestRangeCreationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IngestRangeCreationResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - // validate the optional field `range` - if (jsonObj.get("range") != null && !jsonObj.get("range").isJsonNull()) { - RangeMetadata.validateJsonObject(jsonObj.getAsJsonObject("range")); - } - // validate the optional field `pagination` - if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { - ImportPagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IngestRangeCreationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IngestRangeCreationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IngestRangeCreationResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IngestRangeCreationResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IngestRangeCreationResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IngestRangeCreationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of IngestRangeCreationResponse - * @throws IOException if the JSON string is invalid with respect to IngestRangeCreationResponse - */ - public static IngestRangeCreationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IngestRangeCreationResponse.class); - } - - /** - * Convert an instance of IngestRangeCreationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/InlineObject1.java b/clients/java/src/main/java/io/lakefs/clients/api/model/InlineObject1.java new file mode 100644 index 00000000000..f83be9ab7cb --- /dev/null +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/InlineObject1.java @@ -0,0 +1,98 @@ +/* + * lakeFS API + * lakeFS HTTP API + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.lakefs.clients.api.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; + +/** + * InlineObject1 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InlineObject1 { + public static final String SERIALIZED_NAME_PATTERN = "pattern"; + @SerializedName(SERIALIZED_NAME_PATTERN) + private String pattern; + + + public InlineObject1 pattern(String pattern) { + + this.pattern = pattern; + return this; + } + + /** + * Get pattern + * @return pattern + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + + public String getPattern() { + return pattern; + } + + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineObject1 inlineObject1 = (InlineObject1) o; + return Objects.equals(this.pattern, inlineObject1.pattern); + } + + @Override + public int hashCode() { + return Objects.hash(pattern); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineObject1 {\n"); + sb.append(" pattern: ").append(toIndentedString(pattern)).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 "); + } + +} + diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/LoginConfig.java b/clients/java/src/main/java/io/lakefs/clients/api/model/LoginConfig.java index 72a63d72285..f30ce363a7f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/LoginConfig.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/LoginConfig.java @@ -20,31 +20,12 @@ 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.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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * LoginConfig */ @@ -119,14 +100,12 @@ public RBACEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_LOGIN_COOKIE_NAMES = "login_cookie_names"; @SerializedName(SERIALIZED_NAME_LOGIN_COOKIE_NAMES) - private List loginCookieNames = new ArrayList<>(); + private List loginCookieNames = new ArrayList(); public static final String SERIALIZED_NAME_LOGOUT_URL = "logout_url"; @SerializedName(SERIALIZED_NAME_LOGOUT_URL) private String logoutUrl; - public LoginConfig() { - } public LoginConfig RBAC(RBACEnum RBAC) { @@ -139,6 +118,7 @@ public LoginConfig RBAC(RBACEnum RBAC) { * @return RBAC **/ @javax.annotation.Nullable + @ApiModelProperty(value = "RBAC will remain enabled on GUI if \"external\". That only works with an external auth service. ") public RBACEnum getRBAC() { return RBAC; @@ -161,6 +141,7 @@ public LoginConfig loginUrl(String loginUrl) { * @return loginUrl **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "primary URL to use for login.") public String getLoginUrl() { return loginUrl; @@ -183,6 +164,7 @@ public LoginConfig loginFailedMessage(String loginFailedMessage) { * @return loginFailedMessage **/ @javax.annotation.Nullable + @ApiModelProperty(value = "message to display to users who fail to login; a full sentence that is rendered in HTML and may contain a link to a secondary login method ") public String getLoginFailedMessage() { return loginFailedMessage; @@ -205,6 +187,7 @@ public LoginConfig fallbackLoginUrl(String fallbackLoginUrl) { * @return fallbackLoginUrl **/ @javax.annotation.Nullable + @ApiModelProperty(value = "secondary URL to offer users to use for login.") public String getFallbackLoginUrl() { return fallbackLoginUrl; @@ -227,6 +210,7 @@ public LoginConfig fallbackLoginLabel(String fallbackLoginLabel) { * @return fallbackLoginLabel **/ @javax.annotation.Nullable + @ApiModelProperty(value = "label to place on fallback_login_url.") public String getFallbackLoginLabel() { return fallbackLoginLabel; @@ -254,6 +238,7 @@ public LoginConfig addLoginCookieNamesItem(String loginCookieNamesItem) { * @return loginCookieNames **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "cookie names used to store JWT") public List getLoginCookieNames() { return loginCookieNames; @@ -276,6 +261,7 @@ public LoginConfig logoutUrl(String logoutUrl) { * @return logoutUrl **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "URL to use for logging out.") public String getLogoutUrl() { return logoutUrl; @@ -287,7 +273,6 @@ public void setLogoutUrl(String logoutUrl) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -337,128 +322,5 @@ private String toIndentedString(Object o) { 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("RBAC"); - openapiFields.add("login_url"); - openapiFields.add("login_failed_message"); - openapiFields.add("fallback_login_url"); - openapiFields.add("fallback_login_label"); - openapiFields.add("login_cookie_names"); - openapiFields.add("logout_url"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("login_url"); - openapiRequiredFields.add("login_cookie_names"); - openapiRequiredFields.add("logout_url"); - } - - /** - * 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 LoginConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LoginConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LoginConfig is not found in the empty JSON string", LoginConfig.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LoginConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoginConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoginConfig.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 ((jsonObj.get("RBAC") != null && !jsonObj.get("RBAC").isJsonNull()) && !jsonObj.get("RBAC").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `RBAC` to be a primitive type in the JSON string but got `%s`", jsonObj.get("RBAC").toString())); - } - if (!jsonObj.get("login_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_url").toString())); - } - if ((jsonObj.get("login_failed_message") != null && !jsonObj.get("login_failed_message").isJsonNull()) && !jsonObj.get("login_failed_message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `login_failed_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_failed_message").toString())); - } - if ((jsonObj.get("fallback_login_url") != null && !jsonObj.get("fallback_login_url").isJsonNull()) && !jsonObj.get("fallback_login_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallback_login_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallback_login_url").toString())); - } - if ((jsonObj.get("fallback_login_label") != null && !jsonObj.get("fallback_login_label").isJsonNull()) && !jsonObj.get("fallback_login_label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallback_login_label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallback_login_label").toString())); - } - // ensure the required json array is present - if (jsonObj.get("login_cookie_names") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("login_cookie_names").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `login_cookie_names` to be an array in the JSON string but got `%s`", jsonObj.get("login_cookie_names").toString())); - } - if (!jsonObj.get("logout_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `logout_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logout_url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LoginConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoginConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LoginConfig.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LoginConfig value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LoginConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LoginConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoginConfig - * @throws IOException if the JSON string is invalid with respect to LoginConfig - */ - public static LoginConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LoginConfig.class); - } - - /** - * Convert an instance of LoginConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/LoginInformation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/LoginInformation.java index 03792f5711f..588b2ff05af 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/LoginInformation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/LoginInformation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * LoginInformation */ @@ -56,8 +37,6 @@ public class LoginInformation { @SerializedName(SERIALIZED_NAME_SECRET_ACCESS_KEY) private String secretAccessKey; - public LoginInformation() { - } public LoginInformation accessKeyId(String accessKeyId) { @@ -70,6 +49,7 @@ public LoginInformation accessKeyId(String accessKeyId) { * @return accessKeyId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getAccessKeyId() { return accessKeyId; @@ -92,6 +72,7 @@ public LoginInformation secretAccessKey(String secretAccessKey) { * @return secretAccessKey **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getSecretAccessKey() { return secretAccessKey; @@ -103,7 +84,6 @@ public void setSecretAccessKey(String secretAccessKey) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,104 +123,5 @@ private String toIndentedString(Object o) { 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_key_id"); - openapiFields.add("secret_access_key"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("access_key_id"); - openapiRequiredFields.add("secret_access_key"); - } - - /** - * 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 LoginInformation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!LoginInformation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LoginInformation is not found in the empty JSON string", LoginInformation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!LoginInformation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LoginInformation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoginInformation.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 (!jsonObj.get("access_key_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `access_key_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("access_key_id").toString())); - } - if (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LoginInformation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LoginInformation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LoginInformation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LoginInformation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public LoginInformation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LoginInformation given an JSON string - * - * @param jsonString JSON string - * @return An instance of LoginInformation - * @throws IOException if the JSON string is invalid with respect to LoginInformation - */ - public static LoginInformation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LoginInformation.class); - } - - /** - * Convert an instance of LoginInformation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Merge.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Merge.java index 313bcc1ccd1..062603a1c6f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Merge.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Merge.java @@ -20,30 +20,12 @@ 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.HashMap; -import java.util.Map; - -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; /** * Merge @@ -56,14 +38,12 @@ public class Merge { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) - private Map metadata = new HashMap<>(); + private Map metadata = null; public static final String SERIALIZED_NAME_STRATEGY = "strategy"; @SerializedName(SERIALIZED_NAME_STRATEGY) private String strategy; - public Merge() { - } public Merge message(String message) { @@ -76,6 +56,7 @@ public Merge message(String message) { * @return message **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getMessage() { return message; @@ -95,7 +76,7 @@ public Merge metadata(Map metadata) { public Merge putMetadataItem(String key, String metadataItem) { if (this.metadata == null) { - this.metadata = new HashMap<>(); + this.metadata = new HashMap(); } this.metadata.put(key, metadataItem); return this; @@ -106,6 +87,7 @@ public Merge putMetadataItem(String key, String metadataItem) { * @return metadata **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Map getMetadata() { return metadata; @@ -128,6 +110,7 @@ public Merge strategy(String strategy) { * @return strategy **/ @javax.annotation.Nullable + @ApiModelProperty(value = "In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict") public String getStrategy() { return strategy; @@ -139,7 +122,6 @@ public void setStrategy(String strategy) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -181,96 +163,5 @@ private String toIndentedString(Object o) { 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("message"); - openapiFields.add("metadata"); - openapiFields.add("strategy"); - - // 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 Merge - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Merge.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Merge is not found in the empty JSON string", Merge.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Merge.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Merge` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - 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())); - } - if ((jsonObj.get("strategy") != null && !jsonObj.get("strategy").isJsonNull()) && !jsonObj.get("strategy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `strategy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("strategy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Merge.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Merge' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Merge.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Merge value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Merge read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Merge given an JSON string - * - * @param jsonString JSON string - * @return An instance of Merge - * @throws IOException if the JSON string is invalid with respect to Merge - */ - public static Merge fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Merge.class); - } - - /** - * Convert an instance of Merge to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResult.java b/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResult.java index 759638c1714..3896a383205 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResult.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResult.java @@ -21,29 +21,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.MergeResultSummary; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * MergeResult */ @@ -57,8 +38,6 @@ public class MergeResult { @SerializedName(SERIALIZED_NAME_REFERENCE) private String reference; - public MergeResult() { - } public MergeResult summary(MergeResultSummary summary) { @@ -71,6 +50,7 @@ public MergeResult summary(MergeResultSummary summary) { * @return summary **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public MergeResultSummary getSummary() { return summary; @@ -93,6 +73,7 @@ public MergeResult reference(String reference) { * @return reference **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getReference() { return reference; @@ -104,7 +85,6 @@ public void setReference(String reference) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,104 +124,5 @@ private String toIndentedString(Object o) { 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("summary"); - openapiFields.add("reference"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("reference"); - } - - /** - * 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 MergeResult - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MergeResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MergeResult is not found in the empty JSON string", MergeResult.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MergeResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MergeResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MergeResult.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())); - } - } - // validate the optional field `summary` - if (jsonObj.get("summary") != null && !jsonObj.get("summary").isJsonNull()) { - MergeResultSummary.validateJsonObject(jsonObj.getAsJsonObject("summary")); - } - if (!jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MergeResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MergeResult' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MergeResult.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MergeResult value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MergeResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MergeResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of MergeResult - * @throws IOException if the JSON string is invalid with respect to MergeResult - */ - public static MergeResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MergeResult.class); - } - - /** - * Convert an instance of MergeResult to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResultSummary.java b/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResultSummary.java index 8dee7ae2a21..f9277e2ff6e 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResultSummary.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/MergeResultSummary.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * MergeResultSummary */ @@ -64,8 +45,6 @@ public class MergeResultSummary { @SerializedName(SERIALIZED_NAME_CONFLICT) private Integer conflict; - public MergeResultSummary() { - } public MergeResultSummary added(Integer added) { @@ -80,6 +59,7 @@ public MergeResultSummary added(Integer added) { **/ @Deprecated @javax.annotation.Nullable + @ApiModelProperty(value = "Deprecated: inaccurate and will be removed.") public Integer getAdded() { return added; @@ -104,6 +84,7 @@ public MergeResultSummary removed(Integer removed) { **/ @Deprecated @javax.annotation.Nullable + @ApiModelProperty(value = "Deprecated: inaccurate and will be removed.") public Integer getRemoved() { return removed; @@ -128,6 +109,7 @@ public MergeResultSummary changed(Integer changed) { **/ @Deprecated @javax.annotation.Nullable + @ApiModelProperty(value = "Deprecated: inaccurate and will be removed.") public Integer getChanged() { return changed; @@ -152,6 +134,7 @@ public MergeResultSummary conflict(Integer conflict) { **/ @Deprecated @javax.annotation.Nullable + @ApiModelProperty(value = "Deprecated: inaccurate and will be removed.") public Integer getConflict() { return conflict; @@ -163,7 +146,6 @@ public void setConflict(Integer conflict) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -207,91 +189,5 @@ private String toIndentedString(Object o) { 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("added"); - openapiFields.add("removed"); - openapiFields.add("changed"); - openapiFields.add("conflict"); - - // 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 MergeResultSummary - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MergeResultSummary.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MergeResultSummary is not found in the empty JSON string", MergeResultSummary.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MergeResultSummary.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MergeResultSummary` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MergeResultSummary.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MergeResultSummary' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MergeResultSummary.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MergeResultSummary value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MergeResultSummary read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MergeResultSummary given an JSON string - * - * @param jsonString JSON string - * @return An instance of MergeResultSummary - * @throws IOException if the JSON string is invalid with respect to MergeResultSummary - */ - public static MergeResultSummary fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MergeResultSummary.class); - } - - /** - * Convert an instance of MergeResultSummary to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreation.java index a450dd18328..59791fcae75 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreation.java @@ -21,31 +21,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.RangeMetadata; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * MetaRangeCreation */ @@ -53,10 +34,8 @@ public class MetaRangeCreation { public static final String SERIALIZED_NAME_RANGES = "ranges"; @SerializedName(SERIALIZED_NAME_RANGES) - private List ranges = new ArrayList<>(); + private List ranges = new ArrayList(); - public MetaRangeCreation() { - } public MetaRangeCreation ranges(List ranges) { @@ -74,6 +53,7 @@ public MetaRangeCreation addRangesItem(RangeMetadata rangesItem) { * @return ranges **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getRanges() { return ranges; @@ -85,7 +65,6 @@ public void setRanges(List ranges) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -123,106 +102,5 @@ private String toIndentedString(Object o) { 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("ranges"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ranges"); - } - - /** - * 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 MetaRangeCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MetaRangeCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetaRangeCreation is not found in the empty JSON string", MetaRangeCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MetaRangeCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetaRangeCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetaRangeCreation.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())); - } - } - // 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())); - } - - JsonArray jsonArrayranges = jsonObj.getAsJsonArray("ranges"); - // validate the required field `ranges` (array) - for (int i = 0; i < jsonArrayranges.size(); i++) { - RangeMetadata.validateJsonObject(jsonArrayranges.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetaRangeCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetaRangeCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetaRangeCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetaRangeCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetaRangeCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetaRangeCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetaRangeCreation - * @throws IOException if the JSON string is invalid with respect to MetaRangeCreation - */ - public static MetaRangeCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetaRangeCreation.class); - } - - /** - * Convert an instance of MetaRangeCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreationResponse.java b/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreationResponse.java index 6594ca28a5e..4a00639b906 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreationResponse.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/MetaRangeCreationResponse.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * MetaRangeCreationResponse */ @@ -52,8 +33,6 @@ public class MetaRangeCreationResponse { @SerializedName(SERIALIZED_NAME_ID) private String id; - public MetaRangeCreationResponse() { - } public MetaRangeCreationResponse id(String id) { @@ -66,6 +45,7 @@ public MetaRangeCreationResponse id(String id) { * @return id **/ @javax.annotation.Nullable + @ApiModelProperty(value = "The id of the created metarange") public String getId() { return id; @@ -77,7 +57,6 @@ public void setId(String id) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,91 +94,5 @@ private String toIndentedString(Object o) { 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"); - - // 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 MetaRangeCreationResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!MetaRangeCreationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetaRangeCreationResponse is not found in the empty JSON string", MetaRangeCreationResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MetaRangeCreationResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetaRangeCreationResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetaRangeCreationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetaRangeCreationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetaRangeCreationResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetaRangeCreationResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetaRangeCreationResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetaRangeCreationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetaRangeCreationResponse - * @throws IOException if the JSON string is invalid with respect to MetaRangeCreationResponse - */ - public static MetaRangeCreationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetaRangeCreationResponse.class); - } - - /** - * Convert an instance of MetaRangeCreationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/NextStep.java b/clients/java/src/main/java/io/lakefs/clients/api/model/NextStep.java index 5d140611217..8889f6c18dc 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/NextStep.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/NextStep.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * NextStep */ @@ -52,8 +33,6 @@ public class NextStep { @SerializedName(SERIALIZED_NAME_NEXT_STEP) private String nextStep; - public NextStep() { - } public NextStep nextStep(String nextStep) { @@ -66,6 +45,7 @@ public NextStep nextStep(String nextStep) { * @return nextStep **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "the next step in the setup process") public String getNextStep() { return nextStep; @@ -77,7 +57,6 @@ public void setNextStep(String nextStep) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,99 +94,5 @@ private String toIndentedString(Object o) { 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("nextStep"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("nextStep"); - } - - /** - * 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 NextStep - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!NextStep.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NextStep is not found in the empty JSON string", NextStep.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!NextStep.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NextStep` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : NextStep.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 (!jsonObj.get("nextStep").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextStep` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextStep").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NextStep.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NextStep' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NextStep.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NextStep value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NextStep read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NextStep given an JSON string - * - * @param jsonString JSON string - * @return An instance of NextStep - * @throws IOException if the JSON string is invalid with respect to NextStep - */ - public static NextStep fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NextStep.class); - } - - /** - * Convert an instance of NextStep to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectCopyCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectCopyCreation.java index 70ec6c57b84..fc8ffe0f8c2 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectCopyCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectCopyCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ObjectCopyCreation */ @@ -56,8 +37,6 @@ public class ObjectCopyCreation { @SerializedName(SERIALIZED_NAME_SRC_REF) private String srcRef; - public ObjectCopyCreation() { - } public ObjectCopyCreation srcPath(String srcPath) { @@ -70,6 +49,7 @@ public ObjectCopyCreation srcPath(String srcPath) { * @return srcPath **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "path of the copied object relative to the ref") public String getSrcPath() { return srcPath; @@ -92,6 +72,7 @@ public ObjectCopyCreation srcRef(String srcRef) { * @return srcRef **/ @javax.annotation.Nullable + @ApiModelProperty(value = "a reference, if empty uses the provided branch as ref") public String getSrcRef() { return srcRef; @@ -103,7 +84,6 @@ public void setSrcRef(String srcRef) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,103 +123,5 @@ private String toIndentedString(Object o) { 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("src_path"); - openapiFields.add("src_ref"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("src_path"); - } - - /** - * 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 ObjectCopyCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ObjectCopyCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectCopyCreation is not found in the empty JSON string", ObjectCopyCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ObjectCopyCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectCopyCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ObjectCopyCreation.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 (!jsonObj.get("src_path").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `src_path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("src_path").toString())); - } - if ((jsonObj.get("src_ref") != null && !jsonObj.get("src_ref").isJsonNull()) && !jsonObj.get("src_ref").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `src_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("src_ref").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ObjectCopyCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ObjectCopyCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ObjectCopyCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ObjectCopyCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ObjectCopyCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ObjectCopyCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of ObjectCopyCreation - * @throws IOException if the JSON string is invalid with respect to ObjectCopyCreation - */ - public static ObjectCopyCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ObjectCopyCreation.class); - } - - /** - * Convert an instance of ObjectCopyCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectError.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectError.java index 67868f127f1..3eb8d7cb13f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectError.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectError.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ObjectError */ @@ -60,8 +41,6 @@ public class ObjectError { @SerializedName(SERIALIZED_NAME_PATH) private String path; - public ObjectError() { - } public ObjectError statusCode(Integer statusCode) { @@ -74,6 +53,7 @@ public ObjectError statusCode(Integer statusCode) { * @return statusCode **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "HTTP status code associated for operation on path") public Integer getStatusCode() { return statusCode; @@ -96,6 +76,7 @@ public ObjectError message(String message) { * @return message **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "short message explaining status_code") public String getMessage() { return message; @@ -118,6 +99,7 @@ public ObjectError path(String path) { * @return path **/ @javax.annotation.Nullable + @ApiModelProperty(value = "affected path") public String getPath() { return path; @@ -129,7 +111,6 @@ public void setPath(String path) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,105 +152,5 @@ private String toIndentedString(Object o) { 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("status_code"); - openapiFields.add("message"); - openapiFields.add("path"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status_code"); - openapiRequiredFields.add("message"); - } - - /** - * 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 ObjectError - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ObjectError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectError is not found in the empty JSON string", ObjectError.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ObjectError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ObjectError.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 (!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())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ObjectError.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ObjectError' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ObjectError.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ObjectError value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ObjectError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ObjectError given an JSON string - * - * @param jsonString JSON string - * @return An instance of ObjectError - * @throws IOException if the JSON string is invalid with respect to ObjectError - */ - public static ObjectError fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ObjectError.class); - } - - /** - * Convert an instance of ObjectError to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectErrorList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectErrorList.java index 2e0de4ddf49..e7f11110e01 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectErrorList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectErrorList.java @@ -21,31 +21,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ObjectError; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ObjectErrorList */ @@ -53,10 +34,8 @@ public class ObjectErrorList { public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = new ArrayList<>(); + private List errors = new ArrayList(); - public ObjectErrorList() { - } public ObjectErrorList errors(List errors) { @@ -74,6 +53,7 @@ public ObjectErrorList addErrorsItem(ObjectError errorsItem) { * @return errors **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getErrors() { return errors; @@ -85,7 +65,6 @@ public void setErrors(List errors) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -123,106 +102,5 @@ private String toIndentedString(Object o) { 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("errors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("errors"); - } - - /** - * 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 ObjectErrorList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ObjectErrorList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectErrorList is not found in the empty JSON string", ObjectErrorList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ObjectErrorList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectErrorList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ObjectErrorList.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())); - } - } - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - ObjectError.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ObjectErrorList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ObjectErrorList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ObjectErrorList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ObjectErrorList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ObjectErrorList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ObjectErrorList given an JSON string - * - * @param jsonString JSON string - * @return An instance of ObjectErrorList - * @throws IOException if the JSON string is invalid with respect to ObjectErrorList - */ - public static ObjectErrorList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ObjectErrorList.class); - } - - /** - * Convert an instance of ObjectErrorList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStageCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStageCreation.java index d07be4a03c9..17ac73e5074 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStageCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStageCreation.java @@ -20,30 +20,12 @@ 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.HashMap; -import java.util.Map; - -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; /** * ObjectStageCreation @@ -68,14 +50,12 @@ public class ObjectStageCreation { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) - private Map metadata = new HashMap<>(); + private Map metadata = null; public static final String SERIALIZED_NAME_CONTENT_TYPE = "content_type"; @SerializedName(SERIALIZED_NAME_CONTENT_TYPE) private String contentType; - public ObjectStageCreation() { - } public ObjectStageCreation physicalAddress(String physicalAddress) { @@ -88,6 +68,7 @@ public ObjectStageCreation physicalAddress(String physicalAddress) { * @return physicalAddress **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getPhysicalAddress() { return physicalAddress; @@ -110,6 +91,7 @@ public ObjectStageCreation checksum(String checksum) { * @return checksum **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getChecksum() { return checksum; @@ -132,6 +114,7 @@ public ObjectStageCreation sizeBytes(Long sizeBytes) { * @return sizeBytes **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Long getSizeBytes() { return sizeBytes; @@ -154,6 +137,7 @@ public ObjectStageCreation mtime(Long mtime) { * @return mtime **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Unix Epoch in seconds") public Long getMtime() { return mtime; @@ -173,7 +157,7 @@ public ObjectStageCreation metadata(Map metadata) { public ObjectStageCreation putMetadataItem(String key, String metadataItem) { if (this.metadata == null) { - this.metadata = new HashMap<>(); + this.metadata = new HashMap(); } this.metadata.put(key, metadataItem); return this; @@ -184,6 +168,7 @@ public ObjectStageCreation putMetadataItem(String key, String metadataItem) { * @return metadata **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Map getMetadata() { return metadata; @@ -206,6 +191,7 @@ public ObjectStageCreation contentType(String contentType) { * @return contentType **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Object media type") public String getContentType() { return contentType; @@ -217,7 +203,6 @@ public void setContentType(String contentType) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -265,112 +250,5 @@ private String toIndentedString(Object o) { 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("physical_address"); - openapiFields.add("checksum"); - openapiFields.add("size_bytes"); - openapiFields.add("mtime"); - openapiFields.add("metadata"); - openapiFields.add("content_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("physical_address"); - openapiRequiredFields.add("checksum"); - openapiRequiredFields.add("size_bytes"); - } - - /** - * 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 ObjectStageCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ObjectStageCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectStageCreation is not found in the empty JSON string", ObjectStageCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ObjectStageCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectStageCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ObjectStageCreation.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 (!jsonObj.get("physical_address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `physical_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("physical_address").toString())); - } - if (!jsonObj.get("checksum").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checksum` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checksum").toString())); - } - if ((jsonObj.get("content_type") != null && !jsonObj.get("content_type").isJsonNull()) && !jsonObj.get("content_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `content_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content_type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ObjectStageCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ObjectStageCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ObjectStageCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ObjectStageCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ObjectStageCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ObjectStageCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of ObjectStageCreation - * @throws IOException if the JSON string is invalid with respect to ObjectStageCreation - */ - public static ObjectStageCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ObjectStageCreation.class); - } - - /** - * Convert an instance of ObjectStageCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStats.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStats.java index 4a22e848c30..6a20e7c0a5d 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStats.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStats.java @@ -20,30 +20,12 @@ 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.HashMap; -import java.util.Map; - -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; /** * ObjectStats @@ -123,14 +105,12 @@ public PathTypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) - private Map metadata = new HashMap<>(); + private Map metadata = null; public static final String SERIALIZED_NAME_CONTENT_TYPE = "content_type"; @SerializedName(SERIALIZED_NAME_CONTENT_TYPE) private String contentType; - public ObjectStats() { - } public ObjectStats path(String path) { @@ -143,6 +123,7 @@ public ObjectStats path(String path) { * @return path **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getPath() { return path; @@ -165,6 +146,7 @@ public ObjectStats pathType(PathTypeEnum pathType) { * @return pathType **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public PathTypeEnum getPathType() { return pathType; @@ -187,6 +169,7 @@ public ObjectStats physicalAddress(String physicalAddress) { * @return physicalAddress **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The location of the object on the underlying object store. Formatted as a native URI with the object store type as scheme (\"s3://...\", \"gs://...\", etc.) Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET ") public String getPhysicalAddress() { return physicalAddress; @@ -209,6 +192,7 @@ public ObjectStats checksum(String checksum) { * @return checksum **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getChecksum() { return checksum; @@ -231,6 +215,7 @@ public ObjectStats sizeBytes(Long sizeBytes) { * @return sizeBytes **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Long getSizeBytes() { return sizeBytes; @@ -253,6 +238,7 @@ public ObjectStats mtime(Long mtime) { * @return mtime **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Unix Epoch in seconds") public Long getMtime() { return mtime; @@ -272,7 +258,7 @@ public ObjectStats metadata(Map metadata) { public ObjectStats putMetadataItem(String key, String metadataItem) { if (this.metadata == null) { - this.metadata = new HashMap<>(); + this.metadata = new HashMap(); } this.metadata.put(key, metadataItem); return this; @@ -283,6 +269,7 @@ public ObjectStats putMetadataItem(String key, String metadataItem) { * @return metadata **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Map getMetadata() { return metadata; @@ -305,6 +292,7 @@ public ObjectStats contentType(String contentType) { * @return contentType **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Object media type") public String getContentType() { return contentType; @@ -316,7 +304,6 @@ public void setContentType(String contentType) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -368,122 +355,5 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("path"); - openapiFields.add("path_type"); - openapiFields.add("physical_address"); - openapiFields.add("checksum"); - openapiFields.add("size_bytes"); - openapiFields.add("mtime"); - openapiFields.add("metadata"); - openapiFields.add("content_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("path"); - openapiRequiredFields.add("path_type"); - openapiRequiredFields.add("physical_address"); - openapiRequiredFields.add("checksum"); - openapiRequiredFields.add("mtime"); - } - - /** - * 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 ObjectStats - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ObjectStats.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectStats is not found in the empty JSON string", ObjectStats.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ObjectStats.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectStats` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ObjectStats.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 (!jsonObj.get("path").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); - } - if (!jsonObj.get("path_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `path_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path_type").toString())); - } - if (!jsonObj.get("physical_address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `physical_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("physical_address").toString())); - } - if (!jsonObj.get("checksum").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checksum` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checksum").toString())); - } - if ((jsonObj.get("content_type") != null && !jsonObj.get("content_type").isJsonNull()) && !jsonObj.get("content_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `content_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content_type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ObjectStats.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ObjectStats' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ObjectStats.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ObjectStats value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ObjectStats read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ObjectStats given an JSON string - * - * @param jsonString JSON string - * @return An instance of ObjectStats - * @throws IOException if the JSON string is invalid with respect to ObjectStats - */ - public static ObjectStats fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ObjectStats.class); - } - - /** - * Convert an instance of ObjectStats to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStatsList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStatsList.java index ce4255e02d6..a4ffd58c5bd 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStatsList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ObjectStatsList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ObjectStats; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ObjectStatsList */ @@ -58,10 +39,8 @@ public class ObjectStatsList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public ObjectStatsList() { - } public ObjectStatsList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public ObjectStatsList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public ObjectStatsList addResultsItem(ObjectStats resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 ObjectStatsList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ObjectStatsList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ObjectStatsList is not found in the empty JSON string", ObjectStatsList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ObjectStatsList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ObjectStatsList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ObjectStatsList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - ObjectStats.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ObjectStatsList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ObjectStatsList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ObjectStatsList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ObjectStatsList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ObjectStatsList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ObjectStatsList given an JSON string - * - * @param jsonString JSON string - * @return An instance of ObjectStatsList - * @throws IOException if the JSON string is invalid with respect to ObjectStatsList - */ - public static ObjectStatsList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ObjectStatsList.class); - } - - /** - * Convert an instance of ObjectStatsList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffEntry.java b/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffEntry.java index 6dccbdad49d..16e5f5db6b0 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffEntry.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffEntry.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * OtfDiffEntry */ @@ -117,8 +98,6 @@ public OperationTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_OPERATION_TYPE) private OperationTypeEnum operationType; - public OtfDiffEntry() { - } public OtfDiffEntry id(String id) { @@ -131,6 +110,7 @@ public OtfDiffEntry id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -153,6 +133,7 @@ public OtfDiffEntry timestamp(Integer timestamp) { * @return timestamp **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Integer getTimestamp() { return timestamp; @@ -175,6 +156,7 @@ public OtfDiffEntry operation(String operation) { * @return operation **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getOperation() { return operation; @@ -197,6 +179,7 @@ public OtfDiffEntry operationContent(Object operationContent) { * @return operationContent **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "free form content describing the returned operation diff") public Object getOperationContent() { return operationContent; @@ -219,6 +202,7 @@ public OtfDiffEntry operationType(OperationTypeEnum operationType) { * @return operationType **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "the operation category (CUD)") public OperationTypeEnum getOperationType() { return operationType; @@ -230,7 +214,6 @@ public void setOperationType(OperationTypeEnum operationType) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -276,113 +259,5 @@ private String toIndentedString(Object o) { 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("timestamp"); - openapiFields.add("operation"); - openapiFields.add("operation_content"); - openapiFields.add("operation_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("timestamp"); - openapiRequiredFields.add("operation"); - openapiRequiredFields.add("operation_content"); - openapiRequiredFields.add("operation_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 OtfDiffEntry - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OtfDiffEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OtfDiffEntry is not found in the empty JSON string", OtfDiffEntry.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OtfDiffEntry.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OtfDiffEntry` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OtfDiffEntry.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 (!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("operation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation").toString())); - } - if (!jsonObj.get("operation_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operation_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation_type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OtfDiffEntry.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OtfDiffEntry' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OtfDiffEntry.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OtfDiffEntry value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OtfDiffEntry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OtfDiffEntry given an JSON string - * - * @param jsonString JSON string - * @return An instance of OtfDiffEntry - * @throws IOException if the JSON string is invalid with respect to OtfDiffEntry - */ - public static OtfDiffEntry fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OtfDiffEntry.class); - } - - /** - * Convert an instance of OtfDiffEntry to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffList.java index 02867d37405..614f8ff2481 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/OtfDiffList.java @@ -21,31 +21,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.OtfDiffEntry; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * OtfDiffList */ @@ -106,10 +87,8 @@ public DiffTypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public OtfDiffList() { - } public OtfDiffList diffType(DiffTypeEnum diffType) { @@ -122,6 +101,7 @@ public OtfDiffList diffType(DiffTypeEnum diffType) { * @return diffType **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public DiffTypeEnum getDiffType() { return diffType; @@ -149,6 +129,7 @@ public OtfDiffList addResultsItem(OtfDiffEntry resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -160,7 +141,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,110 +180,5 @@ private String toIndentedString(Object o) { 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("diff_type"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("results"); - } - - /** - * 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 OtfDiffList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OtfDiffList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OtfDiffList is not found in the empty JSON string", OtfDiffList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OtfDiffList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OtfDiffList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OtfDiffList.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 ((jsonObj.get("diff_type") != null && !jsonObj.get("diff_type").isJsonNull()) && !jsonObj.get("diff_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `diff_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("diff_type").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - OtfDiffEntry.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OtfDiffList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OtfDiffList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OtfDiffList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OtfDiffList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OtfDiffList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OtfDiffList given an JSON string - * - * @param jsonString JSON string - * @return An instance of OtfDiffList - * @throws IOException if the JSON string is invalid with respect to OtfDiffList - */ - public static OtfDiffList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OtfDiffList.class); - } - - /** - * Convert an instance of OtfDiffList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Pagination.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Pagination.java index 3d6695e793b..e277588bc06 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Pagination.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Pagination.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Pagination */ @@ -64,8 +45,6 @@ public class Pagination { @SerializedName(SERIALIZED_NAME_MAX_PER_PAGE) private Integer maxPerPage; - public Pagination() { - } public Pagination hasMore(Boolean hasMore) { @@ -78,6 +57,7 @@ public Pagination hasMore(Boolean hasMore) { * @return hasMore **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Next page is available") public Boolean getHasMore() { return hasMore; @@ -100,6 +80,7 @@ public Pagination nextOffset(String nextOffset) { * @return nextOffset **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Token used to retrieve the next page") public String getNextOffset() { return nextOffset; @@ -123,6 +104,7 @@ public Pagination results(Integer results) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Number of values found in the results") public Integer getResults() { return results; @@ -146,6 +128,7 @@ public Pagination maxPerPage(Integer maxPerPage) { * @return maxPerPage **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Maximal number of entries per page") public Integer getMaxPerPage() { return maxPerPage; @@ -157,7 +140,6 @@ public void setMaxPerPage(Integer maxPerPage) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -201,105 +183,5 @@ private String toIndentedString(Object o) { 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("has_more"); - openapiFields.add("next_offset"); - openapiFields.add("results"); - openapiFields.add("max_per_page"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("has_more"); - openapiRequiredFields.add("next_offset"); - openapiRequiredFields.add("results"); - openapiRequiredFields.add("max_per_page"); - } - - /** - * 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 Pagination - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Pagination.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Pagination is not found in the empty JSON string", Pagination.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Pagination.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Pagination` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Pagination.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 (!jsonObj.get("next_offset").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next_offset` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_offset").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Pagination.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Pagination' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Pagination.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Pagination value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Pagination read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Pagination given an JSON string - * - * @param jsonString JSON string - * @return An instance of Pagination - * @throws IOException if the JSON string is invalid with respect to Pagination - */ - public static Pagination fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Pagination.class); - } - - /** - * Convert an instance of Pagination to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/PathList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/PathList.java index d8debeaf27f..5114c9bee7b 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/PathList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/PathList.java @@ -20,31 +20,12 @@ 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.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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * PathList */ @@ -52,10 +33,8 @@ public class PathList { public static final String SERIALIZED_NAME_PATHS = "paths"; @SerializedName(SERIALIZED_NAME_PATHS) - private List paths = new ArrayList<>(); + private List paths = new ArrayList(); - public PathList() { - } public PathList paths(List paths) { @@ -73,6 +52,7 @@ public PathList addPathsItem(String pathsItem) { * @return paths **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getPaths() { return paths; @@ -84,7 +64,6 @@ public void setPaths(List paths) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -122,102 +101,5 @@ private String toIndentedString(Object o) { 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("paths"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("paths"); - } - - /** - * 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 PathList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PathList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PathList is not found in the empty JSON string", PathList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PathList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PathList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PathList.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())); - } - } - // ensure the required json array is present - if (jsonObj.get("paths") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("paths").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `paths` to be an array in the JSON string but got `%s`", jsonObj.get("paths").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PathList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PathList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PathList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PathList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PathList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PathList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PathList - * @throws IOException if the JSON string is invalid with respect to PathList - */ - public static PathList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PathList.class); - } - - /** - * Convert an instance of PathList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Policy.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Policy.java index c344b04cd0b..5d11db336d5 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Policy.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Policy.java @@ -21,31 +21,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Statement; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Policy */ @@ -61,10 +42,8 @@ public class Policy { public static final String SERIALIZED_NAME_STATEMENT = "statement"; @SerializedName(SERIALIZED_NAME_STATEMENT) - private List statement = new ArrayList<>(); + private List statement = new ArrayList(); - public Policy() { - } public Policy id(String id) { @@ -77,6 +56,7 @@ public Policy id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -99,6 +79,7 @@ public Policy creationDate(Long creationDate) { * @return creationDate **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Unix Epoch in seconds") public Long getCreationDate() { return creationDate; @@ -126,6 +107,7 @@ public Policy addStatementItem(Statement statementItem) { * @return statement **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getStatement() { return statement; @@ -137,7 +119,6 @@ public void setStatement(List statement) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -179,112 +160,5 @@ private String toIndentedString(Object o) { 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("creation_date"); - openapiFields.add("statement"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("statement"); - } - - /** - * 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 Policy - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Policy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Policy is not found in the empty JSON string", Policy.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Policy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Policy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Policy.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 (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("statement").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `statement` to be an array in the JSON string but got `%s`", jsonObj.get("statement").toString())); - } - - JsonArray jsonArraystatement = jsonObj.getAsJsonArray("statement"); - // validate the required field `statement` (array) - for (int i = 0; i < jsonArraystatement.size(); i++) { - Statement.validateJsonObject(jsonArraystatement.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Policy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Policy' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Policy.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Policy value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Policy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Policy given an JSON string - * - * @param jsonString JSON string - * @return An instance of Policy - * @throws IOException if the JSON string is invalid with respect to Policy - */ - public static Policy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Policy.class); - } - - /** - * Convert an instance of Policy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/PolicyList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/PolicyList.java index d05c58d1e5c..4fc3e5c48f8 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/PolicyList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/PolicyList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.Policy; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * PolicyList */ @@ -58,10 +39,8 @@ public class PolicyList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public PolicyList() { - } public PolicyList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public PolicyList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public PolicyList addResultsItem(Policy resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 PolicyList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PolicyList is not found in the empty JSON string", PolicyList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PolicyList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PolicyList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PolicyList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - Policy.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PolicyList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PolicyList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PolicyList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PolicyList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PolicyList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PolicyList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PolicyList - * @throws IOException if the JSON string is invalid with respect to PolicyList - */ - public static PolicyList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PolicyList.class); - } - - /** - * Convert an instance of PolicyList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequest.java b/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequest.java index 7588d0b0a65..fdaab68320e 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequest.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequest.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * PrepareGCUncommittedRequest */ @@ -52,8 +33,6 @@ public class PrepareGCUncommittedRequest { @SerializedName(SERIALIZED_NAME_CONTINUATION_TOKEN) private String continuationToken; - public PrepareGCUncommittedRequest() { - } public PrepareGCUncommittedRequest continuationToken(String continuationToken) { @@ -66,6 +45,7 @@ public PrepareGCUncommittedRequest continuationToken(String continuationToken) { * @return continuationToken **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getContinuationToken() { return continuationToken; @@ -77,7 +57,6 @@ public void setContinuationToken(String continuationToken) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,91 +94,5 @@ private String toIndentedString(Object o) { 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("continuation_token"); - - // 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 PrepareGCUncommittedRequest - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PrepareGCUncommittedRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PrepareGCUncommittedRequest is not found in the empty JSON string", PrepareGCUncommittedRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PrepareGCUncommittedRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrepareGCUncommittedRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("continuation_token") != null && !jsonObj.get("continuation_token").isJsonNull()) && !jsonObj.get("continuation_token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `continuation_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("continuation_token").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrepareGCUncommittedRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrepareGCUncommittedRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrepareGCUncommittedRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PrepareGCUncommittedRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrepareGCUncommittedRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PrepareGCUncommittedRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrepareGCUncommittedRequest - * @throws IOException if the JSON string is invalid with respect to PrepareGCUncommittedRequest - */ - public static PrepareGCUncommittedRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrepareGCUncommittedRequest.class); - } - - /** - * Convert an instance of PrepareGCUncommittedRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponse.java b/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponse.java index f10b529ff5c..20d256ef27c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponse.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponse.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * PrepareGCUncommittedResponse */ @@ -60,8 +41,6 @@ public class PrepareGCUncommittedResponse { @SerializedName(SERIALIZED_NAME_CONTINUATION_TOKEN) private String continuationToken; - public PrepareGCUncommittedResponse() { - } public PrepareGCUncommittedResponse runId(String runId) { @@ -74,6 +53,7 @@ public PrepareGCUncommittedResponse runId(String runId) { * @return runId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getRunId() { return runId; @@ -96,6 +76,7 @@ public PrepareGCUncommittedResponse gcUncommittedLocation(String gcUncommittedLo * @return gcUncommittedLocation **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "location of uncommitted information data") public String getGcUncommittedLocation() { return gcUncommittedLocation; @@ -118,6 +99,7 @@ public PrepareGCUncommittedResponse continuationToken(String continuationToken) * @return continuationToken **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getContinuationToken() { return continuationToken; @@ -129,7 +111,6 @@ public void setContinuationToken(String continuationToken) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,108 +152,5 @@ private String toIndentedString(Object o) { 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("run_id"); - openapiFields.add("gc_uncommitted_location"); - openapiFields.add("continuation_token"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("run_id"); - openapiRequiredFields.add("gc_uncommitted_location"); - } - - /** - * 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 PrepareGCUncommittedResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!PrepareGCUncommittedResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PrepareGCUncommittedResponse is not found in the empty JSON string", PrepareGCUncommittedResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!PrepareGCUncommittedResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrepareGCUncommittedResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrepareGCUncommittedResponse.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 (!jsonObj.get("run_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `run_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("run_id").toString())); - } - if (!jsonObj.get("gc_uncommitted_location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `gc_uncommitted_location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gc_uncommitted_location").toString())); - } - if ((jsonObj.get("continuation_token") != null && !jsonObj.get("continuation_token").isJsonNull()) && !jsonObj.get("continuation_token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `continuation_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("continuation_token").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrepareGCUncommittedResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrepareGCUncommittedResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrepareGCUncommittedResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PrepareGCUncommittedResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrepareGCUncommittedResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PrepareGCUncommittedResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrepareGCUncommittedResponse - * @throws IOException if the JSON string is invalid with respect to PrepareGCUncommittedResponse - */ - public static PrepareGCUncommittedResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrepareGCUncommittedResponse.class); - } - - /** - * Convert an instance of PrepareGCUncommittedResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/RangeMetadata.java b/clients/java/src/main/java/io/lakefs/clients/api/model/RangeMetadata.java index 3fc3989844a..9c1c2630e2f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/RangeMetadata.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/RangeMetadata.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * RangeMetadata */ @@ -68,8 +49,6 @@ public class RangeMetadata { @SerializedName(SERIALIZED_NAME_ESTIMATED_SIZE) private Integer estimatedSize; - public RangeMetadata() { - } public RangeMetadata id(String id) { @@ -82,6 +61,7 @@ public RangeMetadata id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "480e19972a6fbe98ab8e81ae5efdfd1a29037587e91244e87abd4adefffdb01c", required = true, value = "ID of the range.") public String getId() { return id; @@ -104,6 +84,7 @@ public RangeMetadata minKey(String minKey) { * @return minKey **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "production/collections/some/file_1.parquet", required = true, value = "First key in the range.") public String getMinKey() { return minKey; @@ -126,6 +107,7 @@ public RangeMetadata maxKey(String maxKey) { * @return maxKey **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "production/collections/some/file_8229.parquet", required = true, value = "Last key in the range.") public String getMaxKey() { return maxKey; @@ -148,6 +130,7 @@ public RangeMetadata count(Integer count) { * @return count **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Number of records in the range.") public Integer getCount() { return count; @@ -170,6 +153,7 @@ public RangeMetadata estimatedSize(Integer estimatedSize) { * @return estimatedSize **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Estimated size of the range in bytes") public Integer getEstimatedSize() { return estimatedSize; @@ -181,7 +165,6 @@ public void setEstimatedSize(Integer estimatedSize) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -227,113 +210,5 @@ private String toIndentedString(Object o) { 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("min_key"); - openapiFields.add("max_key"); - openapiFields.add("count"); - openapiFields.add("estimated_size"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("min_key"); - openapiRequiredFields.add("max_key"); - openapiRequiredFields.add("count"); - openapiRequiredFields.add("estimated_size"); - } - - /** - * 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 RangeMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RangeMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RangeMetadata is not found in the empty JSON string", RangeMetadata.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RangeMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RangeMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RangeMetadata.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 (!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("min_key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `min_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("min_key").toString())); - } - if (!jsonObj.get("max_key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `max_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("max_key").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RangeMetadata.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RangeMetadata' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RangeMetadata.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RangeMetadata value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RangeMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RangeMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of RangeMetadata - * @throws IOException if the JSON string is invalid with respect to RangeMetadata - */ - public static RangeMetadata fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RangeMetadata.class); - } - - /** - * Convert an instance of RangeMetadata to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Ref.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Ref.java index 58f3e281b9e..744c97bbb6f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Ref.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Ref.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Ref */ @@ -56,8 +37,6 @@ public class Ref { @SerializedName(SERIALIZED_NAME_COMMIT_ID) private String commitId; - public Ref() { - } public Ref id(String id) { @@ -70,6 +49,7 @@ public Ref id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -92,6 +72,7 @@ public Ref commitId(String commitId) { * @return commitId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getCommitId() { return commitId; @@ -103,7 +84,6 @@ public void setCommitId(String commitId) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,104 +123,5 @@ private String toIndentedString(Object o) { 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("commit_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("commit_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 Ref - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Ref.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Ref is not found in the empty JSON string", Ref.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Ref.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Ref` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Ref.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 (!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("commit_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `commit_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commit_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Ref.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Ref' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Ref.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Ref value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Ref read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Ref given an JSON string - * - * @param jsonString JSON string - * @return An instance of Ref - * @throws IOException if the JSON string is invalid with respect to Ref - */ - public static Ref fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Ref.class); - } - - /** - * Convert an instance of Ref to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/RefList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/RefList.java index f226f791326..dc918f011eb 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/RefList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/RefList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.Ref; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * RefList */ @@ -58,10 +39,8 @@ public class RefList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public RefList() { - } public RefList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public RefList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public RefList addResultsItem(Ref resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 RefList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RefList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RefList is not found in the empty JSON string", RefList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RefList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RefList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RefList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - Ref.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RefList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RefList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RefList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RefList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RefList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RefList given an JSON string - * - * @param jsonString JSON string - * @return An instance of RefList - * @throws IOException if the JSON string is invalid with respect to RefList - */ - public static RefList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RefList.class); - } - - /** - * Convert an instance of RefList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/RefsDump.java b/clients/java/src/main/java/io/lakefs/clients/api/model/RefsDump.java index 62b6d560ede..b618cc39a62 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/RefsDump.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/RefsDump.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * RefsDump */ @@ -60,8 +41,6 @@ public class RefsDump { @SerializedName(SERIALIZED_NAME_BRANCHES_META_RANGE_ID) private String branchesMetaRangeId; - public RefsDump() { - } public RefsDump commitsMetaRangeId(String commitsMetaRangeId) { @@ -74,6 +53,7 @@ public RefsDump commitsMetaRangeId(String commitsMetaRangeId) { * @return commitsMetaRangeId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getCommitsMetaRangeId() { return commitsMetaRangeId; @@ -96,6 +76,7 @@ public RefsDump tagsMetaRangeId(String tagsMetaRangeId) { * @return tagsMetaRangeId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getTagsMetaRangeId() { return tagsMetaRangeId; @@ -118,6 +99,7 @@ public RefsDump branchesMetaRangeId(String branchesMetaRangeId) { * @return branchesMetaRangeId **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getBranchesMetaRangeId() { return branchesMetaRangeId; @@ -129,7 +111,6 @@ public void setBranchesMetaRangeId(String branchesMetaRangeId) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,109 +152,5 @@ private String toIndentedString(Object o) { 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("commits_meta_range_id"); - openapiFields.add("tags_meta_range_id"); - openapiFields.add("branches_meta_range_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("commits_meta_range_id"); - openapiRequiredFields.add("tags_meta_range_id"); - openapiRequiredFields.add("branches_meta_range_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 RefsDump - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RefsDump.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RefsDump is not found in the empty JSON string", RefsDump.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RefsDump.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RefsDump` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RefsDump.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 (!jsonObj.get("commits_meta_range_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `commits_meta_range_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commits_meta_range_id").toString())); - } - if (!jsonObj.get("tags_meta_range_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tags_meta_range_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tags_meta_range_id").toString())); - } - if (!jsonObj.get("branches_meta_range_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `branches_meta_range_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branches_meta_range_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RefsDump.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RefsDump' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RefsDump.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RefsDump value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RefsDump read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RefsDump given an JSON string - * - * @param jsonString JSON string - * @return An instance of RefsDump - * @throws IOException if the JSON string is invalid with respect to RefsDump - */ - public static RefsDump fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RefsDump.class); - } - - /** - * Convert an instance of RefsDump to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Repository.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Repository.java index 94d6a734bb2..0c9920de7d2 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Repository.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Repository.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Repository */ @@ -64,8 +45,6 @@ public class Repository { @SerializedName(SERIALIZED_NAME_STORAGE_NAMESPACE) private String storageNamespace; - public Repository() { - } public Repository id(String id) { @@ -78,6 +57,7 @@ public Repository id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -100,6 +80,7 @@ public Repository creationDate(Long creationDate) { * @return creationDate **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Unix Epoch in seconds") public Long getCreationDate() { return creationDate; @@ -122,6 +103,7 @@ public Repository defaultBranch(String defaultBranch) { * @return defaultBranch **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getDefaultBranch() { return defaultBranch; @@ -144,6 +126,7 @@ public Repository storageNamespace(String storageNamespace) { * @return storageNamespace **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\")") public String getStorageNamespace() { return storageNamespace; @@ -155,7 +138,6 @@ public void setStorageNamespace(String storageNamespace) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,111 +181,5 @@ private String toIndentedString(Object o) { 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("creation_date"); - openapiFields.add("default_branch"); - openapiFields.add("storage_namespace"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("creation_date"); - openapiRequiredFields.add("default_branch"); - openapiRequiredFields.add("storage_namespace"); - } - - /** - * 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 Repository - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Repository.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Repository is not found in the empty JSON string", Repository.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Repository.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Repository` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Repository.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 (!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("default_branch").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default_branch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_branch").toString())); - } - if (!jsonObj.get("storage_namespace").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storage_namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storage_namespace").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Repository.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Repository' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Repository.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Repository value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Repository read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Repository given an JSON string - * - * @param jsonString JSON string - * @return An instance of Repository - * @throws IOException if the JSON string is invalid with respect to Repository - */ - public static Repository fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Repository.class); - } - - /** - * Convert an instance of Repository to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryCreation.java index 561ae23dff5..31b08253c9c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * RepositoryCreation */ @@ -60,8 +41,6 @@ public class RepositoryCreation { @SerializedName(SERIALIZED_NAME_DEFAULT_BRANCH) private String defaultBranch; - public RepositoryCreation() { - } public RepositoryCreation name(String name) { @@ -74,6 +53,7 @@ public RepositoryCreation name(String name) { * @return name **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getName() { return name; @@ -96,6 +76,7 @@ public RepositoryCreation storageNamespace(String storageNamespace) { * @return storageNamespace **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "s3://example-bucket/", required = true, value = "Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\")") public String getStorageNamespace() { return storageNamespace; @@ -118,6 +99,7 @@ public RepositoryCreation defaultBranch(String defaultBranch) { * @return defaultBranch **/ @javax.annotation.Nullable + @ApiModelProperty(example = "main", value = "") public String getDefaultBranch() { return defaultBranch; @@ -129,7 +111,6 @@ public void setDefaultBranch(String defaultBranch) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,108 +152,5 @@ private String toIndentedString(Object o) { 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("storage_namespace"); - openapiFields.add("default_branch"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("storage_namespace"); - } - - /** - * 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 RepositoryCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RepositoryCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RepositoryCreation is not found in the empty JSON string", RepositoryCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RepositoryCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RepositoryCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RepositoryCreation.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 (!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("storage_namespace").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storage_namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storage_namespace").toString())); - } - if ((jsonObj.get("default_branch") != null && !jsonObj.get("default_branch").isJsonNull()) && !jsonObj.get("default_branch").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default_branch` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_branch").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RepositoryCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RepositoryCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RepositoryCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RepositoryCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RepositoryCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RepositoryCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepositoryCreation - * @throws IOException if the JSON string is invalid with respect to RepositoryCreation - */ - public static RepositoryCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RepositoryCreation.class); - } - - /** - * Convert an instance of RepositoryCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryList.java index 267c477d0a5..62be942c03c 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/RepositoryList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.Repository; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * RepositoryList */ @@ -58,10 +39,8 @@ public class RepositoryList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public RepositoryList() { - } public RepositoryList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public RepositoryList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public RepositoryList addResultsItem(Repository resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 RepositoryList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RepositoryList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RepositoryList is not found in the empty JSON string", RepositoryList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RepositoryList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RepositoryList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RepositoryList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - Repository.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RepositoryList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RepositoryList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RepositoryList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RepositoryList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RepositoryList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RepositoryList given an JSON string - * - * @param jsonString JSON string - * @return An instance of RepositoryList - * @throws IOException if the JSON string is invalid with respect to RepositoryList - */ - public static RepositoryList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RepositoryList.class); - } - - /** - * Convert an instance of RepositoryList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/ResetCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/ResetCreation.java index af469e203d3..f6644b68495 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/ResetCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/ResetCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * ResetCreation */ @@ -105,8 +86,6 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_PATH) private String path; - public ResetCreation() { - } public ResetCreation type(TypeEnum type) { @@ -119,6 +98,7 @@ public ResetCreation type(TypeEnum type) { * @return type **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public TypeEnum getType() { return type; @@ -141,6 +121,7 @@ public ResetCreation path(String path) { * @return path **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getPath() { return path; @@ -152,7 +133,6 @@ public void setPath(String path) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -192,103 +172,5 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("path"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - 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 ResetCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ResetCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ResetCreation is not found in the empty JSON string", ResetCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ResetCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResetCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ResetCreation.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 (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResetCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResetCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ResetCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ResetCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ResetCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ResetCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of ResetCreation - * @throws IOException if the JSON string is invalid with respect to ResetCreation - */ - public static ResetCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResetCreation.class); - } - - /** - * Convert an instance of ResetCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/RevertCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/RevertCreation.java index ca5819c7b82..401ee97d1f3 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/RevertCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/RevertCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * RevertCreation */ @@ -56,8 +37,6 @@ public class RevertCreation { @SerializedName(SERIALIZED_NAME_PARENT_NUMBER) private Integer parentNumber; - public RevertCreation() { - } public RevertCreation ref(String ref) { @@ -70,6 +49,7 @@ public RevertCreation ref(String ref) { * @return ref **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "the commit to revert, given by a ref") public String getRef() { return ref; @@ -92,6 +72,7 @@ public RevertCreation parentNumber(Integer parentNumber) { * @return parentNumber **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert.") public Integer getParentNumber() { return parentNumber; @@ -103,7 +84,6 @@ public void setParentNumber(Integer parentNumber) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,101 +123,5 @@ private String toIndentedString(Object o) { 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("ref"); - openapiFields.add("parent_number"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ref"); - openapiRequiredFields.add("parent_number"); - } - - /** - * 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 RevertCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RevertCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RevertCreation is not found in the empty JSON string", RevertCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RevertCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RevertCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RevertCreation.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 (!jsonObj.get("ref").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ref").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RevertCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RevertCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RevertCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RevertCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RevertCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RevertCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of RevertCreation - * @throws IOException if the JSON string is invalid with respect to RevertCreation - */ - public static RevertCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RevertCreation.class); - } - - /** - * Convert an instance of RevertCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Setup.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Setup.java index 8081248522f..847a7e76ae7 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Setup.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Setup.java @@ -21,29 +21,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.AccessKeyCredentials; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Setup */ @@ -57,8 +38,6 @@ public class Setup { @SerializedName(SERIALIZED_NAME_KEY) private AccessKeyCredentials key; - public Setup() { - } public Setup username(String username) { @@ -71,6 +50,7 @@ public Setup username(String username) { * @return username **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "an identifier for the user (e.g. jane.doe)") public String getUsername() { return username; @@ -93,6 +73,7 @@ public Setup key(AccessKeyCredentials key) { * @return key **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public AccessKeyCredentials getKey() { return key; @@ -104,7 +85,6 @@ public void setKey(AccessKeyCredentials key) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,104 +124,5 @@ private String toIndentedString(Object o) { 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("username"); - openapiFields.add("key"); - - // 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 Setup - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Setup.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Setup is not found in the empty JSON string", Setup.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Setup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Setup` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Setup.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 (!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())); - } - // validate the optional field `key` - if (jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) { - AccessKeyCredentials.validateJsonObject(jsonObj.getAsJsonObject("key")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Setup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Setup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Setup.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Setup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Setup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Setup given an JSON string - * - * @param jsonString JSON string - * @return An instance of Setup - * @throws IOException if the JSON string is invalid with respect to Setup - */ - public static Setup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Setup.class); - } - - /** - * Convert an instance of Setup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/SetupState.java b/clients/java/src/main/java/io/lakefs/clients/api/model/SetupState.java index 4b8a5e1ec41..85c11c0ac48 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/SetupState.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/SetupState.java @@ -21,29 +21,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.LoginConfig; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * SetupState */ @@ -106,8 +87,6 @@ public StateEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_LOGIN_CONFIG) private LoginConfig loginConfig; - public SetupState() { - } public SetupState state(StateEnum state) { @@ -120,6 +99,7 @@ public SetupState state(StateEnum state) { * @return state **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public StateEnum getState() { return state; @@ -142,6 +122,7 @@ public SetupState loginConfig(LoginConfig loginConfig) { * @return loginConfig **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public LoginConfig getLoginConfig() { return loginConfig; @@ -153,7 +134,6 @@ public void setLoginConfig(LoginConfig loginConfig) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -193,96 +173,5 @@ private String toIndentedString(Object o) { 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("state"); - openapiFields.add("login_config"); - - // 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 SetupState - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!SetupState.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SetupState is not found in the empty JSON string", SetupState.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!SetupState.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SetupState` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `login_config` - if (jsonObj.get("login_config") != null && !jsonObj.get("login_config").isJsonNull()) { - LoginConfig.validateJsonObject(jsonObj.getAsJsonObject("login_config")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SetupState.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SetupState' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SetupState.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SetupState value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SetupState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SetupState given an JSON string - * - * @param jsonString JSON string - * @return An instance of SetupState - * @throws IOException if the JSON string is invalid with respect to SetupState - */ - public static SetupState fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SetupState.class); - } - - /** - * Convert an instance of SetupState to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/StageRangeCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/StageRangeCreation.java index 026cb12f0ec..326a888cd0a 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/StageRangeCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/StageRangeCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * StageRangeCreation */ @@ -64,8 +45,6 @@ public class StageRangeCreation { @SerializedName(SERIALIZED_NAME_CONTINUATION_TOKEN) private String continuationToken; - public StageRangeCreation() { - } public StageRangeCreation fromSourceURI(String fromSourceURI) { @@ -78,6 +57,7 @@ public StageRangeCreation fromSourceURI(String fromSourceURI) { * @return fromSourceURI **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "s3://my-bucket/production/collections/", required = true, value = "The source location of the ingested files. Must match the lakeFS installation blockstore type.") public String getFromSourceURI() { return fromSourceURI; @@ -100,6 +80,7 @@ public StageRangeCreation after(String after) { * @return after **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "production/collections/some/file.parquet", required = true, value = "Only objects after this key would be ingested.") public String getAfter() { return after; @@ -122,6 +103,7 @@ public StageRangeCreation prepend(String prepend) { * @return prepend **/ @javax.annotation.Nonnull + @ApiModelProperty(example = "collections/", required = true, value = "A prefix to prepend to ingested objects.") public String getPrepend() { return prepend; @@ -144,6 +126,7 @@ public StageRangeCreation continuationToken(String continuationToken) { * @return continuationToken **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Opaque. Client should pass the continuation_token received from server to continue creation ranges from the same key.") public String getContinuationToken() { return continuationToken; @@ -155,7 +138,6 @@ public void setContinuationToken(String continuationToken) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,113 +181,5 @@ private String toIndentedString(Object o) { 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("fromSourceURI"); - openapiFields.add("after"); - openapiFields.add("prepend"); - openapiFields.add("continuation_token"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fromSourceURI"); - openapiRequiredFields.add("after"); - openapiRequiredFields.add("prepend"); - } - - /** - * 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 StageRangeCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StageRangeCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StageRangeCreation is not found in the empty JSON string", StageRangeCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StageRangeCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StageRangeCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StageRangeCreation.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 (!jsonObj.get("fromSourceURI").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fromSourceURI` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fromSourceURI").toString())); - } - if (!jsonObj.get("after").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `after` to be a primitive type in the JSON string but got `%s`", jsonObj.get("after").toString())); - } - if (!jsonObj.get("prepend").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prepend` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepend").toString())); - } - if ((jsonObj.get("continuation_token") != null && !jsonObj.get("continuation_token").isJsonNull()) && !jsonObj.get("continuation_token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `continuation_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("continuation_token").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StageRangeCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StageRangeCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StageRangeCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StageRangeCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StageRangeCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StageRangeCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of StageRangeCreation - * @throws IOException if the JSON string is invalid with respect to StageRangeCreation - */ - public static StageRangeCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StageRangeCreation.class); - } - - /** - * Convert an instance of StageRangeCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/StagingLocation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/StagingLocation.java index 00f58232870..03f42733a0f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/StagingLocation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/StagingLocation.java @@ -20,33 +20,15 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * location for placing an object when staging it */ +@ApiModel(description = "location for placing an object when staging it") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class StagingLocation { public static final String SERIALIZED_NAME_PHYSICAL_ADDRESS = "physical_address"; @@ -61,8 +43,6 @@ public class StagingLocation { @SerializedName(SERIALIZED_NAME_PRESIGNED_URL) private String presignedUrl; - public StagingLocation() { - } public StagingLocation physicalAddress(String physicalAddress) { @@ -75,6 +55,7 @@ public StagingLocation physicalAddress(String physicalAddress) { * @return physicalAddress **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getPhysicalAddress() { return physicalAddress; @@ -97,6 +78,7 @@ public StagingLocation token(String token) { * @return token **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "opaque staging token to use to link uploaded object") public String getToken() { return token; @@ -119,6 +101,7 @@ public StagingLocation presignedUrl(String presignedUrl) { * @return presignedUrl **/ @javax.annotation.Nullable + @ApiModelProperty(value = "if presign=true is passed in the request, this field will contain a presigned URL to use when uploading") public String getPresignedUrl() { return presignedUrl; @@ -130,7 +113,6 @@ public void setPresignedUrl(String presignedUrl) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,107 +165,5 @@ private String toIndentedString(Object o) { 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("physical_address"); - openapiFields.add("token"); - openapiFields.add("presigned_url"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); - } - - /** - * 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 StagingLocation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StagingLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StagingLocation is not found in the empty JSON string", StagingLocation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StagingLocation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StagingLocation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StagingLocation.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 ((jsonObj.get("physical_address") != null && !jsonObj.get("physical_address").isJsonNull()) && !jsonObj.get("physical_address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `physical_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("physical_address").toString())); - } - if (!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("presigned_url") != null && !jsonObj.get("presigned_url").isJsonNull()) && !jsonObj.get("presigned_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `presigned_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("presigned_url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StagingLocation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StagingLocation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StagingLocation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StagingLocation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StagingLocation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StagingLocation given an JSON string - * - * @param jsonString JSON string - * @return An instance of StagingLocation - * @throws IOException if the JSON string is invalid with respect to StagingLocation - */ - public static StagingLocation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StagingLocation.class); - } - - /** - * Convert an instance of StagingLocation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/StagingMetadata.java b/clients/java/src/main/java/io/lakefs/clients/api/model/StagingMetadata.java index 9f31e222a35..e706eda44c9 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/StagingMetadata.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/StagingMetadata.java @@ -21,34 +21,17 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.StagingLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.HashMap; -import java.util.Map; - -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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; /** * information about uploaded object */ +@ApiModel(description = "information about uploaded object") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class StagingMetadata { public static final String SERIALIZED_NAME_STAGING = "staging"; @@ -65,14 +48,12 @@ public class StagingMetadata { public static final String SERIALIZED_NAME_USER_METADATA = "user_metadata"; @SerializedName(SERIALIZED_NAME_USER_METADATA) - private Map userMetadata = new HashMap<>(); + private Map userMetadata = null; public static final String SERIALIZED_NAME_CONTENT_TYPE = "content_type"; @SerializedName(SERIALIZED_NAME_CONTENT_TYPE) private String contentType; - public StagingMetadata() { - } public StagingMetadata staging(StagingLocation staging) { @@ -85,6 +66,7 @@ public StagingMetadata staging(StagingLocation staging) { * @return staging **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public StagingLocation getStaging() { return staging; @@ -107,6 +89,7 @@ public StagingMetadata checksum(String checksum) { * @return checksum **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "unique identifier of object content on backing store (typically ETag)") public String getChecksum() { return checksum; @@ -129,6 +112,7 @@ public StagingMetadata sizeBytes(Long sizeBytes) { * @return sizeBytes **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Long getSizeBytes() { return sizeBytes; @@ -148,7 +132,7 @@ public StagingMetadata userMetadata(Map userMetadata) { public StagingMetadata putUserMetadataItem(String key, String userMetadataItem) { if (this.userMetadata == null) { - this.userMetadata = new HashMap<>(); + this.userMetadata = new HashMap(); } this.userMetadata.put(key, userMetadataItem); return this; @@ -159,6 +143,7 @@ public StagingMetadata putUserMetadataItem(String key, String userMetadataItem) * @return userMetadata **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Map getUserMetadata() { return userMetadata; @@ -181,6 +166,7 @@ public StagingMetadata contentType(String contentType) { * @return contentType **/ @javax.annotation.Nullable + @ApiModelProperty(value = "Object media type") public String getContentType() { return contentType; @@ -192,7 +178,6 @@ public void setContentType(String contentType) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -238,110 +223,5 @@ private String toIndentedString(Object o) { 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("staging"); - openapiFields.add("checksum"); - openapiFields.add("size_bytes"); - openapiFields.add("user_metadata"); - openapiFields.add("content_type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("staging"); - openapiRequiredFields.add("checksum"); - openapiRequiredFields.add("size_bytes"); - } - - /** - * 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 StagingMetadata - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StagingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StagingMetadata is not found in the empty JSON string", StagingMetadata.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StagingMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StagingMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StagingMetadata.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())); - } - } - // validate the required field `staging` - StagingLocation.validateJsonObject(jsonObj.getAsJsonObject("staging")); - if (!jsonObj.get("checksum").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checksum` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checksum").toString())); - } - if ((jsonObj.get("content_type") != null && !jsonObj.get("content_type").isJsonNull()) && !jsonObj.get("content_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `content_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content_type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StagingMetadata.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StagingMetadata' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StagingMetadata.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StagingMetadata value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StagingMetadata read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StagingMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of StagingMetadata - * @throws IOException if the JSON string is invalid with respect to StagingMetadata - */ - public static StagingMetadata fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StagingMetadata.class); - } - - /** - * Convert an instance of StagingMetadata to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/Statement.java b/clients/java/src/main/java/io/lakefs/clients/api/model/Statement.java index 89ea1da6bee..3685d3d67ef 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/Statement.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/Statement.java @@ -20,31 +20,12 @@ 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.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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * Statement */ @@ -107,10 +88,8 @@ public EffectEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) - private List action = new ArrayList<>(); + private List action = new ArrayList(); - public Statement() { - } public Statement effect(EffectEnum effect) { @@ -123,6 +102,7 @@ public Statement effect(EffectEnum effect) { * @return effect **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public EffectEnum getEffect() { return effect; @@ -145,6 +125,7 @@ public Statement resource(String resource) { * @return resource **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getResource() { return resource; @@ -172,6 +153,7 @@ public Statement addActionItem(String actionItem) { * @return action **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getAction() { return action; @@ -183,7 +165,6 @@ public void setAction(List action) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,112 +206,5 @@ private String toIndentedString(Object o) { 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("effect"); - openapiFields.add("resource"); - openapiFields.add("action"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("effect"); - openapiRequiredFields.add("resource"); - openapiRequiredFields.add("action"); - } - - /** - * 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 Statement - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!Statement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Statement is not found in the empty JSON string", Statement.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Statement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Statement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Statement.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 (!jsonObj.get("effect").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `effect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("effect").toString())); - } - if (!jsonObj.get("resource").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `resource` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resource").toString())); - } - // ensure the required json array is present - if (jsonObj.get("action") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("action").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `action` to be an array in the JSON string but got `%s`", jsonObj.get("action").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Statement.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Statement' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Statement.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Statement value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Statement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Statement given an JSON string - * - * @param jsonString JSON string - * @return An instance of Statement - * @throws IOException if the JSON string is invalid with respect to Statement - */ - public static Statement fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Statement.class); - } - - /** - * Convert an instance of Statement to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEvent.java b/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEvent.java index 693f3ac4e4c..e5a581c62c9 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEvent.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEvent.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * StatsEvent */ @@ -60,8 +41,6 @@ public class StatsEvent { @SerializedName(SERIALIZED_NAME_COUNT) private Integer count; - public StatsEvent() { - } public StatsEvent propertyClass(String propertyClass) { @@ -74,6 +53,7 @@ public StatsEvent propertyClass(String propertyClass) { * @return propertyClass **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\")") public String getPropertyClass() { return propertyClass; @@ -96,6 +76,7 @@ public StatsEvent name(String name) { * @return name **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "stats event name (e.g. \"put_object\", \"create_repository\", \"\")") public String getName() { return name; @@ -118,6 +99,7 @@ public StatsEvent count(Integer count) { * @return count **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "number of events of the class and name") public Integer getCount() { return count; @@ -129,7 +111,6 @@ public void setCount(Integer count) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,106 +152,5 @@ private String toIndentedString(Object o) { 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("class"); - openapiFields.add("name"); - openapiFields.add("count"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("class"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("count"); - } - - /** - * 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 StatsEvent - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StatsEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatsEvent is not found in the empty JSON string", StatsEvent.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StatsEvent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StatsEvent` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StatsEvent.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 (!jsonObj.get("class").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); - } - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatsEvent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatsEvent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StatsEvent.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StatsEvent value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StatsEvent read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StatsEvent given an JSON string - * - * @param jsonString JSON string - * @return An instance of StatsEvent - * @throws IOException if the JSON string is invalid with respect to StatsEvent - */ - public static StatsEvent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StatsEvent.class); - } - - /** - * Convert an instance of StatsEvent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEventsList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEventsList.java index ca2c439790e..2f8619b09f3 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEventsList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/StatsEventsList.java @@ -21,31 +21,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.StatsEvent; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * StatsEventsList */ @@ -53,10 +34,8 @@ public class StatsEventsList { public static final String SERIALIZED_NAME_EVENTS = "events"; @SerializedName(SERIALIZED_NAME_EVENTS) - private List events = new ArrayList<>(); + private List events = new ArrayList(); - public StatsEventsList() { - } public StatsEventsList events(List events) { @@ -74,6 +53,7 @@ public StatsEventsList addEventsItem(StatsEvent eventsItem) { * @return events **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getEvents() { return events; @@ -85,7 +65,6 @@ public void setEvents(List events) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -123,106 +102,5 @@ private String toIndentedString(Object o) { 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("events"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("events"); - } - - /** - * 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 StatsEventsList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StatsEventsList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatsEventsList is not found in the empty JSON string", StatsEventsList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StatsEventsList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StatsEventsList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StatsEventsList.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())); - } - } - // ensure the json data is an array - if (!jsonObj.get("events").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `events` to be an array in the JSON string but got `%s`", jsonObj.get("events").toString())); - } - - JsonArray jsonArrayevents = jsonObj.getAsJsonArray("events"); - // validate the required field `events` (array) - for (int i = 0; i < jsonArrayevents.size(); i++) { - StatsEvent.validateJsonObject(jsonArrayevents.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatsEventsList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatsEventsList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StatsEventsList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StatsEventsList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StatsEventsList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StatsEventsList given an JSON string - * - * @param jsonString JSON string - * @return An instance of StatsEventsList - * @throws IOException if the JSON string is invalid with respect to StatsEventsList - */ - public static StatsEventsList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StatsEventsList.class); - } - - /** - * Convert an instance of StatsEventsList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/StorageConfig.java b/clients/java/src/main/java/io/lakefs/clients/api/model/StorageConfig.java index d6717526d13..a66b901619b 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/StorageConfig.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/StorageConfig.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * StorageConfig */ @@ -76,8 +57,6 @@ public class StorageConfig { @SerializedName(SERIALIZED_NAME_IMPORT_SUPPORT) private Boolean importSupport; - public StorageConfig() { - } public StorageConfig blockstoreType(String blockstoreType) { @@ -90,6 +69,7 @@ public StorageConfig blockstoreType(String blockstoreType) { * @return blockstoreType **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getBlockstoreType() { return blockstoreType; @@ -112,6 +92,7 @@ public StorageConfig blockstoreNamespaceExample(String blockstoreNamespaceExampl * @return blockstoreNamespaceExample **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getBlockstoreNamespaceExample() { return blockstoreNamespaceExample; @@ -134,6 +115,7 @@ public StorageConfig blockstoreNamespaceValidityRegex(String blockstoreNamespace * @return blockstoreNamespaceValidityRegex **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getBlockstoreNamespaceValidityRegex() { return blockstoreNamespaceValidityRegex; @@ -156,6 +138,7 @@ public StorageConfig defaultNamespacePrefix(String defaultNamespacePrefix) { * @return defaultNamespacePrefix **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getDefaultNamespacePrefix() { return defaultNamespacePrefix; @@ -178,6 +161,7 @@ public StorageConfig preSignSupport(Boolean preSignSupport) { * @return preSignSupport **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Boolean getPreSignSupport() { return preSignSupport; @@ -200,6 +184,7 @@ public StorageConfig preSignSupportUI(Boolean preSignSupportUI) { * @return preSignSupportUI **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Boolean getPreSignSupportUI() { return preSignSupportUI; @@ -222,6 +207,7 @@ public StorageConfig importSupport(Boolean importSupport) { * @return importSupport **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Boolean getImportSupport() { return importSupport; @@ -233,7 +219,6 @@ public void setImportSupport(Boolean importSupport) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -283,119 +268,5 @@ private String toIndentedString(Object o) { 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("blockstore_type"); - openapiFields.add("blockstore_namespace_example"); - openapiFields.add("blockstore_namespace_ValidityRegex"); - openapiFields.add("default_namespace_prefix"); - openapiFields.add("pre_sign_support"); - openapiFields.add("pre_sign_support_UI"); - openapiFields.add("import_support"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("blockstore_type"); - openapiRequiredFields.add("blockstore_namespace_example"); - openapiRequiredFields.add("blockstore_namespace_ValidityRegex"); - openapiRequiredFields.add("pre_sign_support"); - openapiRequiredFields.add("pre_sign_support_UI"); - openapiRequiredFields.add("import_support"); - } - - /** - * 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 StorageConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StorageConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StorageConfig is not found in the empty JSON string", StorageConfig.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StorageConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StorageConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StorageConfig.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 (!jsonObj.get("blockstore_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockstore_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockstore_type").toString())); - } - if (!jsonObj.get("blockstore_namespace_example").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockstore_namespace_example` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockstore_namespace_example").toString())); - } - if (!jsonObj.get("blockstore_namespace_ValidityRegex").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockstore_namespace_ValidityRegex` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockstore_namespace_ValidityRegex").toString())); - } - if ((jsonObj.get("default_namespace_prefix") != null && !jsonObj.get("default_namespace_prefix").isJsonNull()) && !jsonObj.get("default_namespace_prefix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default_namespace_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_namespace_prefix").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StorageConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StorageConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StorageConfig.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StorageConfig value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StorageConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StorageConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of StorageConfig - * @throws IOException if the JSON string is invalid with respect to StorageConfig - */ - public static StorageConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StorageConfig.class); - } - - /** - * Convert an instance of StorageConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/StorageURI.java b/clients/java/src/main/java/io/lakefs/clients/api/model/StorageURI.java index 4a198576b7d..48002089bce 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/StorageURI.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/StorageURI.java @@ -20,40 +20,20 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * URI to a path in a storage provider (e.g. \"s3://bucket1/path/to/object\") */ +@ApiModel(description = "URI to a path in a storage provider (e.g. \"s3://bucket1/path/to/object\")") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class StorageURI { public static final String SERIALIZED_NAME_LOCATION = "location"; @SerializedName(SERIALIZED_NAME_LOCATION) private String location; - public StorageURI() { - } public StorageURI location(String location) { @@ -66,6 +46,7 @@ public StorageURI location(String location) { * @return location **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getLocation() { return location; @@ -77,7 +58,6 @@ public void setLocation(String location) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -115,99 +95,5 @@ private String toIndentedString(Object o) { 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("location"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("location"); - } - - /** - * 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 StorageURI - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StorageURI.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StorageURI is not found in the empty JSON string", StorageURI.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!StorageURI.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StorageURI` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StorageURI.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 (!jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StorageURI.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StorageURI' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StorageURI.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StorageURI value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StorageURI read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StorageURI given an JSON string - * - * @param jsonString JSON string - * @return An instance of StorageURI - * @throws IOException if the JSON string is invalid with respect to StorageURI - */ - public static StorageURI fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StorageURI.class); - } - - /** - * Convert an instance of StorageURI to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/TagCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/TagCreation.java index 720ccd2c81a..054f7af3383 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/TagCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/TagCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * TagCreation */ @@ -56,8 +37,6 @@ public class TagCreation { @SerializedName(SERIALIZED_NAME_REF) private String ref; - public TagCreation() { - } public TagCreation id(String id) { @@ -70,6 +49,7 @@ public TagCreation id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getId() { return id; @@ -92,6 +72,7 @@ public TagCreation ref(String ref) { * @return ref **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public String getRef() { return ref; @@ -103,7 +84,6 @@ public void setRef(String ref) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,104 +123,5 @@ private String toIndentedString(Object o) { 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("ref"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("ref"); - } - - /** - * 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 TagCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!TagCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TagCreation is not found in the empty JSON string", TagCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!TagCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TagCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : TagCreation.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 (!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("ref").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ref").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TagCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TagCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TagCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TagCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TagCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TagCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of TagCreation - * @throws IOException if the JSON string is invalid with respect to TagCreation - */ - public static TagCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TagCreation.class); - } - - /** - * Convert an instance of TagCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/UnderlyingObjectProperties.java b/clients/java/src/main/java/io/lakefs/clients/api/model/UnderlyingObjectProperties.java index 23d293a438a..8df05f28f54 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/UnderlyingObjectProperties.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/UnderlyingObjectProperties.java @@ -20,30 +20,11 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * UnderlyingObjectProperties */ @@ -53,8 +34,6 @@ public class UnderlyingObjectProperties { @SerializedName(SERIALIZED_NAME_STORAGE_CLASS) private String storageClass; - public UnderlyingObjectProperties() { - } public UnderlyingObjectProperties storageClass(String storageClass) { @@ -67,6 +46,7 @@ public UnderlyingObjectProperties storageClass(String storageClass) { * @return storageClass **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getStorageClass() { return storageClass; @@ -78,7 +58,6 @@ public void setStorageClass(String storageClass) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -127,91 +106,5 @@ private String toIndentedString(Object o) { 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("storage_class"); - - // 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 UnderlyingObjectProperties - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UnderlyingObjectProperties.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UnderlyingObjectProperties is not found in the empty JSON string", UnderlyingObjectProperties.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UnderlyingObjectProperties.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UnderlyingObjectProperties` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("storage_class") != null && !jsonObj.get("storage_class").isJsonNull()) && !jsonObj.get("storage_class").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `storage_class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storage_class").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UnderlyingObjectProperties.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UnderlyingObjectProperties' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UnderlyingObjectProperties.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UnderlyingObjectProperties value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UnderlyingObjectProperties read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UnderlyingObjectProperties given an JSON string - * - * @param jsonString JSON string - * @return An instance of UnderlyingObjectProperties - * @throws IOException if the JSON string is invalid with respect to UnderlyingObjectProperties - */ - public static UnderlyingObjectProperties fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UnderlyingObjectProperties.class); - } - - /** - * Convert an instance of UnderlyingObjectProperties to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/UpdatePasswordByToken.java b/clients/java/src/main/java/io/lakefs/clients/api/model/UpdatePasswordByToken.java index 9416f809a33..41bf91425fb 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/UpdatePasswordByToken.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/UpdatePasswordByToken.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * UpdatePasswordByToken */ @@ -60,8 +41,6 @@ public class UpdatePasswordByToken { @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public UpdatePasswordByToken() { - } public UpdatePasswordByToken token(String token) { @@ -74,6 +53,7 @@ public UpdatePasswordByToken token(String token) { * @return token **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "token used for authentication") public String getToken() { return token; @@ -96,6 +76,7 @@ public UpdatePasswordByToken newPassword(String newPassword) { * @return newPassword **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "new password to update") public String getNewPassword() { return newPassword; @@ -118,6 +99,7 @@ public UpdatePasswordByToken email(String email) { * @return email **/ @javax.annotation.Nullable + @ApiModelProperty(value = "optional user email to match the token for verification") public String getEmail() { return email; @@ -129,7 +111,6 @@ public void setEmail(String email) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,108 +152,5 @@ private String toIndentedString(Object o) { 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("token"); - openapiFields.add("newPassword"); - openapiFields.add("email"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("token"); - openapiRequiredFields.add("newPassword"); - } - - /** - * 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 UpdatePasswordByToken - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UpdatePasswordByToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdatePasswordByToken is not found in the empty JSON string", UpdatePasswordByToken.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UpdatePasswordByToken.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdatePasswordByToken` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpdatePasswordByToken.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 (!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("newPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `newPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("newPassword").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdatePasswordByToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdatePasswordByToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdatePasswordByToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdatePasswordByToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UpdatePasswordByToken read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdatePasswordByToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdatePasswordByToken - * @throws IOException if the JSON string is invalid with respect to UpdatePasswordByToken - */ - public static UpdatePasswordByToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdatePasswordByToken.class); - } - - /** - * Convert an instance of UpdatePasswordByToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/User.java b/clients/java/src/main/java/io/lakefs/clients/api/model/User.java index 0bd31d3580b..0655e621207 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/User.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/User.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * User */ @@ -64,8 +45,6 @@ public class User { @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public User() { - } public User id(String id) { @@ -78,6 +57,7 @@ public User id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "a unique identifier for the user. In password-based authentication, this is the email.") public String getId() { return id; @@ -100,6 +80,7 @@ public User creationDate(Long creationDate) { * @return creationDate **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Unix Epoch in seconds") public Long getCreationDate() { return creationDate; @@ -122,6 +103,7 @@ public User friendlyName(String friendlyName) { * @return friendlyName **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getFriendlyName() { return friendlyName; @@ -144,6 +126,7 @@ public User email(String email) { * @return email **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getEmail() { return email; @@ -155,7 +138,6 @@ public void setEmail(String email) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,109 +181,5 @@ private String toIndentedString(Object o) { 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("creation_date"); - openapiFields.add("friendly_name"); - openapiFields.add("email"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("creation_date"); - } - - /** - * 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()) { // has required fields but JSON object 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (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(), jsonObj.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 (!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("friendly_name") != null && !jsonObj.get("friendly_name").isJsonNull()) && !jsonObj.get("friendly_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `friendly_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("friendly_name").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!User.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'User' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(User.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, User value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public User read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.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 - */ - 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 - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/UserCreation.java b/clients/java/src/main/java/io/lakefs/clients/api/model/UserCreation.java index 34e364303ad..f3d7a9eb482 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/UserCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/UserCreation.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * UserCreation */ @@ -56,8 +37,6 @@ public class UserCreation { @SerializedName(SERIALIZED_NAME_INVITE_USER) private Boolean inviteUser; - public UserCreation() { - } public UserCreation id(String id) { @@ -70,6 +49,7 @@ public UserCreation id(String id) { * @return id **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "a unique identifier for the user. In password-based authentication, this is the email.") public String getId() { return id; @@ -92,6 +72,7 @@ public UserCreation inviteUser(Boolean inviteUser) { * @return inviteUser **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Boolean getInviteUser() { return inviteUser; @@ -103,7 +84,6 @@ public void setInviteUser(Boolean inviteUser) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,100 +123,5 @@ private String toIndentedString(Object o) { 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("invite_user"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - 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 UserCreation - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserCreation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserCreation is not found in the empty JSON string", UserCreation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UserCreation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserCreation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserCreation.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 (!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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserCreation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserCreation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UserCreation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UserCreation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserCreation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UserCreation given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserCreation - * @throws IOException if the JSON string is invalid with respect to UserCreation - */ - public static UserCreation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserCreation.class); - } - - /** - * Convert an instance of UserCreation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/UserList.java b/clients/java/src/main/java/io/lakefs/clients/api/model/UserList.java index 0f483b100e6..dac17333100 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/UserList.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/UserList.java @@ -22,31 +22,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.User; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * UserList */ @@ -58,10 +39,8 @@ public class UserList { public static final String SERIALIZED_NAME_RESULTS = "results"; @SerializedName(SERIALIZED_NAME_RESULTS) - private List results = new ArrayList<>(); + private List results = new ArrayList(); - public UserList() { - } public UserList pagination(Pagination pagination) { @@ -74,6 +53,7 @@ public UserList pagination(Pagination pagination) { * @return pagination **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public Pagination getPagination() { return pagination; @@ -101,6 +81,7 @@ public UserList addResultsItem(User resultsItem) { * @return results **/ @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") public List getResults() { return results; @@ -112,7 +93,6 @@ public void setResults(List results) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -152,110 +132,5 @@ private String toIndentedString(Object o) { 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("pagination"); - openapiFields.add("results"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("pagination"); - openapiRequiredFields.add("results"); - } - - /** - * 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 UserList - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!UserList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserList is not found in the empty JSON string", UserList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!UserList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UserList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserList.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())); - } - } - // validate the required field `pagination` - Pagination.validateJsonObject(jsonObj.getAsJsonObject("pagination")); - // ensure the json data is an array - if (!jsonObj.get("results").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); - } - - JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); - // validate the required field `results` (array) - for (int i = 0; i < jsonArrayresults.size(); i++) { - User.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UserList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UserList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public UserList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UserList given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserList - * @throws IOException if the JSON string is invalid with respect to UserList - */ - public static UserList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserList.class); - } - - /** - * Convert an instance of UserList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/model/VersionConfig.java b/clients/java/src/main/java/io/lakefs/clients/api/model/VersionConfig.java index dc900763075..97a4d0d7181 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/model/VersionConfig.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/model/VersionConfig.java @@ -20,29 +20,10 @@ 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 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 java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import io.lakefs.clients.api.JSON; - /** * VersionConfig */ @@ -60,8 +41,6 @@ public class VersionConfig { @SerializedName(SERIALIZED_NAME_UPGRADE_URL) private String upgradeUrl; - public VersionConfig() { - } public VersionConfig version(String version) { @@ -74,6 +53,7 @@ public VersionConfig version(String version) { * @return version **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getVersion() { return version; @@ -96,6 +76,7 @@ public VersionConfig upgradeRecommended(Boolean upgradeRecommended) { * @return upgradeRecommended **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public Boolean getUpgradeRecommended() { return upgradeRecommended; @@ -118,6 +99,7 @@ public VersionConfig upgradeUrl(String upgradeUrl) { * @return upgradeUrl **/ @javax.annotation.Nullable + @ApiModelProperty(value = "") public String getUpgradeUrl() { return upgradeUrl; @@ -129,7 +111,6 @@ public void setUpgradeUrl(String upgradeUrl) { } - @Override public boolean equals(Object o) { if (this == o) { @@ -171,96 +152,5 @@ private String toIndentedString(Object o) { 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("version"); - openapiFields.add("upgrade_recommended"); - openapiFields.add("upgrade_url"); - - // 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 VersionConfig - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VersionConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VersionConfig is not found in the empty JSON string", VersionConfig.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!VersionConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VersionConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - 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("upgrade_url") != null && !jsonObj.get("upgrade_url").isJsonNull()) && !jsonObj.get("upgrade_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `upgrade_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upgrade_url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VersionConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VersionConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VersionConfig.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VersionConfig value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public VersionConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VersionConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of VersionConfig - * @throws IOException if the JSON string is invalid with respect to VersionConfig - */ - public static VersionConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VersionConfig.class); - } - - /** - * Convert an instance of VersionConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/ActionsApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/ActionsApiTest.java index 1000ae28dcc..73c3258e11e 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/ActionsApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/ActionsApiTest.java @@ -19,8 +19,8 @@ import io.lakefs.clients.api.model.Error; import java.io.File; import io.lakefs.clients.api.model.HookRunList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -30,42 +30,52 @@ /** * API tests for ActionsApi */ -@Disabled +@Ignore public class ActionsApiTest { private final ActionsApi api = new ActionsApi(); + /** * get a run * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getRunTest() throws ApiException { String repository = null; String runId = null; - ActionRun response = api.getRun(repository, runId); + ActionRun response = api.getRun(repository, runId); // TODO: test validations } - + /** * get run hook output * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getRunHookOutputTest() throws ApiException { String repository = null; String runId = null; String hookRunId = null; - File response = api.getRunHookOutput(repository, runId, hookRunId); + File response = api.getRunHookOutput(repository, runId, hookRunId); // TODO: test validations } - + /** * list runs * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listRepositoryRunsTest() throws ApiException { @@ -74,14 +84,17 @@ public void listRepositoryRunsTest() throws ApiException { Integer amount = null; String branch = null; String commit = null; - ActionRunList response = api.listRepositoryRuns(repository, after, amount, branch, commit); + ActionRunList response = api.listRepositoryRuns(repository, after, amount, branch, commit); // TODO: test validations } - + /** * list run hooks * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listRunHooksTest() throws ApiException { @@ -89,8 +102,8 @@ public void listRunHooksTest() throws ApiException { String runId = null; String after = null; Integer amount = null; - HookRunList response = api.listRunHooks(repository, runId, after, amount); + HookRunList response = api.listRunHooks(repository, runId, after, amount); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/AuthApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/AuthApiTest.java index 15ce936747d..dfda2445d90 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/AuthApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/AuthApiTest.java @@ -32,8 +32,8 @@ import io.lakefs.clients.api.model.User; import io.lakefs.clients.api.model.UserCreation; import io.lakefs.clients.api.model.UserList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -43,273 +43,340 @@ /** * API tests for AuthApi */ -@Disabled +@Ignore public class AuthApiTest { private final AuthApi api = new AuthApi(); + /** * add group membership * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void addGroupMembershipTest() throws ApiException { String groupId = null; String userId = null; - api.addGroupMembership(groupId, userId); + api.addGroupMembership(groupId, userId); // TODO: test validations } - + /** * attach policy to group * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void attachPolicyToGroupTest() throws ApiException { String groupId = null; String policyId = null; - api.attachPolicyToGroup(groupId, policyId); + api.attachPolicyToGroup(groupId, policyId); // TODO: test validations } - + /** * attach policy to user * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void attachPolicyToUserTest() throws ApiException { String userId = null; String policyId = null; - api.attachPolicyToUser(userId, policyId); + api.attachPolicyToUser(userId, policyId); // TODO: test validations } - + /** * create credentials * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createCredentialsTest() throws ApiException { String userId = null; - CredentialsWithSecret response = api.createCredentials(userId); + CredentialsWithSecret response = api.createCredentials(userId); // TODO: test validations } - + /** * create group * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createGroupTest() throws ApiException { GroupCreation groupCreation = null; - Group response = api.createGroup(groupCreation); + Group response = api.createGroup(groupCreation); // TODO: test validations } - + /** * create policy * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createPolicyTest() throws ApiException { Policy policy = null; - Policy response = api.createPolicy(policy); + Policy response = api.createPolicy(policy); // TODO: test validations } - + /** * create user * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createUserTest() throws ApiException { UserCreation userCreation = null; - User response = api.createUser(userCreation); + User response = api.createUser(userCreation); // TODO: test validations } - + /** * delete credentials * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteCredentialsTest() throws ApiException { String userId = null; String accessKeyId = null; - api.deleteCredentials(userId, accessKeyId); + api.deleteCredentials(userId, accessKeyId); // TODO: test validations } - + /** * delete group * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteGroupTest() throws ApiException { String groupId = null; - api.deleteGroup(groupId); + api.deleteGroup(groupId); // TODO: test validations } - + /** * delete group membership * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteGroupMembershipTest() throws ApiException { String groupId = null; String userId = null; - api.deleteGroupMembership(groupId, userId); + api.deleteGroupMembership(groupId, userId); // TODO: test validations } - + /** * delete policy * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deletePolicyTest() throws ApiException { String policyId = null; - api.deletePolicy(policyId); + api.deletePolicy(policyId); // TODO: test validations } - + /** * delete user * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteUserTest() throws ApiException { String userId = null; - api.deleteUser(userId); + api.deleteUser(userId); // TODO: test validations } - + /** * detach policy from group * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void detachPolicyFromGroupTest() throws ApiException { String groupId = null; String policyId = null; - api.detachPolicyFromGroup(groupId, policyId); + api.detachPolicyFromGroup(groupId, policyId); // TODO: test validations } - + /** * detach policy from user * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void detachPolicyFromUserTest() throws ApiException { String userId = null; String policyId = null; - api.detachPolicyFromUser(userId, policyId); + api.detachPolicyFromUser(userId, policyId); // TODO: test validations } - + /** * forgot password request initiates the password reset process * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void forgotPasswordTest() throws ApiException { ForgotPasswordRequest forgotPasswordRequest = null; - api.forgotPassword(forgotPasswordRequest); + api.forgotPassword(forgotPasswordRequest); // TODO: test validations } - + /** * list authentication capabilities supported * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getAuthCapabilitiesTest() throws ApiException { - AuthCapabilities response = api.getAuthCapabilities(); + AuthCapabilities response = api.getAuthCapabilities(); // TODO: test validations } - + /** * get credentials * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getCredentialsTest() throws ApiException { String userId = null; String accessKeyId = null; - Credentials response = api.getCredentials(userId, accessKeyId); + Credentials response = api.getCredentials(userId, accessKeyId); // TODO: test validations } - + /** * get current user * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getCurrentUserTest() throws ApiException { - CurrentUser response = api.getCurrentUser(); + CurrentUser response = api.getCurrentUser(); // TODO: test validations } - + /** * get group * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getGroupTest() throws ApiException { String groupId = null; - Group response = api.getGroup(groupId); + Group response = api.getGroup(groupId); // TODO: test validations } - + /** * get policy * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getPolicyTest() throws ApiException { String policyId = null; - Policy response = api.getPolicy(policyId); + Policy response = api.getPolicy(policyId); // TODO: test validations } - + /** * get user * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getUserTest() throws ApiException { String userId = null; - User response = api.getUser(userId); + User response = api.getUser(userId); // TODO: test validations } - + /** * list group members * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listGroupMembersTest() throws ApiException { @@ -317,14 +384,17 @@ public void listGroupMembersTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - UserList response = api.listGroupMembers(groupId, prefix, after, amount); + UserList response = api.listGroupMembers(groupId, prefix, after, amount); // TODO: test validations } - + /** * list group policies * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listGroupPoliciesTest() throws ApiException { @@ -332,42 +402,51 @@ public void listGroupPoliciesTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - PolicyList response = api.listGroupPolicies(groupId, prefix, after, amount); + PolicyList response = api.listGroupPolicies(groupId, prefix, after, amount); // TODO: test validations } - + /** * list groups * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listGroupsTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - GroupList response = api.listGroups(prefix, after, amount); + GroupList response = api.listGroups(prefix, after, amount); // TODO: test validations } - + /** * list policies * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listPoliciesTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - PolicyList response = api.listPolicies(prefix, after, amount); + PolicyList response = api.listPolicies(prefix, after, amount); // TODO: test validations } - + /** * list user credentials * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listUserCredentialsTest() throws ApiException { @@ -375,14 +454,17 @@ public void listUserCredentialsTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - CredentialsList response = api.listUserCredentials(userId, prefix, after, amount); + CredentialsList response = api.listUserCredentials(userId, prefix, after, amount); // TODO: test validations } - + /** * list user groups * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listUserGroupsTest() throws ApiException { @@ -390,14 +472,17 @@ public void listUserGroupsTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - GroupList response = api.listUserGroups(userId, prefix, after, amount); + GroupList response = api.listUserGroups(userId, prefix, after, amount); // TODO: test validations } - + /** * list user policies * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listUserPoliciesTest() throws ApiException { @@ -406,59 +491,71 @@ public void listUserPoliciesTest() throws ApiException { String after = null; Integer amount = null; Boolean effective = null; - PolicyList response = api.listUserPolicies(userId, prefix, after, amount, effective); + PolicyList response = api.listUserPolicies(userId, prefix, after, amount, effective); // TODO: test validations } - + /** * list users * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listUsersTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - UserList response = api.listUsers(prefix, after, amount); + UserList response = api.listUsers(prefix, after, amount); // TODO: test validations } - + /** * perform a login * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void loginTest() throws ApiException { LoginInformation loginInformation = null; - AuthenticationToken response = api.login(loginInformation); + AuthenticationToken response = api.login(loginInformation); // TODO: test validations } - + /** * Update user password by reset_password token * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void updatePasswordTest() throws ApiException { UpdatePasswordByToken updatePasswordByToken = null; - api.updatePassword(updatePasswordByToken); + api.updatePassword(updatePasswordByToken); // TODO: test validations } - + /** * update policy * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void updatePolicyTest() throws ApiException { String policyId = null; Policy policy = null; - Policy response = api.updatePolicy(policyId, policy); + Policy response = api.updatePolicy(policyId, policy); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/BranchesApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/BranchesApiTest.java index 7e08e3b4f03..3b8203d6bdb 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/BranchesApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/BranchesApiTest.java @@ -23,8 +23,8 @@ import io.lakefs.clients.api.model.RefList; import io.lakefs.clients.api.model.ResetCreation; import io.lakefs.clients.api.model.RevertCreation; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -34,55 +34,68 @@ /** * API tests for BranchesApi */ -@Disabled +@Ignore public class BranchesApiTest { private final BranchesApi api = new BranchesApi(); + /** * Replay the changes from the given commit on the branch * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void cherryPickTest() throws ApiException { String repository = null; String branch = null; CherryPickCreation cherryPickCreation = null; - Commit response = api.cherryPick(repository, branch, cherryPickCreation); + Commit response = api.cherryPick(repository, branch, cherryPickCreation); // TODO: test validations } - + /** * create branch * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createBranchTest() throws ApiException { String repository = null; BranchCreation branchCreation = null; - String response = api.createBranch(repository, branchCreation); + String response = api.createBranch(repository, branchCreation); // TODO: test validations } - + /** * delete branch * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteBranchTest() throws ApiException { String repository = null; String branch = null; - api.deleteBranch(repository, branch); + api.deleteBranch(repository, branch); // TODO: test validations } - + /** * diff branch * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void diffBranchTest() throws ApiException { @@ -92,27 +105,33 @@ public void diffBranchTest() throws ApiException { Integer amount = null; String prefix = null; String delimiter = null; - DiffList response = api.diffBranch(repository, branch, after, amount, prefix, delimiter); + DiffList response = api.diffBranch(repository, branch, after, amount, prefix, delimiter); // TODO: test validations } - + /** * get branch * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getBranchTest() throws ApiException { String repository = null; String branch = null; - Ref response = api.getBranch(repository, branch); + Ref response = api.getBranch(repository, branch); // TODO: test validations } - + /** * list branches * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listBranchesTest() throws ApiException { @@ -120,36 +139,42 @@ public void listBranchesTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - RefList response = api.listBranches(repository, prefix, after, amount); + RefList response = api.listBranches(repository, prefix, after, amount); // TODO: test validations } - + /** * reset branch * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void resetBranchTest() throws ApiException { String repository = null; String branch = null; ResetCreation resetCreation = null; - api.resetBranch(repository, branch, resetCreation); + api.resetBranch(repository, branch, resetCreation); // TODO: test validations } - + /** * revert * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void revertBranchTest() throws ApiException { String repository = null; String branch = null; RevertCreation revertCreation = null; - api.revertBranch(repository, branch, revertCreation); + api.revertBranch(repository, branch, revertCreation); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/CommitsApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/CommitsApiTest.java index 80fb0a89b67..fe97a0c2df5 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/CommitsApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/CommitsApiTest.java @@ -18,8 +18,8 @@ import io.lakefs.clients.api.model.CommitCreation; import io.lakefs.clients.api.model.CommitList; import io.lakefs.clients.api.model.Error; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -29,15 +29,19 @@ /** * API tests for CommitsApi */ -@Disabled +@Ignore public class CommitsApiTest { private final CommitsApi api = new CommitsApi(); + /** * create commit * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void commitTest() throws ApiException { @@ -45,27 +49,33 @@ public void commitTest() throws ApiException { String branch = null; CommitCreation commitCreation = null; String sourceMetarange = null; - Commit response = api.commit(repository, branch, commitCreation, sourceMetarange); + Commit response = api.commit(repository, branch, commitCreation, sourceMetarange); // TODO: test validations } - + /** * get commit * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getCommitTest() throws ApiException { String repository = null; String commitId = null; - Commit response = api.getCommit(repository, commitId); + Commit response = api.getCommit(repository, commitId); // TODO: test validations } - + /** * get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void logBranchCommitsTest() throws ApiException { @@ -73,8 +83,8 @@ public void logBranchCommitsTest() throws ApiException { String branch = null; String after = null; Integer amount = null; - CommitList response = api.logBranchCommits(repository, branch, after, amount); + CommitList response = api.logBranchCommits(repository, branch, after, amount); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/ConfigApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/ConfigApiTest.java index f6eea60c696..af0a3a2ba2d 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/ConfigApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/ConfigApiTest.java @@ -23,8 +23,8 @@ import io.lakefs.clients.api.model.SetupState; import io.lakefs.clients.api.model.StorageConfig; import io.lakefs.clients.api.model.VersionConfig; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -34,77 +34,96 @@ /** * API tests for ConfigApi */ -@Disabled +@Ignore public class ConfigApiTest { private final ConfigApi api = new ConfigApi(); + /** + * + * * get information of gc settings * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void getGarbageCollectionConfigTest() throws ApiException { - GarbageCollectionConfig response = api.getGarbageCollectionConfig(); + GarbageCollectionConfig response = api.getGarbageCollectionConfig(); // TODO: test validations } - + /** + * + * * get version of lakeFS server * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void getLakeFSVersionTest() throws ApiException { - VersionConfig response = api.getLakeFSVersion(); + VersionConfig response = api.getLakeFSVersion(); // TODO: test validations } - + /** * check if the lakeFS installation is already set up * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getSetupStateTest() throws ApiException { - SetupState response = api.getSetupState(); + SetupState response = api.getSetupState(); // TODO: test validations } - + /** + * + * * retrieve lakeFS storage configuration * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void getStorageConfigTest() throws ApiException { - StorageConfig response = api.getStorageConfig(); + StorageConfig response = api.getStorageConfig(); // TODO: test validations } - + /** * setup lakeFS and create a first user * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void setupTest() throws ApiException { Setup setup = null; - CredentialsWithSecret response = api.setup(setup); + CredentialsWithSecret response = api.setup(setup); // TODO: test validations } - + /** * setup communications preferences * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void setupCommPrefsTest() throws ApiException { CommPrefsInput commPrefsInput = null; - NextStep response = api.setupCommPrefs(commPrefsInput); + NextStep response = api.setupCommPrefs(commPrefsInput); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java index fcd63e78872..3f0261088ad 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java @@ -16,8 +16,8 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.Error; import io.lakefs.clients.api.model.OtfDiffList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -27,15 +27,19 @@ /** * API tests for ExperimentalApi */ -@Disabled +@Ignore public class ExperimentalApiTest { private final ExperimentalApi api = new ExperimentalApi(); + /** * perform otf diff * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void otfDiffTest() throws ApiException { @@ -44,8 +48,8 @@ public void otfDiffTest() throws ApiException { String rightRef = null; String tablePath = null; String type = null; - OtfDiffList response = api.otfDiff(repository, leftRef, rightRef, tablePath, type); + OtfDiffList response = api.otfDiff(repository, leftRef, rightRef, tablePath, type); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/HealthCheckApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/HealthCheckApiTest.java index 396e6c43421..4ea34f6411f 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/HealthCheckApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/HealthCheckApiTest.java @@ -14,8 +14,8 @@ package io.lakefs.clients.api; import io.lakefs.clients.api.ApiException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -25,20 +25,24 @@ /** * API tests for HealthCheckApi */ -@Disabled +@Ignore public class HealthCheckApiTest { private final HealthCheckApi api = new HealthCheckApi(); + /** + * + * * check that the API server is up and running * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void healthCheckTest() throws ApiException { - api.healthCheck(); + api.healthCheck(); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/ImportApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/ImportApiTest.java index cbb50540621..f08e34c71c3 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/ImportApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/ImportApiTest.java @@ -19,8 +19,8 @@ import io.lakefs.clients.api.model.MetaRangeCreation; import io.lakefs.clients.api.model.MetaRangeCreationResponse; import io.lakefs.clients.api.model.StageRangeCreation; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -30,35 +30,42 @@ /** * API tests for ImportApi */ -@Disabled +@Ignore public class ImportApiTest { private final ImportApi api = new ImportApi(); + /** * create a lakeFS metarange file from the given ranges * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createMetaRangeTest() throws ApiException { String repository = null; MetaRangeCreation metaRangeCreation = null; - MetaRangeCreationResponse response = api.createMetaRange(repository, metaRangeCreation); + MetaRangeCreationResponse response = api.createMetaRange(repository, metaRangeCreation); // TODO: test validations } - + /** * create a lakeFS range file from the source uri * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void ingestRangeTest() throws ApiException { String repository = null; StageRangeCreation stageRangeCreation = null; - IngestRangeCreationResponse response = api.ingestRange(repository, stageRangeCreation); + IngestRangeCreationResponse response = api.ingestRange(repository, stageRangeCreation); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/MetadataApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/MetadataApiTest.java index 90b133f398c..56fcddc7aa7 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/MetadataApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/MetadataApiTest.java @@ -16,8 +16,8 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.Error; import io.lakefs.clients.api.model.StorageURI; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -27,49 +27,59 @@ /** * API tests for MetadataApi */ -@Disabled +@Ignore public class MetadataApiTest { private final MetadataApi api = new MetadataApi(); + /** * creates symlink files corresponding to the given directory * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createSymlinkFileTest() throws ApiException { String repository = null; String branch = null; String location = null; - StorageURI response = api.createSymlinkFile(repository, branch, location); + StorageURI response = api.createSymlinkFile(repository, branch, location); // TODO: test validations } - + /** * return URI to a meta-range file * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getMetaRangeTest() throws ApiException { String repository = null; String metaRange = null; - StorageURI response = api.getMetaRange(repository, metaRange); + StorageURI response = api.getMetaRange(repository, metaRange); // TODO: test validations } - + /** * return URI to a range file * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getRangeTest() throws ApiException { String repository = null; String range = null; - StorageURI response = api.getRange(repository, range); + StorageURI response = api.getRange(repository, range); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/ObjectsApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/ObjectsApiTest.java index d2ad765a72e..cc2d51325ff 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/ObjectsApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/ObjectsApiTest.java @@ -23,8 +23,8 @@ import io.lakefs.clients.api.model.ObjectStatsList; import io.lakefs.clients.api.model.PathList; import io.lakefs.clients.api.model.UnderlyingObjectProperties; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -34,15 +34,19 @@ /** * API tests for ObjectsApi */ -@Disabled +@Ignore public class ObjectsApiTest { private final ObjectsApi api = new ObjectsApi(); + /** * create a copy of an object * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void copyObjectTest() throws ApiException { @@ -50,42 +54,51 @@ public void copyObjectTest() throws ApiException { String branch = null; String destPath = null; ObjectCopyCreation objectCopyCreation = null; - ObjectStats response = api.copyObject(repository, branch, destPath, objectCopyCreation); + ObjectStats response = api.copyObject(repository, branch, destPath, objectCopyCreation); // TODO: test validations } - + /** * delete object. Missing objects will not return a NotFound error. * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteObjectTest() throws ApiException { String repository = null; String branch = null; String path = null; - api.deleteObject(repository, branch, path); + api.deleteObject(repository, branch, path); // TODO: test validations } - + /** * delete objects. Missing objects will not return a NotFound error. * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteObjectsTest() throws ApiException { String repository = null; String branch = null; PathList pathList = null; - ObjectErrorList response = api.deleteObjects(repository, branch, pathList); + ObjectErrorList response = api.deleteObjects(repository, branch, pathList); // TODO: test validations } - + /** * get object content * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getObjectTest() throws ApiException { @@ -94,28 +107,34 @@ public void getObjectTest() throws ApiException { String path = null; String range = null; Boolean presign = null; - File response = api.getObject(repository, ref, path, range, presign); + File response = api.getObject(repository, ref, path, range, presign); // TODO: test validations } - + /** * get object properties on underlying storage * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getUnderlyingPropertiesTest() throws ApiException { String repository = null; String ref = null; String path = null; - UnderlyingObjectProperties response = api.getUnderlyingProperties(repository, ref, path); + UnderlyingObjectProperties response = api.getUnderlyingProperties(repository, ref, path); // TODO: test validations } - + /** * check if object exists * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void headObjectTest() throws ApiException { @@ -123,14 +142,17 @@ public void headObjectTest() throws ApiException { String ref = null; String path = null; String range = null; - api.headObject(repository, ref, path, range); + api.headObject(repository, ref, path, range); // TODO: test validations } - + /** * list objects under a given prefix * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listObjectsTest() throws ApiException { @@ -142,14 +164,17 @@ public void listObjectsTest() throws ApiException { Integer amount = null; String delimiter = null; String prefix = null; - ObjectStatsList response = api.listObjects(repository, ref, userMetadata, presign, after, amount, delimiter, prefix); + ObjectStatsList response = api.listObjects(repository, ref, userMetadata, presign, after, amount, delimiter, prefix); // TODO: test validations } - + /** * stage an object's metadata for the given branch * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void stageObjectTest() throws ApiException { @@ -157,14 +182,17 @@ public void stageObjectTest() throws ApiException { String branch = null; String path = null; ObjectStageCreation objectStageCreation = null; - ObjectStats response = api.stageObject(repository, branch, path, objectStageCreation); + ObjectStats response = api.stageObject(repository, branch, path, objectStageCreation); // TODO: test validations } - + /** * get object metadata * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void statObjectTest() throws ApiException { @@ -173,12 +201,17 @@ public void statObjectTest() throws ApiException { String path = null; Boolean userMetadata = null; Boolean presign = null; - ObjectStats response = api.statObject(repository, ref, path, userMetadata, presign); + ObjectStats response = api.statObject(repository, ref, path, userMetadata, presign); // TODO: test validations } - + /** - * @throws ApiException if the Api call fails + * + * + * + * + * @throws ApiException + * if the Api call fails */ @Test public void uploadObjectTest() throws ApiException { @@ -188,8 +221,8 @@ public void uploadObjectTest() throws ApiException { String storageClass = null; String ifNoneMatch = null; File content = null; - ObjectStats response = api.uploadObject(repository, branch, path, storageClass, ifNoneMatch, content); + ObjectStats response = api.uploadObject(repository, branch, path, storageClass, ifNoneMatch, content); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/OtfDiffApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/OtfDiffApiTest.java index 0c5f1ec6d34..ac3923a3f08 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/OtfDiffApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/OtfDiffApiTest.java @@ -16,8 +16,8 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.Error; import io.lakefs.clients.api.model.OtfDiffList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -27,15 +27,19 @@ /** * API tests for OtfDiffApi */ -@Disabled +@Ignore public class OtfDiffApiTest { private final OtfDiffApi api = new OtfDiffApi(); + /** * perform otf diff * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void otfDiffTest() throws ApiException { @@ -44,8 +48,8 @@ public void otfDiffTest() throws ApiException { String rightRef = null; String tablePath = null; String type = null; - OtfDiffList response = api.otfDiff(repository, leftRef, rightRef, tablePath, type); + OtfDiffList response = api.otfDiff(repository, leftRef, rightRef, tablePath, type); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/RefsApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/RefsApiTest.java index 6f0008db839..a6438b6cafe 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/RefsApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/RefsApiTest.java @@ -21,8 +21,8 @@ import io.lakefs.clients.api.model.Merge; import io.lakefs.clients.api.model.MergeResult; import io.lakefs.clients.api.model.RefsDump; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -32,15 +32,19 @@ /** * API tests for RefsApi */ -@Disabled +@Ignore public class RefsApiTest { private final RefsApi api = new RefsApi(); + /** * diff references * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void diffRefsTest() throws ApiException { @@ -52,40 +56,49 @@ public void diffRefsTest() throws ApiException { String prefix = null; String delimiter = null; String type = null; - DiffList response = api.diffRefs(repository, leftRef, rightRef, after, amount, prefix, delimiter, type); + DiffList response = api.diffRefs(repository, leftRef, rightRef, after, amount, prefix, delimiter, type); // TODO: test validations } - + /** * Dump repository refs (tags, commits, branches) to object store * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void dumpRefsTest() throws ApiException { String repository = null; - RefsDump response = api.dumpRefs(repository); + RefsDump response = api.dumpRefs(repository); // TODO: test validations } - + /** * find the merge base for 2 references * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void findMergeBaseTest() throws ApiException { String repository = null; String sourceRef = null; String destinationBranch = null; - FindMergeBaseResult response = api.findMergeBase(repository, sourceRef, destinationBranch); + FindMergeBaseResult response = api.findMergeBase(repository, sourceRef, destinationBranch); // TODO: test validations } - + /** * get commit log from ref. If both objects and prefixes are empty, return all commits. * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void logCommitsTest() throws ApiException { @@ -96,14 +109,17 @@ public void logCommitsTest() throws ApiException { List objects = null; List prefixes = null; Boolean limit = null; - CommitList response = api.logCommits(repository, ref, after, amount, objects, prefixes, limit); + CommitList response = api.logCommits(repository, ref, after, amount, objects, prefixes, limit); // TODO: test validations } - + /** * merge references * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void mergeIntoBranchTest() throws ApiException { @@ -111,21 +127,24 @@ public void mergeIntoBranchTest() throws ApiException { String sourceRef = null; String destinationBranch = null; Merge merge = null; - MergeResult response = api.mergeIntoBranch(repository, sourceRef, destinationBranch, merge); + MergeResult response = api.mergeIntoBranch(repository, sourceRef, destinationBranch, merge); // TODO: test validations } - + /** * Restore repository refs (tags, commits, branches) from object store * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void restoreRefsTest() throws ApiException { String repository = null; RefsDump refsDump = null; - api.restoreRefs(repository, refsDump); + api.restoreRefs(repository, refsDump); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java index 8acef1a5165..e2c89abb276 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/RepositoriesApiTest.java @@ -15,13 +15,13 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.BranchProtectionRule; -import io.lakefs.clients.api.model.DeleteBranchProtectionRuleRequest; import io.lakefs.clients.api.model.Error; +import io.lakefs.clients.api.model.InlineObject1; import io.lakefs.clients.api.model.Repository; import io.lakefs.clients.api.model.RepositoryCreation; import io.lakefs.clients.api.model.RepositoryList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -31,94 +31,120 @@ /** * API tests for RepositoriesApi */ -@Disabled +@Ignore public class RepositoriesApiTest { private final RepositoriesApi api = new RepositoriesApi(); + /** - * @throws ApiException if the Api call fails + * + * + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createBranchProtectionRuleTest() throws ApiException { String repository = null; BranchProtectionRule branchProtectionRule = null; - api.createBranchProtectionRule(repository, branchProtectionRule); + api.createBranchProtectionRule(repository, branchProtectionRule); // TODO: test validations } - + /** * create repository * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createRepositoryTest() throws ApiException { RepositoryCreation repositoryCreation = null; Boolean bare = null; - Repository response = api.createRepository(repositoryCreation, bare); + Repository response = api.createRepository(repositoryCreation, bare); // TODO: test validations } - + /** - * @throws ApiException if the Api call fails + * + * + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteBranchProtectionRuleTest() throws ApiException { String repository = null; - DeleteBranchProtectionRuleRequest deleteBranchProtectionRuleRequest = null; - api.deleteBranchProtectionRule(repository, deleteBranchProtectionRuleRequest); + InlineObject1 inlineObject1 = null; + api.deleteBranchProtectionRule(repository, inlineObject1); // TODO: test validations } - + /** * delete repository * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteRepositoryTest() throws ApiException { String repository = null; - api.deleteRepository(repository); + api.deleteRepository(repository); // TODO: test validations } - + /** * get branch protection rules * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getBranchProtectionRulesTest() throws ApiException { String repository = null; - List response = api.getBranchProtectionRules(repository); + List response = api.getBranchProtectionRules(repository); // TODO: test validations } - + /** * get repository * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getRepositoryTest() throws ApiException { String repository = null; - Repository response = api.getRepository(repository); + Repository response = api.getRepository(repository); // TODO: test validations } - + /** * list repositories * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listRepositoriesTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - RepositoryList response = api.listRepositories(prefix, after, amount); + RepositoryList response = api.listRepositories(prefix, after, amount); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/RetentionApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/RetentionApiTest.java index 523c6387878..f9e0d39b8b9 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/RetentionApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/RetentionApiTest.java @@ -20,8 +20,8 @@ import io.lakefs.clients.api.model.GarbageCollectionRules; import io.lakefs.clients.api.model.PrepareGCUncommittedRequest; import io.lakefs.clients.api.model.PrepareGCUncommittedResponse; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -31,66 +31,88 @@ /** * API tests for RetentionApi */ -@Disabled +@Ignore public class RetentionApiTest { private final RetentionApi api = new RetentionApi(); + /** - * @throws ApiException if the Api call fails + * + * + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteGarbageCollectionRulesTest() throws ApiException { String repository = null; - api.deleteGarbageCollectionRules(repository); + api.deleteGarbageCollectionRules(repository); // TODO: test validations } - + /** - * @throws ApiException if the Api call fails + * + * + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getGarbageCollectionRulesTest() throws ApiException { String repository = null; - GarbageCollectionRules response = api.getGarbageCollectionRules(repository); + GarbageCollectionRules response = api.getGarbageCollectionRules(repository); // TODO: test validations } - + /** * save lists of active and expired commits for garbage collection * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void prepareGarbageCollectionCommitsTest() throws ApiException { String repository = null; GarbageCollectionPrepareRequest garbageCollectionPrepareRequest = null; - GarbageCollectionPrepareResponse response = api.prepareGarbageCollectionCommits(repository, garbageCollectionPrepareRequest); + GarbageCollectionPrepareResponse response = api.prepareGarbageCollectionCommits(repository, garbageCollectionPrepareRequest); // TODO: test validations } - + /** * save repository uncommitted metadata for garbage collection * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void prepareGarbageCollectionUncommittedTest() throws ApiException { String repository = null; PrepareGCUncommittedRequest prepareGCUncommittedRequest = null; - PrepareGCUncommittedResponse response = api.prepareGarbageCollectionUncommitted(repository, prepareGCUncommittedRequest); + PrepareGCUncommittedResponse response = api.prepareGarbageCollectionUncommitted(repository, prepareGCUncommittedRequest); // TODO: test validations } - + /** - * @throws ApiException if the Api call fails + * + * + * + * + * @throws ApiException + * if the Api call fails */ @Test public void setGarbageCollectionRulesTest() throws ApiException { String repository = null; GarbageCollectionRules garbageCollectionRules = null; - api.setGarbageCollectionRules(repository, garbageCollectionRules); + api.setGarbageCollectionRules(repository, garbageCollectionRules); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/StagingApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/StagingApiTest.java index c9d66f4e3d1..15ae8f85bbe 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/StagingApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/StagingApiTest.java @@ -18,8 +18,8 @@ import io.lakefs.clients.api.model.ObjectStats; import io.lakefs.clients.api.model.StagingLocation; import io.lakefs.clients.api.model.StagingMetadata; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -29,15 +29,19 @@ /** * API tests for StagingApi */ -@Disabled +@Ignore public class StagingApiTest { private final StagingApi api = new StagingApi(); + /** * get a physical address and a return token to write object to underlying storage * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getPhysicalAddressTest() throws ApiException { @@ -45,16 +49,17 @@ public void getPhysicalAddressTest() throws ApiException { String branch = null; String path = null; Boolean presign = null; - StagingLocation response = api.getPhysicalAddress(repository, branch, path, presign); + StagingLocation response = api.getPhysicalAddress(repository, branch, path, presign); // TODO: test validations } - + /** * associate staging on this physical address with a path * * If the supplied token matches the current staging token, associate the object as the physical address with the supplied path. Otherwise, if staging has been committed and the token has expired, return a conflict and hint where to place the object to try again. Caller should copy the object to the new physical address and PUT again with the new staging token. (No need to back off, this is due to losing the race against a concurrent commit operation.) * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void linkPhysicalAddressTest() throws ApiException { @@ -62,8 +67,8 @@ public void linkPhysicalAddressTest() throws ApiException { String branch = null; String path = null; StagingMetadata stagingMetadata = null; - ObjectStats response = api.linkPhysicalAddress(repository, branch, path, stagingMetadata); + ObjectStats response = api.linkPhysicalAddress(repository, branch, path, stagingMetadata); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/StatisticsApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/StatisticsApiTest.java index d1d84a0d5ca..d5628a0b809 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/StatisticsApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/StatisticsApiTest.java @@ -16,8 +16,8 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.Error; import io.lakefs.clients.api.model.StatsEventsList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -27,21 +27,25 @@ /** * API tests for StatisticsApi */ -@Disabled +@Ignore public class StatisticsApiTest { private final StatisticsApi api = new StatisticsApi(); + /** * post stats events, this endpoint is meant for internal use only * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void postStatsEventsTest() throws ApiException { StatsEventsList statsEventsList = null; - api.postStatsEvents(statsEventsList); + api.postStatsEvents(statsEventsList); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/TagsApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/TagsApiTest.java index cb1f8424e67..9f41a87eb8e 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/TagsApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/TagsApiTest.java @@ -18,8 +18,8 @@ import io.lakefs.clients.api.model.Ref; import io.lakefs.clients.api.model.RefList; import io.lakefs.clients.api.model.TagCreation; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -29,54 +29,67 @@ /** * API tests for TagsApi */ -@Disabled +@Ignore public class TagsApiTest { private final TagsApi api = new TagsApi(); + /** * create tag * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void createTagTest() throws ApiException { String repository = null; TagCreation tagCreation = null; - Ref response = api.createTag(repository, tagCreation); + Ref response = api.createTag(repository, tagCreation); // TODO: test validations } - + /** * delete tag * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void deleteTagTest() throws ApiException { String repository = null; String tag = null; - api.deleteTag(repository, tag); + api.deleteTag(repository, tag); // TODO: test validations } - + /** * get tag * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void getTagTest() throws ApiException { String repository = null; String tag = null; - Ref response = api.getTag(repository, tag); + Ref response = api.getTag(repository, tag); // TODO: test validations } - + /** * list tags * - * @throws ApiException if the Api call fails + * + * + * @throws ApiException + * if the Api call fails */ @Test public void listTagsTest() throws ApiException { @@ -84,8 +97,8 @@ public void listTagsTest() throws ApiException { String prefix = null; String after = null; Integer amount = null; - RefList response = api.listTags(repository, prefix, after, amount); + RefList response = api.listTags(repository, prefix, after, amount); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/TemplatesApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/TemplatesApiTest.java index b16c7b83c37..0f1d4ea5309 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/TemplatesApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/TemplatesApiTest.java @@ -15,8 +15,8 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.Error; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -26,22 +26,26 @@ /** * API tests for TemplatesApi */ -@Disabled +@Ignore public class TemplatesApiTest { private final TemplatesApi api = new TemplatesApi(); + /** + * + * * fetch and expand template * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void expandTemplateTest() throws ApiException { String templateLocation = null; Map params = null; - Object response = api.expandTemplate(templateLocation, params); + Object response = api.expandTemplate(templateLocation, params); // TODO: test validations } - + } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/AccessKeyCredentialsTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/AccessKeyCredentialsTest.java index 47c70b92d59..46abca5c7f9 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/AccessKeyCredentialsTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/AccessKeyCredentialsTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunListTest.java index 1f790f61568..8c6bf711c16 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ActionRun; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunTest.java index d1145652c6f..5e4dd4688ca 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ActionRunTest.java @@ -18,10 +18,13 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.threeten.bp.OffsetDateTime; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/AuthCapabilitiesTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/AuthCapabilitiesTest.java index 83eec62cd09..bfb64d272eb 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/AuthCapabilitiesTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/AuthCapabilitiesTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/AuthenticationTokenTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/AuthenticationTokenTest.java index 0f7af0b06b6..2e0d0dc2191 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/AuthenticationTokenTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/AuthenticationTokenTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/BranchCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/BranchCreationTest.java index 870f2142a0c..fff1fb72502 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/BranchCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/BranchCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/BranchProtectionRuleTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/BranchProtectionRuleTest.java index efd8e3d31bc..87459b1ad7c 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/BranchProtectionRuleTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/BranchProtectionRuleTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CherryPickCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CherryPickCreationTest.java index f557da92a96..433531687dc 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CherryPickCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CherryPickCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CommPrefsInputTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CommPrefsInputTest.java index fc35542a8e3..8176ce6222a 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CommPrefsInputTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CommPrefsInputTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CommitCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CommitCreationTest.java index ee425c3be5f..d149398d771 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CommitCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CommitCreationTest.java @@ -18,11 +18,15 @@ 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.HashMap; +import java.util.List; import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CommitListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CommitListTest.java index dcef3ab951d..92e7cd7b9de 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CommitListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CommitListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Commit; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CommitTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CommitTest.java index a83e034c4c5..da72bd36938 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CommitTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CommitTest.java @@ -18,13 +18,16 @@ 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.HashMap; import java.util.List; import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsListTest.java index 8397e54abcf..cd3f348da92 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Credentials; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsTest.java index 015cd231946..7f47b7f0909 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsWithSecretTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsWithSecretTest.java index 1ce819e52c1..d0df45a1fb2 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsWithSecretTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CredentialsWithSecretTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/CurrentUserTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/CurrentUserTest.java index 766ab7b2f61..4c83dd28170 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/CurrentUserTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/CurrentUserTest.java @@ -19,9 +19,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.User; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/DiffListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/DiffListTest.java index 66cba12a4a0..7ea3362c722 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/DiffListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/DiffListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Diff; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/DiffTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/DiffTest.java index 70ad6688d57..10ecb7c666d 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/DiffTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/DiffTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ErrorTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ErrorTest.java index f7eb9d4ae33..b13eeaf0424 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ErrorTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ErrorTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/FindMergeBaseResultTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/FindMergeBaseResultTest.java index 8a8e2a66d4a..de28c05eb8b 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/FindMergeBaseResultTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/FindMergeBaseResultTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ForgotPasswordRequestTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ForgotPasswordRequestTest.java index 0a4d472ca3f..b0628f03581 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ForgotPasswordRequestTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ForgotPasswordRequestTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionConfigTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionConfigTest.java index 1f7622b1f01..9384b4ec1f9 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionConfigTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionConfigTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequestTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequestTest.java index 76744ff7429..0413944b58e 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequestTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareRequestTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponseTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponseTest.java index d766d4daf1e..1e71dcc1426 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponseTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionPrepareResponseTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRuleTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRuleTest.java index c6de0e875be..68c0ff0ba45 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRuleTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRuleTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRulesTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRulesTest.java index a84a765d5c1..47690ce85b6 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRulesTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GarbageCollectionRulesTest.java @@ -19,11 +19,14 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.GarbageCollectionRule; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GroupCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GroupCreationTest.java index 90b4abb1f84..1c2d4556ef7 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GroupCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GroupCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GroupListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GroupListTest.java index 1b64b1f39de..38adb10535e 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GroupListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GroupListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Group; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/GroupTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/GroupTest.java index 4f2dc33c8a9..6e3adf7d659 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/GroupTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/GroupTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunListTest.java index d93bf3221e7..cb83c652064 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.HookRun; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunTest.java index 6dfae4224c0..5a3b30d399f 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/HookRunTest.java @@ -18,10 +18,13 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.threeten.bp.OffsetDateTime; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ImportPaginationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ImportPaginationTest.java index 9d9ac4e6d18..5490ad815cc 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ImportPaginationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ImportPaginationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/IngestRangeCreationResponseTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/IngestRangeCreationResponseTest.java index b5d69768efa..175a9cb5d24 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/IngestRangeCreationResponseTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/IngestRangeCreationResponseTest.java @@ -20,9 +20,12 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ImportPagination; import io.lakefs.clients.api.model.RangeMetadata; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/DeleteBranchProtectionRuleRequestTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/InlineObject1Test.java similarity index 61% rename from clients/java/src/test/java/io/lakefs/clients/api/model/DeleteBranchProtectionRuleRequestTest.java rename to clients/java/src/test/java/io/lakefs/clients/api/model/InlineObject1Test.java index 43c1903db1a..86647aaf149 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/DeleteBranchProtectionRuleRequestTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/InlineObject1Test.java @@ -18,23 +18,26 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** - * Model tests for DeleteBranchProtectionRuleRequest + * Model tests for InlineObject1 */ -public class DeleteBranchProtectionRuleRequestTest { - private final DeleteBranchProtectionRuleRequest model = new DeleteBranchProtectionRuleRequest(); +public class InlineObject1Test { + private final InlineObject1 model = new InlineObject1(); /** - * Model tests for DeleteBranchProtectionRuleRequest + * Model tests for InlineObject1 */ @Test - public void testDeleteBranchProtectionRuleRequest() { - // TODO: test DeleteBranchProtectionRuleRequest + public void testInlineObject1() { + // TODO: test InlineObject1 } /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/LoginConfigTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/LoginConfigTest.java index c9548836a45..fbef3289ce9 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/LoginConfigTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/LoginConfigTest.java @@ -18,11 +18,14 @@ 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.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/LoginInformationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/LoginInformationTest.java index 65c30f080bc..a26e788c09d 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/LoginInformationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/LoginInformationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultSummaryTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultSummaryTest.java index 9058f87de01..621dc676bd0 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultSummaryTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultSummaryTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultTest.java index 0e858c96590..c7f0149faae 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/MergeResultTest.java @@ -19,9 +19,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.MergeResultSummary; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/MergeTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/MergeTest.java index bc72e68185a..fef980cda83 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/MergeTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/MergeTest.java @@ -18,11 +18,15 @@ 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.HashMap; +import java.util.List; import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationResponseTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationResponseTest.java index 50c5b6985dd..53748650bdc 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationResponseTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationResponseTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationTest.java index ae9c317d321..3bb274ac0bb 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/MetaRangeCreationTest.java @@ -19,11 +19,14 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.RangeMetadata; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/NextStepTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/NextStepTest.java index 4419c49e2b3..e9dee7102ed 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/NextStepTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/NextStepTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectCopyCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectCopyCreationTest.java index bc19c1091a2..c768bc29936 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectCopyCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectCopyCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorListTest.java index d76515d793b..ed5da93bcdb 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorListTest.java @@ -19,11 +19,14 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ObjectError; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorTest.java index a4bcbd4c393..bafab40d9a2 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectErrorTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStageCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStageCreationTest.java index c6e95df4fb5..ec1f87f8a4b 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStageCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStageCreationTest.java @@ -18,11 +18,15 @@ 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.HashMap; +import java.util.List; import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsListTest.java index 144698d4bea..61a9a3b2df1 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.ObjectStats; import io.lakefs.clients.api.model.Pagination; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsTest.java index 8a9e3e7dc2f..37109f9a6fc 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ObjectStatsTest.java @@ -18,11 +18,15 @@ 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.HashMap; +import java.util.List; import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffEntryTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffEntryTest.java index c9ae249516a..29026cad484 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffEntryTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffEntryTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffListTest.java index 9ce14a4fdb8..cc9e80d1a35 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/OtfDiffListTest.java @@ -19,11 +19,14 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.OtfDiffEntry; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/PaginationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/PaginationTest.java index b773f61e306..3a9f7a12e49 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/PaginationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/PaginationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/PathListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/PathListTest.java index 9364c4b98af..8bba504cdcd 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/PathListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/PathListTest.java @@ -18,11 +18,14 @@ 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.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyListTest.java index c63b1c16201..6e36ab81071 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.Policy; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyTest.java index 04389b9813e..40cff4a059a 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/PolicyTest.java @@ -19,11 +19,14 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Statement; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequestTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequestTest.java index a3d7bb426be..be90f1259fd 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequestTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedRequestTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponseTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponseTest.java index 1fbc3551cda..358fd72a8dc 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponseTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/PrepareGCUncommittedResponseTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RangeMetadataTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RangeMetadataTest.java index 4f6cf1d911e..05ae68f6aac 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RangeMetadataTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RangeMetadataTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RefListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RefListTest.java index 8ec03ac9410..1b31bf9fc93 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RefListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RefListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.Ref; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RefTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RefTest.java index 7dd61bf54e2..8dab9008c38 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RefTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RefTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RefsDumpTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RefsDumpTest.java index 401a937ef30..4fcd51e15e2 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RefsDumpTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RefsDumpTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryCreationTest.java index d224c3f6d06..a0d59e9ebea 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryListTest.java index e1ca4960245..3137928cd4e 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.Repository; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryTest.java index c8a653afd67..43102266fe0 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RepositoryTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/ResetCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/ResetCreationTest.java index 51bfb614408..6d79427d017 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/ResetCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/ResetCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/RevertCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/RevertCreationTest.java index 5e338a70549..774d8cca235 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/RevertCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/RevertCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/SetupStateTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/SetupStateTest.java index 3633a5d6cdb..c0a5b5cf41a 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/SetupStateTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/SetupStateTest.java @@ -19,9 +19,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.LoginConfig; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/SetupTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/SetupTest.java index 37a1cfa4c9e..21357f74183 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/SetupTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/SetupTest.java @@ -19,9 +19,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.AccessKeyCredentials; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StageRangeCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StageRangeCreationTest.java index 82538deaeba..3b773a99585 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StageRangeCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StageRangeCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StagingLocationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StagingLocationTest.java index e701a140d58..d0c484c2bd2 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StagingLocationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StagingLocationTest.java @@ -18,10 +18,13 @@ 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 org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StagingMetadataTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StagingMetadataTest.java index 1e58067354b..9b880f0feaf 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StagingMetadataTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StagingMetadataTest.java @@ -19,11 +19,15 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.StagingLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.HashMap; +import java.util.List; import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StatementTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StatementTest.java index 7b091ef1cba..774e0931ee9 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StatementTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StatementTest.java @@ -18,11 +18,14 @@ 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.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventTest.java index c2e229d4ac6..3e8ce547650 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventsListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventsListTest.java index c019cc1920a..b3b59d0fdff 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventsListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StatsEventsListTest.java @@ -19,11 +19,14 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.StatsEvent; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StorageConfigTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StorageConfigTest.java index 00a40b79e99..8cd00e3a669 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StorageConfigTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StorageConfigTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/StorageURITest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/StorageURITest.java index cbc5246261d..7a0092d034d 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/StorageURITest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/StorageURITest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/TagCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/TagCreationTest.java index 05354cca921..546819d9255 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/TagCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/TagCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/UnderlyingObjectPropertiesTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/UnderlyingObjectPropertiesTest.java index b7bab5ffdeb..2a26f9cd180 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/UnderlyingObjectPropertiesTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/UnderlyingObjectPropertiesTest.java @@ -18,10 +18,13 @@ 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 org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/UpdatePasswordByTokenTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/UpdatePasswordByTokenTest.java index b01dd46e6cd..d4537f35c5c 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/UpdatePasswordByTokenTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/UpdatePasswordByTokenTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/UserCreationTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/UserCreationTest.java index 650366e60d5..b5e01e4b235 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/UserCreationTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/UserCreationTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/UserListTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/UserListTest.java index 33f377785bc..7af5c9fa80f 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/UserListTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/UserListTest.java @@ -20,11 +20,14 @@ import com.google.gson.stream.JsonWriter; import io.lakefs.clients.api.model.Pagination; import io.lakefs.clients.api.model.User; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/UserTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/UserTest.java index 79443c7bc39..9ca002a8bb6 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/UserTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/UserTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/java/src/test/java/io/lakefs/clients/api/model/VersionConfigTest.java b/clients/java/src/test/java/io/lakefs/clients/api/model/VersionConfigTest.java index 33d7d2b1b4b..8db6af39f3b 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/model/VersionConfigTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/model/VersionConfigTest.java @@ -18,9 +18,12 @@ 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 org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; /** diff --git a/clients/python/.gitignore b/clients/python/.gitignore index a62e8aba43f..43995bd42fa 100644 --- a/clients/python/.gitignore +++ b/clients/python/.gitignore @@ -33,7 +33,6 @@ var/ # Installer logs pip-log.txt pip-delete-this-directory.txt -dev-requirements.txt.log # Unit test / coverage reports htmlcov/ diff --git a/clients/python/.openapi-generator/FILES b/clients/python/.openapi-generator/FILES index 4edd7ac97d6..2e139d79e49 100644 --- a/clients/python/.openapi-generator/FILES +++ b/clients/python/.openapi-generator/FILES @@ -1,383 +1,322 @@ .gitignore .travis.yml README.md -docs/apis/tags/ActionsApi.md -docs/apis/tags/AuthApi.md -docs/apis/tags/BranchesApi.md -docs/apis/tags/CommitsApi.md -docs/apis/tags/ConfigApi.md -docs/apis/tags/ExperimentalApi.md -docs/apis/tags/HealthCheckApi.md -docs/apis/tags/MetadataApi.md -docs/apis/tags/ModelImportApi.md -docs/apis/tags/ObjectsApi.md -docs/apis/tags/OtfDiffApi.md -docs/apis/tags/RefsApi.md -docs/apis/tags/RepositoriesApi.md -docs/apis/tags/RetentionApi.md -docs/apis/tags/StagingApi.md -docs/apis/tags/StatisticsApi.md -docs/apis/tags/TagsApi.md -docs/apis/tags/TemplatesApi.md -docs/models/AccessKeyCredentials.md -docs/models/ActionRun.md -docs/models/ActionRunList.md -docs/models/AuthCapabilities.md -docs/models/AuthenticationToken.md -docs/models/BranchCreation.md -docs/models/BranchProtectionRule.md -docs/models/CherryPickCreation.md -docs/models/CommPrefsInput.md -docs/models/Commit.md -docs/models/CommitCreation.md -docs/models/CommitList.md -docs/models/Credentials.md -docs/models/CredentialsList.md -docs/models/CredentialsWithSecret.md -docs/models/CurrentUser.md -docs/models/Diff.md -docs/models/DiffList.md -docs/models/Error.md -docs/models/FindMergeBaseResult.md -docs/models/ForgotPasswordRequest.md -docs/models/GarbageCollectionConfig.md -docs/models/GarbageCollectionPrepareRequest.md -docs/models/GarbageCollectionPrepareResponse.md -docs/models/GarbageCollectionRule.md -docs/models/GarbageCollectionRules.md -docs/models/Group.md -docs/models/GroupCreation.md -docs/models/GroupList.md -docs/models/HookRun.md -docs/models/HookRunList.md -docs/models/ImportPagination.md -docs/models/IngestRangeCreationResponse.md -docs/models/LoginConfig.md -docs/models/LoginInformation.md -docs/models/Merge.md -docs/models/MergeResult.md -docs/models/MergeResultSummary.md -docs/models/MetaRangeCreation.md -docs/models/MetaRangeCreationResponse.md -docs/models/NextStep.md -docs/models/ObjectCopyCreation.md -docs/models/ObjectError.md -docs/models/ObjectErrorList.md -docs/models/ObjectStageCreation.md -docs/models/ObjectStats.md -docs/models/ObjectStatsList.md -docs/models/ObjectUserMetadata.md -docs/models/OtfDiffEntry.md -docs/models/OtfDiffList.md -docs/models/Pagination.md -docs/models/PathList.md -docs/models/Policy.md -docs/models/PolicyList.md -docs/models/PrepareGCUncommittedRequest.md -docs/models/PrepareGCUncommittedResponse.md -docs/models/RangeMetadata.md -docs/models/Ref.md -docs/models/RefList.md -docs/models/RefsDump.md -docs/models/Repository.md -docs/models/RepositoryCreation.md -docs/models/RepositoryList.md -docs/models/ResetCreation.md -docs/models/RevertCreation.md -docs/models/Setup.md -docs/models/SetupState.md -docs/models/StageRangeCreation.md -docs/models/StagingLocation.md -docs/models/StagingMetadata.md -docs/models/Statement.md -docs/models/StatsEvent.md -docs/models/StatsEventsList.md -docs/models/StorageConfig.md -docs/models/StorageURI.md -docs/models/TagCreation.md -docs/models/UnderlyingObjectProperties.md -docs/models/UpdatePasswordByToken.md -docs/models/User.md -docs/models/UserCreation.md -docs/models/UserList.md -docs/models/VersionConfig.md +docs/AccessKeyCredentials.md +docs/ActionRun.md +docs/ActionRunList.md +docs/ActionsApi.md +docs/AuthApi.md +docs/AuthCapabilities.md +docs/AuthenticationToken.md +docs/BranchCreation.md +docs/BranchProtectionRule.md +docs/BranchesApi.md +docs/CherryPickCreation.md +docs/CommPrefsInput.md +docs/Commit.md +docs/CommitCreation.md +docs/CommitList.md +docs/CommitsApi.md +docs/ConfigApi.md +docs/Credentials.md +docs/CredentialsList.md +docs/CredentialsWithSecret.md +docs/CurrentUser.md +docs/Diff.md +docs/DiffList.md +docs/Error.md +docs/ExperimentalApi.md +docs/FindMergeBaseResult.md +docs/ForgotPasswordRequest.md +docs/GarbageCollectionConfig.md +docs/GarbageCollectionPrepareRequest.md +docs/GarbageCollectionPrepareResponse.md +docs/GarbageCollectionRule.md +docs/GarbageCollectionRules.md +docs/Group.md +docs/GroupCreation.md +docs/GroupList.md +docs/HealthCheckApi.md +docs/HookRun.md +docs/HookRunList.md +docs/ImportApi.md +docs/ImportPagination.md +docs/IngestRangeCreationResponse.md +docs/InlineObject1.md +docs/LoginConfig.md +docs/LoginInformation.md +docs/Merge.md +docs/MergeResult.md +docs/MergeResultSummary.md +docs/MetaRangeCreation.md +docs/MetaRangeCreationResponse.md +docs/MetadataApi.md +docs/NextStep.md +docs/ObjectCopyCreation.md +docs/ObjectError.md +docs/ObjectErrorList.md +docs/ObjectStageCreation.md +docs/ObjectStats.md +docs/ObjectStatsList.md +docs/ObjectUserMetadata.md +docs/ObjectsApi.md +docs/OtfDiffApi.md +docs/OtfDiffEntry.md +docs/OtfDiffList.md +docs/Pagination.md +docs/PathList.md +docs/Policy.md +docs/PolicyList.md +docs/PrepareGCUncommittedRequest.md +docs/PrepareGCUncommittedResponse.md +docs/RangeMetadata.md +docs/Ref.md +docs/RefList.md +docs/RefsApi.md +docs/RefsDump.md +docs/RepositoriesApi.md +docs/Repository.md +docs/RepositoryCreation.md +docs/RepositoryList.md +docs/ResetCreation.md +docs/RetentionApi.md +docs/RevertCreation.md +docs/Setup.md +docs/SetupState.md +docs/StageRangeCreation.md +docs/StagingApi.md +docs/StagingLocation.md +docs/StagingMetadata.md +docs/Statement.md +docs/StatisticsApi.md +docs/StatsEvent.md +docs/StatsEventsList.md +docs/StorageConfig.md +docs/StorageURI.md +docs/TagCreation.md +docs/TagsApi.md +docs/TemplatesApi.md +docs/UnderlyingObjectProperties.md +docs/UpdatePasswordByToken.md +docs/User.md +docs/UserCreation.md +docs/UserList.md +docs/VersionConfig.md lakefs_client/__init__.py +lakefs_client/api/__init__.py +lakefs_client/api/actions_api.py +lakefs_client/api/auth_api.py +lakefs_client/api/branches_api.py +lakefs_client/api/commits_api.py +lakefs_client/api/config_api.py +lakefs_client/api/experimental_api.py +lakefs_client/api/health_check_api.py +lakefs_client/api/import_api.py +lakefs_client/api/metadata_api.py +lakefs_client/api/objects_api.py +lakefs_client/api/otf_diff_api.py +lakefs_client/api/refs_api.py +lakefs_client/api/repositories_api.py +lakefs_client/api/retention_api.py +lakefs_client/api/staging_api.py +lakefs_client/api/statistics_api.py +lakefs_client/api/tags_api.py +lakefs_client/api/templates_api.py lakefs_client/api_client.py lakefs_client/apis/__init__.py -lakefs_client/apis/tags/actions_api.py -lakefs_client/apis/tags/auth_api.py -lakefs_client/apis/tags/branches_api.py -lakefs_client/apis/tags/commits_api.py -lakefs_client/apis/tags/config_api.py -lakefs_client/apis/tags/experimental_api.py -lakefs_client/apis/tags/health_check_api.py -lakefs_client/apis/tags/metadata_api.py -lakefs_client/apis/tags/model_import_api.py -lakefs_client/apis/tags/objects_api.py -lakefs_client/apis/tags/otf_diff_api.py -lakefs_client/apis/tags/refs_api.py -lakefs_client/apis/tags/repositories_api.py -lakefs_client/apis/tags/retention_api.py -lakefs_client/apis/tags/staging_api.py -lakefs_client/apis/tags/statistics_api.py -lakefs_client/apis/tags/tags_api.py -lakefs_client/apis/tags/templates_api.py lakefs_client/configuration.py lakefs_client/exceptions.py lakefs_client/model/__init__.py lakefs_client/model/access_key_credentials.py -lakefs_client/model/access_key_credentials.pyi lakefs_client/model/action_run.py -lakefs_client/model/action_run.pyi lakefs_client/model/action_run_list.py -lakefs_client/model/action_run_list.pyi lakefs_client/model/auth_capabilities.py -lakefs_client/model/auth_capabilities.pyi lakefs_client/model/authentication_token.py -lakefs_client/model/authentication_token.pyi lakefs_client/model/branch_creation.py -lakefs_client/model/branch_creation.pyi lakefs_client/model/branch_protection_rule.py -lakefs_client/model/branch_protection_rule.pyi lakefs_client/model/cherry_pick_creation.py -lakefs_client/model/cherry_pick_creation.pyi lakefs_client/model/comm_prefs_input.py -lakefs_client/model/comm_prefs_input.pyi lakefs_client/model/commit.py -lakefs_client/model/commit.pyi lakefs_client/model/commit_creation.py -lakefs_client/model/commit_creation.pyi lakefs_client/model/commit_list.py -lakefs_client/model/commit_list.pyi lakefs_client/model/credentials.py -lakefs_client/model/credentials.pyi lakefs_client/model/credentials_list.py -lakefs_client/model/credentials_list.pyi lakefs_client/model/credentials_with_secret.py -lakefs_client/model/credentials_with_secret.pyi lakefs_client/model/current_user.py -lakefs_client/model/current_user.pyi lakefs_client/model/diff.py -lakefs_client/model/diff.pyi lakefs_client/model/diff_list.py -lakefs_client/model/diff_list.pyi lakefs_client/model/error.py -lakefs_client/model/error.pyi lakefs_client/model/find_merge_base_result.py -lakefs_client/model/find_merge_base_result.pyi lakefs_client/model/forgot_password_request.py -lakefs_client/model/forgot_password_request.pyi lakefs_client/model/garbage_collection_config.py -lakefs_client/model/garbage_collection_config.pyi lakefs_client/model/garbage_collection_prepare_request.py -lakefs_client/model/garbage_collection_prepare_request.pyi lakefs_client/model/garbage_collection_prepare_response.py -lakefs_client/model/garbage_collection_prepare_response.pyi lakefs_client/model/garbage_collection_rule.py -lakefs_client/model/garbage_collection_rule.pyi lakefs_client/model/garbage_collection_rules.py -lakefs_client/model/garbage_collection_rules.pyi lakefs_client/model/group.py -lakefs_client/model/group.pyi lakefs_client/model/group_creation.py -lakefs_client/model/group_creation.pyi lakefs_client/model/group_list.py -lakefs_client/model/group_list.pyi lakefs_client/model/hook_run.py -lakefs_client/model/hook_run.pyi lakefs_client/model/hook_run_list.py -lakefs_client/model/hook_run_list.pyi lakefs_client/model/import_pagination.py -lakefs_client/model/import_pagination.pyi lakefs_client/model/ingest_range_creation_response.py -lakefs_client/model/ingest_range_creation_response.pyi +lakefs_client/model/inline_object1.py lakefs_client/model/login_config.py -lakefs_client/model/login_config.pyi lakefs_client/model/login_information.py -lakefs_client/model/login_information.pyi lakefs_client/model/merge.py -lakefs_client/model/merge.pyi lakefs_client/model/merge_result.py -lakefs_client/model/merge_result.pyi lakefs_client/model/merge_result_summary.py -lakefs_client/model/merge_result_summary.pyi lakefs_client/model/meta_range_creation.py -lakefs_client/model/meta_range_creation.pyi lakefs_client/model/meta_range_creation_response.py -lakefs_client/model/meta_range_creation_response.pyi lakefs_client/model/next_step.py -lakefs_client/model/next_step.pyi lakefs_client/model/object_copy_creation.py -lakefs_client/model/object_copy_creation.pyi lakefs_client/model/object_error.py -lakefs_client/model/object_error.pyi lakefs_client/model/object_error_list.py -lakefs_client/model/object_error_list.pyi lakefs_client/model/object_stage_creation.py -lakefs_client/model/object_stage_creation.pyi lakefs_client/model/object_stats.py -lakefs_client/model/object_stats.pyi lakefs_client/model/object_stats_list.py -lakefs_client/model/object_stats_list.pyi lakefs_client/model/object_user_metadata.py -lakefs_client/model/object_user_metadata.pyi lakefs_client/model/otf_diff_entry.py -lakefs_client/model/otf_diff_entry.pyi lakefs_client/model/otf_diff_list.py -lakefs_client/model/otf_diff_list.pyi lakefs_client/model/pagination.py -lakefs_client/model/pagination.pyi lakefs_client/model/path_list.py -lakefs_client/model/path_list.pyi lakefs_client/model/policy.py -lakefs_client/model/policy.pyi lakefs_client/model/policy_list.py -lakefs_client/model/policy_list.pyi lakefs_client/model/prepare_gc_uncommitted_request.py -lakefs_client/model/prepare_gc_uncommitted_request.pyi lakefs_client/model/prepare_gc_uncommitted_response.py -lakefs_client/model/prepare_gc_uncommitted_response.pyi lakefs_client/model/range_metadata.py -lakefs_client/model/range_metadata.pyi lakefs_client/model/ref.py -lakefs_client/model/ref.pyi lakefs_client/model/ref_list.py -lakefs_client/model/ref_list.pyi lakefs_client/model/refs_dump.py -lakefs_client/model/refs_dump.pyi lakefs_client/model/repository.py -lakefs_client/model/repository.pyi lakefs_client/model/repository_creation.py -lakefs_client/model/repository_creation.pyi lakefs_client/model/repository_list.py -lakefs_client/model/repository_list.pyi lakefs_client/model/reset_creation.py -lakefs_client/model/reset_creation.pyi lakefs_client/model/revert_creation.py -lakefs_client/model/revert_creation.pyi lakefs_client/model/setup.py -lakefs_client/model/setup.pyi lakefs_client/model/setup_state.py -lakefs_client/model/setup_state.pyi lakefs_client/model/stage_range_creation.py -lakefs_client/model/stage_range_creation.pyi lakefs_client/model/staging_location.py -lakefs_client/model/staging_location.pyi lakefs_client/model/staging_metadata.py -lakefs_client/model/staging_metadata.pyi lakefs_client/model/statement.py -lakefs_client/model/statement.pyi lakefs_client/model/stats_event.py -lakefs_client/model/stats_event.pyi lakefs_client/model/stats_events_list.py -lakefs_client/model/stats_events_list.pyi lakefs_client/model/storage_config.py -lakefs_client/model/storage_config.pyi lakefs_client/model/storage_uri.py -lakefs_client/model/storage_uri.pyi lakefs_client/model/tag_creation.py -lakefs_client/model/tag_creation.pyi lakefs_client/model/underlying_object_properties.py -lakefs_client/model/underlying_object_properties.pyi lakefs_client/model/update_password_by_token.py -lakefs_client/model/update_password_by_token.pyi lakefs_client/model/user.py -lakefs_client/model/user.pyi lakefs_client/model/user_creation.py -lakefs_client/model/user_creation.pyi lakefs_client/model/user_list.py -lakefs_client/model/user_list.pyi lakefs_client/model/version_config.py -lakefs_client/model/version_config.pyi +lakefs_client/model_utils.py lakefs_client/models/__init__.py lakefs_client/rest.py -lakefs_client/schemas.py requirements.txt setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_models/__init__.py -test/test_models/test_access_key_credentials.py -test/test_models/test_action_run.py -test/test_models/test_action_run_list.py -test/test_models/test_auth_capabilities.py -test/test_models/test_authentication_token.py -test/test_models/test_branch_creation.py -test/test_models/test_branch_protection_rule.py -test/test_models/test_cherry_pick_creation.py -test/test_models/test_comm_prefs_input.py -test/test_models/test_commit.py -test/test_models/test_commit_creation.py -test/test_models/test_commit_list.py -test/test_models/test_credentials.py -test/test_models/test_credentials_list.py -test/test_models/test_credentials_with_secret.py -test/test_models/test_current_user.py -test/test_models/test_diff.py -test/test_models/test_diff_list.py -test/test_models/test_error.py -test/test_models/test_find_merge_base_result.py -test/test_models/test_forgot_password_request.py -test/test_models/test_garbage_collection_config.py -test/test_models/test_garbage_collection_prepare_request.py -test/test_models/test_garbage_collection_prepare_response.py -test/test_models/test_garbage_collection_rule.py -test/test_models/test_garbage_collection_rules.py -test/test_models/test_group.py -test/test_models/test_group_creation.py -test/test_models/test_group_list.py -test/test_models/test_hook_run.py -test/test_models/test_hook_run_list.py -test/test_models/test_import_pagination.py -test/test_models/test_ingest_range_creation_response.py -test/test_models/test_login_config.py -test/test_models/test_login_information.py -test/test_models/test_merge.py -test/test_models/test_merge_result.py -test/test_models/test_merge_result_summary.py -test/test_models/test_meta_range_creation.py -test/test_models/test_meta_range_creation_response.py -test/test_models/test_next_step.py -test/test_models/test_object_copy_creation.py -test/test_models/test_object_error.py -test/test_models/test_object_error_list.py -test/test_models/test_object_stage_creation.py -test/test_models/test_object_stats.py -test/test_models/test_object_stats_list.py -test/test_models/test_object_user_metadata.py -test/test_models/test_otf_diff_entry.py -test/test_models/test_otf_diff_list.py -test/test_models/test_pagination.py -test/test_models/test_path_list.py -test/test_models/test_policy.py -test/test_models/test_policy_list.py -test/test_models/test_prepare_gc_uncommitted_request.py -test/test_models/test_prepare_gc_uncommitted_response.py -test/test_models/test_range_metadata.py -test/test_models/test_ref.py -test/test_models/test_ref_list.py -test/test_models/test_refs_dump.py -test/test_models/test_repository.py -test/test_models/test_repository_creation.py -test/test_models/test_repository_list.py -test/test_models/test_reset_creation.py -test/test_models/test_revert_creation.py -test/test_models/test_setup.py -test/test_models/test_setup_state.py -test/test_models/test_stage_range_creation.py -test/test_models/test_staging_location.py -test/test_models/test_staging_metadata.py -test/test_models/test_statement.py -test/test_models/test_stats_event.py -test/test_models/test_stats_events_list.py -test/test_models/test_storage_config.py -test/test_models/test_storage_uri.py -test/test_models/test_tag_creation.py -test/test_models/test_underlying_object_properties.py -test/test_models/test_update_password_by_token.py -test/test_models/test_user.py -test/test_models/test_user_creation.py -test/test_models/test_user_list.py -test/test_models/test_version_config.py +test/test_access_key_credentials.py +test/test_action_run.py +test/test_action_run_list.py +test/test_actions_api.py +test/test_auth_api.py +test/test_auth_capabilities.py +test/test_authentication_token.py +test/test_branch_creation.py +test/test_branch_protection_rule.py +test/test_branches_api.py +test/test_cherry_pick_creation.py +test/test_comm_prefs_input.py +test/test_commit.py +test/test_commit_creation.py +test/test_commit_list.py +test/test_commits_api.py +test/test_config_api.py +test/test_credentials.py +test/test_credentials_list.py +test/test_credentials_with_secret.py +test/test_current_user.py +test/test_diff.py +test/test_diff_list.py +test/test_error.py +test/test_experimental_api.py +test/test_find_merge_base_result.py +test/test_forgot_password_request.py +test/test_garbage_collection_config.py +test/test_garbage_collection_prepare_request.py +test/test_garbage_collection_prepare_response.py +test/test_garbage_collection_rule.py +test/test_garbage_collection_rules.py +test/test_group.py +test/test_group_creation.py +test/test_group_list.py +test/test_health_check_api.py +test/test_hook_run.py +test/test_hook_run_list.py +test/test_import_api.py +test/test_import_pagination.py +test/test_ingest_range_creation_response.py +test/test_inline_object1.py +test/test_login_config.py +test/test_login_information.py +test/test_merge.py +test/test_merge_result.py +test/test_merge_result_summary.py +test/test_meta_range_creation.py +test/test_meta_range_creation_response.py +test/test_metadata_api.py +test/test_next_step.py +test/test_object_copy_creation.py +test/test_object_error.py +test/test_object_error_list.py +test/test_object_stage_creation.py +test/test_object_stats.py +test/test_object_stats_list.py +test/test_object_user_metadata.py +test/test_objects_api.py +test/test_otf_diff_api.py +test/test_otf_diff_entry.py +test/test_otf_diff_list.py +test/test_pagination.py +test/test_path_list.py +test/test_policy.py +test/test_policy_list.py +test/test_prepare_gc_uncommitted_request.py +test/test_prepare_gc_uncommitted_response.py +test/test_range_metadata.py +test/test_ref.py +test/test_ref_list.py +test/test_refs_api.py +test/test_refs_dump.py +test/test_repositories_api.py +test/test_repository.py +test/test_repository_creation.py +test/test_repository_list.py +test/test_reset_creation.py +test/test_retention_api.py +test/test_revert_creation.py +test/test_setup.py +test/test_setup_state.py +test/test_stage_range_creation.py +test/test_staging_api.py +test/test_staging_location.py +test/test_staging_metadata.py +test/test_statement.py +test/test_statistics_api.py +test/test_stats_event.py +test/test_stats_events_list.py +test/test_storage_config.py +test/test_storage_uri.py +test/test_tag_creation.py +test/test_tags_api.py +test/test_templates_api.py +test/test_underlying_object_properties.py +test/test_update_password_by_token.py +test/test_user.py +test/test_user_creation.py +test/test_user_list.py +test/test_version_config.py tox.ini diff --git a/clients/python/.openapi-generator/VERSION b/clients/python/.openapi-generator/VERSION index c0be8a7992a..e230c8396d1 100644 --- a/clients/python/.openapi-generator/VERSION +++ b/clients/python/.openapi-generator/VERSION @@ -1 +1 @@ -6.4.0 \ No newline at end of file +5.3.0 \ No newline at end of file diff --git a/clients/python/.travis.yml b/clients/python/.travis.yml index 862899ab112..ba7fcb1fd2c 100644 --- a/clients/python/.travis.yml +++ b/clients/python/.travis.yml @@ -1,10 +1,10 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.5" - "3.6" - "3.7" - "3.8" + - "3.9" # command to install dependencies install: - "pip install -r requirements.txt" diff --git a/clients/python/README.md b/clients/python/README.md index 7110a406226..23c36cd0d4a 100644 --- a/clients/python/README.md +++ b/clients/python/README.md @@ -9,98 +9,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: ## Requirements. -Python >=3.7 - -## Migration from other generators like python and python-legacy - -### Changes -1. This generator uses spec case for all (object) property names and parameter names. - - So if the spec has a property name like camelCase, it will use camelCase rather than camel_case - - So you will need to update how you input and read properties to use spec case -2. Endpoint parameters are stored in dictionaries to prevent collisions (explanation below) - - So you will need to update how you pass data in to endpoints -3. Endpoint responses now include the original response, the deserialized response body, and (todo)the deserialized headers - - So you will need to update your code to use response.body to access deserialized data -4. All validated data is instantiated in an instance that subclasses all validated Schema classes and Decimal/str/list/tuple/frozendict/NoneClass/BoolClass/bytes/io.FileIO - - This means that you can use isinstance to check if a payload validated against a schema class - - This means that no data will be of type None/True/False - - ingested None will subclass NoneClass - - ingested True will subclass BoolClass - - ingested False will subclass BoolClass - - So if you need to check is True/False/None, instead use instance.is_true_oapg()/.is_false_oapg()/.is_none_oapg() -5. All validated class instances are immutable except for ones based on io.File - - This is because if properties were changed after validation, that validation would no longer apply - - So no changing values or property values after a class has been instantiated -6. String + Number types with formats - - String type data is stored as a string and if you need to access types based on its format like date, - date-time, uuid, number etc then you will need to use accessor functions on the instance - - type string + format: See .as_date_oapg, .as_datetime_oapg, .as_decimal_oapg, .as_uuid_oapg - - type number + format: See .as_float_oapg, .as_int_oapg - - this was done because openapi/json-schema defines constraints. string data may be type string with no format - keyword in one schema, and include a format constraint in another schema - - So if you need to access a string format based type, use as_date_oapg/as_datetime_oapg/as_decimal_oapg/as_uuid_oapg - - So if you need to access a number format based type, use as_int_oapg/as_float_oapg -7. Property access on AnyType(type unset) or object(dict) schemas - - Only required keys with valid python names are properties like .someProp and have type hints - - All optional keys may not exist, so properties are not defined for them - - One can access optional values with dict_instance['optionalProp'] and KeyError will be raised if it does not exist - - Use get_item_oapg if you need a way to always get a value whether or not the key exists - - If the key does not exist, schemas.unset is returned from calling dict_instance.get_item_oapg('optionalProp') - - All required and optional keys have type hints for this method, and @typing.overload is used - - A type hint is also generated for additionalProperties accessed using this method - - So you will need to update you code to use some_instance['optionalProp'] to access optional property - and additionalProperty values -8. The location of the api classes has changed - - Api classes are located in your_package.apis.tags.some_api - - This change was made to eliminate redundant code generation - - Legacy generators generated the same endpoint twice if it had > 1 tag on it - - This generator defines an endpoint in one class, then inherits that class to generate - apis by tags and by paths - - This change reduces code and allows quicker run time if you use the path apis - - path apis are at your_package.apis.paths.some_path - - Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api - - So you will need to update your import paths to the api classes - -### Why are Oapg and _oapg used in class and method names? -Classes can have arbitrarily named properties set on them -Endpoints can have arbitrary operationId method names set -For those reasons, I use the prefix Oapg and _oapg to greatly reduce the likelihood of collisions -on protected + public classes/methods. -oapg stands for OpenApi Python Generator. - -### Object property spec case -This was done because when payloads are ingested, they can be validated against N number of schemas. -If the input signature used a different property name then that has mutated the payload. -So SchemaA and SchemaB must both see the camelCase spec named variable. -Also it is possible to send in two properties, named camelCase and camel_case in the same payload. -That use case should be support so spec case is used. - -### Parameter spec case -Parameters can be included in different locations including: -- query -- path -- header -- cookie - -Any of those parameters could use the same parameter names, so if every parameter -was included as an endpoint parameter in a function signature, they would collide. -For that reason, each of those inputs have been separated out into separate typed dictionaries: -- query_params -- path_params -- header_params -- cookie_params - -So when updating your code, you will need to pass endpoint parameters in using those -dictionaries. - -### Endpoint responses -Endpoint responses have been enriched to now include more information. -Any response reom an endpoint will now include the following properties: -response: urllib3.HTTPResponse -body: typing.Union[Unset, Schema] -headers: typing.Union[Unset, TODO] -Note: response header deserialization has not yet been added - +Python >= 3.6 ## Installation & Usage ### pip install @@ -140,15 +49,15 @@ Please follow the [installation procedure](#installation--usage) and then run th import time import lakefs_client from pprint import pprint -from lakefs_client.apis.tags import actions_api +from lakefs_client.api import actions_api from lakefs_client.model.action_run import ActionRun from lakefs_client.model.action_run_list import ActionRunList from lakefs_client.model.error import Error from lakefs_client.model.hook_run_list import HookRunList -# Defining the host is optional and defaults to /api/v1 +# Defining the host is optional and defaults to http://localhost/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = lakefs_client.Configuration( - host = "/api/v1" + host = "http://localhost/api/v1" ) # The client must configure the authentication and authorization parameters @@ -168,6 +77,11 @@ configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['cookie_auth'] = 'Bearer' +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + # Configure API key authorization: oidc_auth configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' @@ -180,10 +94,6 @@ configuration.api_key['saml_auth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['saml_auth'] = 'Bearer' -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) # Enter a context with an instance of the API client with lakefs_client.ApiClient(configuration) as api_client: @@ -194,7 +104,7 @@ run_id = "run_id_example" # str | try: # get a run - api_response = api_instance.get_run(repositoryrun_id) + api_response = api_instance.get_run(repository, run_id) pprint(api_response) except lakefs_client.ApiException as e: print("Exception when calling ActionsApi->get_run: %s\n" % e) @@ -202,192 +112,195 @@ run_id = "run_id_example" # str | ## Documentation for API Endpoints -All URIs are relative to */api/v1* +All URIs are relative to *http://localhost/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ActionsApi* | [**get_run**](docs/apis/tags/ActionsApi.md#get_run) | **get** /repositories/{repository}/actions/runs/{run_id} | get a run -*ActionsApi* | [**get_run_hook_output**](docs/apis/tags/ActionsApi.md#get_run_hook_output) | **get** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output -*ActionsApi* | [**list_repository_runs**](docs/apis/tags/ActionsApi.md#list_repository_runs) | **get** /repositories/{repository}/actions/runs | list runs -*ActionsApi* | [**list_run_hooks**](docs/apis/tags/ActionsApi.md#list_run_hooks) | **get** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks -*AuthApi* | [**add_group_membership**](docs/apis/tags/AuthApi.md#add_group_membership) | **put** /auth/groups/{groupId}/members/{userId} | add group membership -*AuthApi* | [**attach_policy_to_group**](docs/apis/tags/AuthApi.md#attach_policy_to_group) | **put** /auth/groups/{groupId}/policies/{policyId} | attach policy to group -*AuthApi* | [**attach_policy_to_user**](docs/apis/tags/AuthApi.md#attach_policy_to_user) | **put** /auth/users/{userId}/policies/{policyId} | attach policy to user -*AuthApi* | [**create_credentials**](docs/apis/tags/AuthApi.md#create_credentials) | **post** /auth/users/{userId}/credentials | create credentials -*AuthApi* | [**create_group**](docs/apis/tags/AuthApi.md#create_group) | **post** /auth/groups | create group -*AuthApi* | [**create_policy**](docs/apis/tags/AuthApi.md#create_policy) | **post** /auth/policies | create policy -*AuthApi* | [**create_user**](docs/apis/tags/AuthApi.md#create_user) | **post** /auth/users | create user -*AuthApi* | [**delete_credentials**](docs/apis/tags/AuthApi.md#delete_credentials) | **delete** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials -*AuthApi* | [**delete_group**](docs/apis/tags/AuthApi.md#delete_group) | **delete** /auth/groups/{groupId} | delete group -*AuthApi* | [**delete_group_membership**](docs/apis/tags/AuthApi.md#delete_group_membership) | **delete** /auth/groups/{groupId}/members/{userId} | delete group membership -*AuthApi* | [**delete_policy**](docs/apis/tags/AuthApi.md#delete_policy) | **delete** /auth/policies/{policyId} | delete policy -*AuthApi* | [**delete_user**](docs/apis/tags/AuthApi.md#delete_user) | **delete** /auth/users/{userId} | delete user -*AuthApi* | [**detach_policy_from_group**](docs/apis/tags/AuthApi.md#detach_policy_from_group) | **delete** /auth/groups/{groupId}/policies/{policyId} | detach policy from group -*AuthApi* | [**detach_policy_from_user**](docs/apis/tags/AuthApi.md#detach_policy_from_user) | **delete** /auth/users/{userId}/policies/{policyId} | detach policy from user -*AuthApi* | [**forgot_password**](docs/apis/tags/AuthApi.md#forgot_password) | **post** /auth/password/forgot | forgot password request initiates the password reset process -*AuthApi* | [**get_auth_capabilities**](docs/apis/tags/AuthApi.md#get_auth_capabilities) | **get** /auth/capabilities | list authentication capabilities supported -*AuthApi* | [**get_credentials**](docs/apis/tags/AuthApi.md#get_credentials) | **get** /auth/users/{userId}/credentials/{accessKeyId} | get credentials -*AuthApi* | [**get_current_user**](docs/apis/tags/AuthApi.md#get_current_user) | **get** /user | get current user -*AuthApi* | [**get_group**](docs/apis/tags/AuthApi.md#get_group) | **get** /auth/groups/{groupId} | get group -*AuthApi* | [**get_policy**](docs/apis/tags/AuthApi.md#get_policy) | **get** /auth/policies/{policyId} | get policy -*AuthApi* | [**get_user**](docs/apis/tags/AuthApi.md#get_user) | **get** /auth/users/{userId} | get user -*AuthApi* | [**list_group_members**](docs/apis/tags/AuthApi.md#list_group_members) | **get** /auth/groups/{groupId}/members | list group members -*AuthApi* | [**list_group_policies**](docs/apis/tags/AuthApi.md#list_group_policies) | **get** /auth/groups/{groupId}/policies | list group policies -*AuthApi* | [**list_groups**](docs/apis/tags/AuthApi.md#list_groups) | **get** /auth/groups | list groups -*AuthApi* | [**list_policies**](docs/apis/tags/AuthApi.md#list_policies) | **get** /auth/policies | list policies -*AuthApi* | [**list_user_credentials**](docs/apis/tags/AuthApi.md#list_user_credentials) | **get** /auth/users/{userId}/credentials | list user credentials -*AuthApi* | [**list_user_groups**](docs/apis/tags/AuthApi.md#list_user_groups) | **get** /auth/users/{userId}/groups | list user groups -*AuthApi* | [**list_user_policies**](docs/apis/tags/AuthApi.md#list_user_policies) | **get** /auth/users/{userId}/policies | list user policies -*AuthApi* | [**list_users**](docs/apis/tags/AuthApi.md#list_users) | **get** /auth/users | list users -*AuthApi* | [**login**](docs/apis/tags/AuthApi.md#login) | **post** /auth/login | perform a login -*AuthApi* | [**update_password**](docs/apis/tags/AuthApi.md#update_password) | **post** /auth/password | Update user password by reset_password token -*AuthApi* | [**update_policy**](docs/apis/tags/AuthApi.md#update_policy) | **put** /auth/policies/{policyId} | update policy -*BranchesApi* | [**cherry_pick**](docs/apis/tags/BranchesApi.md#cherry_pick) | **post** /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch -*BranchesApi* | [**create_branch**](docs/apis/tags/BranchesApi.md#create_branch) | **post** /repositories/{repository}/branches | create branch -*BranchesApi* | [**delete_branch**](docs/apis/tags/BranchesApi.md#delete_branch) | **delete** /repositories/{repository}/branches/{branch} | delete branch -*BranchesApi* | [**diff_branch**](docs/apis/tags/BranchesApi.md#diff_branch) | **get** /repositories/{repository}/branches/{branch}/diff | diff branch -*BranchesApi* | [**get_branch**](docs/apis/tags/BranchesApi.md#get_branch) | **get** /repositories/{repository}/branches/{branch} | get branch -*BranchesApi* | [**list_branches**](docs/apis/tags/BranchesApi.md#list_branches) | **get** /repositories/{repository}/branches | list branches -*BranchesApi* | [**reset_branch**](docs/apis/tags/BranchesApi.md#reset_branch) | **put** /repositories/{repository}/branches/{branch} | reset branch -*BranchesApi* | [**revert_branch**](docs/apis/tags/BranchesApi.md#revert_branch) | **post** /repositories/{repository}/branches/{branch}/revert | revert -*CommitsApi* | [**commit**](docs/apis/tags/CommitsApi.md#commit) | **post** /repositories/{repository}/branches/{branch}/commits | create commit -*CommitsApi* | [**get_commit**](docs/apis/tags/CommitsApi.md#get_commit) | **get** /repositories/{repository}/commits/{commitId} | get commit -*CommitsApi* | [**log_branch_commits**](docs/apis/tags/CommitsApi.md#log_branch_commits) | **get** /repositories/{repository}/branches/{branch}/commits | get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref -*ConfigApi* | [**get_garbage_collection_config**](docs/apis/tags/ConfigApi.md#get_garbage_collection_config) | **get** /config/garbage-collection | -*ConfigApi* | [**get_lake_fs_version**](docs/apis/tags/ConfigApi.md#get_lake_fs_version) | **get** /config/version | -*ConfigApi* | [**get_setup_state**](docs/apis/tags/ConfigApi.md#get_setup_state) | **get** /setup_lakefs | check if the lakeFS installation is already set up -*ConfigApi* | [**get_storage_config**](docs/apis/tags/ConfigApi.md#get_storage_config) | **get** /config/storage | -*ConfigApi* | [**setup**](docs/apis/tags/ConfigApi.md#setup) | **post** /setup_lakefs | setup lakeFS and create a first user -*ConfigApi* | [**setup_comm_prefs**](docs/apis/tags/ConfigApi.md#setup_comm_prefs) | **post** /setup_comm_prefs | setup communications preferences -*ExperimentalApi* | [**otf_diff**](docs/apis/tags/ExperimentalApi.md#otf_diff) | **get** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff -*HealthCheckApi* | [**health_check**](docs/apis/tags/HealthCheckApi.md#health_check) | **get** /healthcheck | -*ModelImportApi* | [**create_meta_range**](docs/apis/tags/ModelImportApi.md#create_meta_range) | **post** /repositories/{repository}/branches/metaranges | create a lakeFS metarange file from the given ranges -*ModelImportApi* | [**ingest_range**](docs/apis/tags/ModelImportApi.md#ingest_range) | **post** /repositories/{repository}/branches/ranges | create a lakeFS range file from the source uri -*MetadataApi* | [**create_symlink_file**](docs/apis/tags/MetadataApi.md#create_symlink_file) | **post** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory -*MetadataApi* | [**get_meta_range**](docs/apis/tags/MetadataApi.md#get_meta_range) | **get** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file -*MetadataApi* | [**get_range**](docs/apis/tags/MetadataApi.md#get_range) | **get** /repositories/{repository}/metadata/range/{range} | return URI to a range file -*ObjectsApi* | [**copy_object**](docs/apis/tags/ObjectsApi.md#copy_object) | **post** /repositories/{repository}/branches/{branch}/objects/copy | create a copy of an object -*ObjectsApi* | [**delete_object**](docs/apis/tags/ObjectsApi.md#delete_object) | **delete** /repositories/{repository}/branches/{branch}/objects | delete object. Missing objects will not return a NotFound error. -*ObjectsApi* | [**delete_objects**](docs/apis/tags/ObjectsApi.md#delete_objects) | **post** /repositories/{repository}/branches/{branch}/objects/delete | delete objects. Missing objects will not return a NotFound error. -*ObjectsApi* | [**get_object**](docs/apis/tags/ObjectsApi.md#get_object) | **get** /repositories/{repository}/refs/{ref}/objects | get object content -*ObjectsApi* | [**get_underlying_properties**](docs/apis/tags/ObjectsApi.md#get_underlying_properties) | **get** /repositories/{repository}/refs/{ref}/objects/underlyingProperties | get object properties on underlying storage -*ObjectsApi* | [**head_object**](docs/apis/tags/ObjectsApi.md#head_object) | **head** /repositories/{repository}/refs/{ref}/objects | check if object exists -*ObjectsApi* | [**list_objects**](docs/apis/tags/ObjectsApi.md#list_objects) | **get** /repositories/{repository}/refs/{ref}/objects/ls | list objects under a given prefix -*ObjectsApi* | [**stage_object**](docs/apis/tags/ObjectsApi.md#stage_object) | **put** /repositories/{repository}/branches/{branch}/objects | stage an object's metadata for the given branch -*ObjectsApi* | [**stat_object**](docs/apis/tags/ObjectsApi.md#stat_object) | **get** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata -*ObjectsApi* | [**upload_object**](docs/apis/tags/ObjectsApi.md#upload_object) | **post** /repositories/{repository}/branches/{branch}/objects | -*OtfDiffApi* | [**otf_diff**](docs/apis/tags/OtfDiffApi.md#otf_diff) | **get** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff -*RefsApi* | [**diff_refs**](docs/apis/tags/RefsApi.md#diff_refs) | **get** /repositories/{repository}/refs/{leftRef}/diff/{rightRef} | diff references -*RefsApi* | [**dump_refs**](docs/apis/tags/RefsApi.md#dump_refs) | **put** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store -*RefsApi* | [**find_merge_base**](docs/apis/tags/RefsApi.md#find_merge_base) | **get** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | find the merge base for 2 references -*RefsApi* | [**log_commits**](docs/apis/tags/RefsApi.md#log_commits) | **get** /repositories/{repository}/refs/{ref}/commits | get commit log from ref. If both objects and prefixes are empty, return all commits. -*RefsApi* | [**merge_into_branch**](docs/apis/tags/RefsApi.md#merge_into_branch) | **post** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | merge references -*RefsApi* | [**restore_refs**](docs/apis/tags/RefsApi.md#restore_refs) | **put** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store -*RepositoriesApi* | [**create_branch_protection_rule**](docs/apis/tags/RepositoriesApi.md#create_branch_protection_rule) | **post** /repositories/{repository}/branch_protection | -*RepositoriesApi* | [**create_repository**](docs/apis/tags/RepositoriesApi.md#create_repository) | **post** /repositories | create repository -*RepositoriesApi* | [**delete_branch_protection_rule**](docs/apis/tags/RepositoriesApi.md#delete_branch_protection_rule) | **delete** /repositories/{repository}/branch_protection | -*RepositoriesApi* | [**delete_repository**](docs/apis/tags/RepositoriesApi.md#delete_repository) | **delete** /repositories/{repository} | delete repository -*RepositoriesApi* | [**get_branch_protection_rules**](docs/apis/tags/RepositoriesApi.md#get_branch_protection_rules) | **get** /repositories/{repository}/branch_protection | get branch protection rules -*RepositoriesApi* | [**get_repository**](docs/apis/tags/RepositoriesApi.md#get_repository) | **get** /repositories/{repository} | get repository -*RepositoriesApi* | [**list_repositories**](docs/apis/tags/RepositoriesApi.md#list_repositories) | **get** /repositories | list repositories -*RetentionApi* | [**delete_garbage_collection_rules**](docs/apis/tags/RetentionApi.md#delete_garbage_collection_rules) | **delete** /repositories/{repository}/gc/rules | -*RetentionApi* | [**get_garbage_collection_rules**](docs/apis/tags/RetentionApi.md#get_garbage_collection_rules) | **get** /repositories/{repository}/gc/rules | -*RetentionApi* | [**prepare_garbage_collection_commits**](docs/apis/tags/RetentionApi.md#prepare_garbage_collection_commits) | **post** /repositories/{repository}/gc/prepare_commits | save lists of active and expired commits for garbage collection -*RetentionApi* | [**prepare_garbage_collection_uncommitted**](docs/apis/tags/RetentionApi.md#prepare_garbage_collection_uncommitted) | **post** /repositories/{repository}/gc/prepare_uncommited | save repository uncommitted metadata for garbage collection -*RetentionApi* | [**set_garbage_collection_rules**](docs/apis/tags/RetentionApi.md#set_garbage_collection_rules) | **post** /repositories/{repository}/gc/rules | -*StagingApi* | [**get_physical_address**](docs/apis/tags/StagingApi.md#get_physical_address) | **get** /repositories/{repository}/branches/{branch}/staging/backing | get a physical address and a return token to write object to underlying storage -*StagingApi* | [**link_physical_address**](docs/apis/tags/StagingApi.md#link_physical_address) | **put** /repositories/{repository}/branches/{branch}/staging/backing | associate staging on this physical address with a path -*StatisticsApi* | [**post_stats_events**](docs/apis/tags/StatisticsApi.md#post_stats_events) | **post** /statistics | post stats events, this endpoint is meant for internal use only -*TagsApi* | [**create_tag**](docs/apis/tags/TagsApi.md#create_tag) | **post** /repositories/{repository}/tags | create tag -*TagsApi* | [**delete_tag**](docs/apis/tags/TagsApi.md#delete_tag) | **delete** /repositories/{repository}/tags/{tag} | delete tag -*TagsApi* | [**get_tag**](docs/apis/tags/TagsApi.md#get_tag) | **get** /repositories/{repository}/tags/{tag} | get tag -*TagsApi* | [**list_tags**](docs/apis/tags/TagsApi.md#list_tags) | **get** /repositories/{repository}/tags | list tags -*TemplatesApi* | [**expand_template**](docs/apis/tags/TemplatesApi.md#expand_template) | **get** /templates/{template_location} | +*ActionsApi* | [**get_run**](docs/ActionsApi.md#get_run) | **GET** /repositories/{repository}/actions/runs/{run_id} | get a run +*ActionsApi* | [**get_run_hook_output**](docs/ActionsApi.md#get_run_hook_output) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output +*ActionsApi* | [**list_repository_runs**](docs/ActionsApi.md#list_repository_runs) | **GET** /repositories/{repository}/actions/runs | list runs +*ActionsApi* | [**list_run_hooks**](docs/ActionsApi.md#list_run_hooks) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks +*AuthApi* | [**add_group_membership**](docs/AuthApi.md#add_group_membership) | **PUT** /auth/groups/{groupId}/members/{userId} | add group membership +*AuthApi* | [**attach_policy_to_group**](docs/AuthApi.md#attach_policy_to_group) | **PUT** /auth/groups/{groupId}/policies/{policyId} | attach policy to group +*AuthApi* | [**attach_policy_to_user**](docs/AuthApi.md#attach_policy_to_user) | **PUT** /auth/users/{userId}/policies/{policyId} | attach policy to user +*AuthApi* | [**create_credentials**](docs/AuthApi.md#create_credentials) | **POST** /auth/users/{userId}/credentials | create credentials +*AuthApi* | [**create_group**](docs/AuthApi.md#create_group) | **POST** /auth/groups | create group +*AuthApi* | [**create_policy**](docs/AuthApi.md#create_policy) | **POST** /auth/policies | create policy +*AuthApi* | [**create_user**](docs/AuthApi.md#create_user) | **POST** /auth/users | create user +*AuthApi* | [**delete_credentials**](docs/AuthApi.md#delete_credentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials +*AuthApi* | [**delete_group**](docs/AuthApi.md#delete_group) | **DELETE** /auth/groups/{groupId} | delete group +*AuthApi* | [**delete_group_membership**](docs/AuthApi.md#delete_group_membership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership +*AuthApi* | [**delete_policy**](docs/AuthApi.md#delete_policy) | **DELETE** /auth/policies/{policyId} | delete policy +*AuthApi* | [**delete_user**](docs/AuthApi.md#delete_user) | **DELETE** /auth/users/{userId} | delete user +*AuthApi* | [**detach_policy_from_group**](docs/AuthApi.md#detach_policy_from_group) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group +*AuthApi* | [**detach_policy_from_user**](docs/AuthApi.md#detach_policy_from_user) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user +*AuthApi* | [**forgot_password**](docs/AuthApi.md#forgot_password) | **POST** /auth/password/forgot | forgot password request initiates the password reset process +*AuthApi* | [**get_auth_capabilities**](docs/AuthApi.md#get_auth_capabilities) | **GET** /auth/capabilities | list authentication capabilities supported +*AuthApi* | [**get_credentials**](docs/AuthApi.md#get_credentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials +*AuthApi* | [**get_current_user**](docs/AuthApi.md#get_current_user) | **GET** /user | get current user +*AuthApi* | [**get_group**](docs/AuthApi.md#get_group) | **GET** /auth/groups/{groupId} | get group +*AuthApi* | [**get_policy**](docs/AuthApi.md#get_policy) | **GET** /auth/policies/{policyId} | get policy +*AuthApi* | [**get_user**](docs/AuthApi.md#get_user) | **GET** /auth/users/{userId} | get user +*AuthApi* | [**list_group_members**](docs/AuthApi.md#list_group_members) | **GET** /auth/groups/{groupId}/members | list group members +*AuthApi* | [**list_group_policies**](docs/AuthApi.md#list_group_policies) | **GET** /auth/groups/{groupId}/policies | list group policies +*AuthApi* | [**list_groups**](docs/AuthApi.md#list_groups) | **GET** /auth/groups | list groups +*AuthApi* | [**list_policies**](docs/AuthApi.md#list_policies) | **GET** /auth/policies | list policies +*AuthApi* | [**list_user_credentials**](docs/AuthApi.md#list_user_credentials) | **GET** /auth/users/{userId}/credentials | list user credentials +*AuthApi* | [**list_user_groups**](docs/AuthApi.md#list_user_groups) | **GET** /auth/users/{userId}/groups | list user groups +*AuthApi* | [**list_user_policies**](docs/AuthApi.md#list_user_policies) | **GET** /auth/users/{userId}/policies | list user policies +*AuthApi* | [**list_users**](docs/AuthApi.md#list_users) | **GET** /auth/users | list users +*AuthApi* | [**login**](docs/AuthApi.md#login) | **POST** /auth/login | perform a login +*AuthApi* | [**update_password**](docs/AuthApi.md#update_password) | **POST** /auth/password | Update user password by reset_password token +*AuthApi* | [**update_policy**](docs/AuthApi.md#update_policy) | **PUT** /auth/policies/{policyId} | update policy +*BranchesApi* | [**cherry_pick**](docs/BranchesApi.md#cherry_pick) | **POST** /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch +*BranchesApi* | [**create_branch**](docs/BranchesApi.md#create_branch) | **POST** /repositories/{repository}/branches | create branch +*BranchesApi* | [**delete_branch**](docs/BranchesApi.md#delete_branch) | **DELETE** /repositories/{repository}/branches/{branch} | delete branch +*BranchesApi* | [**diff_branch**](docs/BranchesApi.md#diff_branch) | **GET** /repositories/{repository}/branches/{branch}/diff | diff branch +*BranchesApi* | [**get_branch**](docs/BranchesApi.md#get_branch) | **GET** /repositories/{repository}/branches/{branch} | get branch +*BranchesApi* | [**list_branches**](docs/BranchesApi.md#list_branches) | **GET** /repositories/{repository}/branches | list branches +*BranchesApi* | [**reset_branch**](docs/BranchesApi.md#reset_branch) | **PUT** /repositories/{repository}/branches/{branch} | reset branch +*BranchesApi* | [**revert_branch**](docs/BranchesApi.md#revert_branch) | **POST** /repositories/{repository}/branches/{branch}/revert | revert +*CommitsApi* | [**commit**](docs/CommitsApi.md#commit) | **POST** /repositories/{repository}/branches/{branch}/commits | create commit +*CommitsApi* | [**get_commit**](docs/CommitsApi.md#get_commit) | **GET** /repositories/{repository}/commits/{commitId} | get commit +*CommitsApi* | [**log_branch_commits**](docs/CommitsApi.md#log_branch_commits) | **GET** /repositories/{repository}/branches/{branch}/commits | get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref +*ConfigApi* | [**get_garbage_collection_config**](docs/ConfigApi.md#get_garbage_collection_config) | **GET** /config/garbage-collection | +*ConfigApi* | [**get_lake_fs_version**](docs/ConfigApi.md#get_lake_fs_version) | **GET** /config/version | +*ConfigApi* | [**get_setup_state**](docs/ConfigApi.md#get_setup_state) | **GET** /setup_lakefs | check if the lakeFS installation is already set up +*ConfigApi* | [**get_storage_config**](docs/ConfigApi.md#get_storage_config) | **GET** /config/storage | +*ConfigApi* | [**setup**](docs/ConfigApi.md#setup) | **POST** /setup_lakefs | setup lakeFS and create a first user +*ConfigApi* | [**setup_comm_prefs**](docs/ConfigApi.md#setup_comm_prefs) | **POST** /setup_comm_prefs | setup communications preferences +*ExperimentalApi* | [**otf_diff**](docs/ExperimentalApi.md#otf_diff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff +*HealthCheckApi* | [**health_check**](docs/HealthCheckApi.md#health_check) | **GET** /healthcheck | +*ImportApi* | [**create_meta_range**](docs/ImportApi.md#create_meta_range) | **POST** /repositories/{repository}/branches/metaranges | create a lakeFS metarange file from the given ranges +*ImportApi* | [**ingest_range**](docs/ImportApi.md#ingest_range) | **POST** /repositories/{repository}/branches/ranges | create a lakeFS range file from the source uri +*MetadataApi* | [**create_symlink_file**](docs/MetadataApi.md#create_symlink_file) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory +*MetadataApi* | [**get_meta_range**](docs/MetadataApi.md#get_meta_range) | **GET** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file +*MetadataApi* | [**get_range**](docs/MetadataApi.md#get_range) | **GET** /repositories/{repository}/metadata/range/{range} | return URI to a range file +*ObjectsApi* | [**copy_object**](docs/ObjectsApi.md#copy_object) | **POST** /repositories/{repository}/branches/{branch}/objects/copy | create a copy of an object +*ObjectsApi* | [**delete_object**](docs/ObjectsApi.md#delete_object) | **DELETE** /repositories/{repository}/branches/{branch}/objects | delete object. Missing objects will not return a NotFound error. +*ObjectsApi* | [**delete_objects**](docs/ObjectsApi.md#delete_objects) | **POST** /repositories/{repository}/branches/{branch}/objects/delete | delete objects. Missing objects will not return a NotFound error. +*ObjectsApi* | [**get_object**](docs/ObjectsApi.md#get_object) | **GET** /repositories/{repository}/refs/{ref}/objects | get object content +*ObjectsApi* | [**get_underlying_properties**](docs/ObjectsApi.md#get_underlying_properties) | **GET** /repositories/{repository}/refs/{ref}/objects/underlyingProperties | get object properties on underlying storage +*ObjectsApi* | [**head_object**](docs/ObjectsApi.md#head_object) | **HEAD** /repositories/{repository}/refs/{ref}/objects | check if object exists +*ObjectsApi* | [**list_objects**](docs/ObjectsApi.md#list_objects) | **GET** /repositories/{repository}/refs/{ref}/objects/ls | list objects under a given prefix +*ObjectsApi* | [**stage_object**](docs/ObjectsApi.md#stage_object) | **PUT** /repositories/{repository}/branches/{branch}/objects | stage an object's metadata for the given branch +*ObjectsApi* | [**stat_object**](docs/ObjectsApi.md#stat_object) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata +*ObjectsApi* | [**upload_object**](docs/ObjectsApi.md#upload_object) | **POST** /repositories/{repository}/branches/{branch}/objects | +*OtfDiffApi* | [**otf_diff**](docs/OtfDiffApi.md#otf_diff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff +*RefsApi* | [**diff_refs**](docs/RefsApi.md#diff_refs) | **GET** /repositories/{repository}/refs/{leftRef}/diff/{rightRef} | diff references +*RefsApi* | [**dump_refs**](docs/RefsApi.md#dump_refs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store +*RefsApi* | [**find_merge_base**](docs/RefsApi.md#find_merge_base) | **GET** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | find the merge base for 2 references +*RefsApi* | [**log_commits**](docs/RefsApi.md#log_commits) | **GET** /repositories/{repository}/refs/{ref}/commits | get commit log from ref. If both objects and prefixes are empty, return all commits. +*RefsApi* | [**merge_into_branch**](docs/RefsApi.md#merge_into_branch) | **POST** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | merge references +*RefsApi* | [**restore_refs**](docs/RefsApi.md#restore_refs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store +*RepositoriesApi* | [**create_branch_protection_rule**](docs/RepositoriesApi.md#create_branch_protection_rule) | **POST** /repositories/{repository}/branch_protection | +*RepositoriesApi* | [**create_repository**](docs/RepositoriesApi.md#create_repository) | **POST** /repositories | create repository +*RepositoriesApi* | [**delete_branch_protection_rule**](docs/RepositoriesApi.md#delete_branch_protection_rule) | **DELETE** /repositories/{repository}/branch_protection | +*RepositoriesApi* | [**delete_repository**](docs/RepositoriesApi.md#delete_repository) | **DELETE** /repositories/{repository} | delete repository +*RepositoriesApi* | [**get_branch_protection_rules**](docs/RepositoriesApi.md#get_branch_protection_rules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +*RepositoriesApi* | [**get_repository**](docs/RepositoriesApi.md#get_repository) | **GET** /repositories/{repository} | get repository +*RepositoriesApi* | [**list_repositories**](docs/RepositoriesApi.md#list_repositories) | **GET** /repositories | list repositories +*RetentionApi* | [**delete_garbage_collection_rules**](docs/RetentionApi.md#delete_garbage_collection_rules) | **DELETE** /repositories/{repository}/gc/rules | +*RetentionApi* | [**get_garbage_collection_rules**](docs/RetentionApi.md#get_garbage_collection_rules) | **GET** /repositories/{repository}/gc/rules | +*RetentionApi* | [**prepare_garbage_collection_commits**](docs/RetentionApi.md#prepare_garbage_collection_commits) | **POST** /repositories/{repository}/gc/prepare_commits | save lists of active and expired commits for garbage collection +*RetentionApi* | [**prepare_garbage_collection_uncommitted**](docs/RetentionApi.md#prepare_garbage_collection_uncommitted) | **POST** /repositories/{repository}/gc/prepare_uncommited | save repository uncommitted metadata for garbage collection +*RetentionApi* | [**set_garbage_collection_rules**](docs/RetentionApi.md#set_garbage_collection_rules) | **POST** /repositories/{repository}/gc/rules | +*StagingApi* | [**get_physical_address**](docs/StagingApi.md#get_physical_address) | **GET** /repositories/{repository}/branches/{branch}/staging/backing | get a physical address and a return token to write object to underlying storage +*StagingApi* | [**link_physical_address**](docs/StagingApi.md#link_physical_address) | **PUT** /repositories/{repository}/branches/{branch}/staging/backing | associate staging on this physical address with a path +*StatisticsApi* | [**post_stats_events**](docs/StatisticsApi.md#post_stats_events) | **POST** /statistics | post stats events, this endpoint is meant for internal use only +*TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /repositories/{repository}/tags | create tag +*TagsApi* | [**delete_tag**](docs/TagsApi.md#delete_tag) | **DELETE** /repositories/{repository}/tags/{tag} | delete tag +*TagsApi* | [**get_tag**](docs/TagsApi.md#get_tag) | **GET** /repositories/{repository}/tags/{tag} | get tag +*TagsApi* | [**list_tags**](docs/TagsApi.md#list_tags) | **GET** /repositories/{repository}/tags | list tags +*TemplatesApi* | [**expand_template**](docs/TemplatesApi.md#expand_template) | **GET** /templates/{template_location} | + ## Documentation For Models - - [AccessKeyCredentials](docs/models/AccessKeyCredentials.md) - - [ActionRun](docs/models/ActionRun.md) - - [ActionRunList](docs/models/ActionRunList.md) - - [AuthCapabilities](docs/models/AuthCapabilities.md) - - [AuthenticationToken](docs/models/AuthenticationToken.md) - - [BranchCreation](docs/models/BranchCreation.md) - - [BranchProtectionRule](docs/models/BranchProtectionRule.md) - - [CherryPickCreation](docs/models/CherryPickCreation.md) - - [CommPrefsInput](docs/models/CommPrefsInput.md) - - [Commit](docs/models/Commit.md) - - [CommitCreation](docs/models/CommitCreation.md) - - [CommitList](docs/models/CommitList.md) - - [Credentials](docs/models/Credentials.md) - - [CredentialsList](docs/models/CredentialsList.md) - - [CredentialsWithSecret](docs/models/CredentialsWithSecret.md) - - [CurrentUser](docs/models/CurrentUser.md) - - [Diff](docs/models/Diff.md) - - [DiffList](docs/models/DiffList.md) - - [Error](docs/models/Error.md) - - [FindMergeBaseResult](docs/models/FindMergeBaseResult.md) - - [ForgotPasswordRequest](docs/models/ForgotPasswordRequest.md) - - [GarbageCollectionConfig](docs/models/GarbageCollectionConfig.md) - - [GarbageCollectionPrepareRequest](docs/models/GarbageCollectionPrepareRequest.md) - - [GarbageCollectionPrepareResponse](docs/models/GarbageCollectionPrepareResponse.md) - - [GarbageCollectionRule](docs/models/GarbageCollectionRule.md) - - [GarbageCollectionRules](docs/models/GarbageCollectionRules.md) - - [Group](docs/models/Group.md) - - [GroupCreation](docs/models/GroupCreation.md) - - [GroupList](docs/models/GroupList.md) - - [HookRun](docs/models/HookRun.md) - - [HookRunList](docs/models/HookRunList.md) - - [ImportPagination](docs/models/ImportPagination.md) - - [IngestRangeCreationResponse](docs/models/IngestRangeCreationResponse.md) - - [LoginConfig](docs/models/LoginConfig.md) - - [LoginInformation](docs/models/LoginInformation.md) - - [Merge](docs/models/Merge.md) - - [MergeResult](docs/models/MergeResult.md) - - [MergeResultSummary](docs/models/MergeResultSummary.md) - - [MetaRangeCreation](docs/models/MetaRangeCreation.md) - - [MetaRangeCreationResponse](docs/models/MetaRangeCreationResponse.md) - - [NextStep](docs/models/NextStep.md) - - [ObjectCopyCreation](docs/models/ObjectCopyCreation.md) - - [ObjectError](docs/models/ObjectError.md) - - [ObjectErrorList](docs/models/ObjectErrorList.md) - - [ObjectStageCreation](docs/models/ObjectStageCreation.md) - - [ObjectStats](docs/models/ObjectStats.md) - - [ObjectStatsList](docs/models/ObjectStatsList.md) - - [ObjectUserMetadata](docs/models/ObjectUserMetadata.md) - - [OtfDiffEntry](docs/models/OtfDiffEntry.md) - - [OtfDiffList](docs/models/OtfDiffList.md) - - [Pagination](docs/models/Pagination.md) - - [PathList](docs/models/PathList.md) - - [Policy](docs/models/Policy.md) - - [PolicyList](docs/models/PolicyList.md) - - [PrepareGCUncommittedRequest](docs/models/PrepareGCUncommittedRequest.md) - - [PrepareGCUncommittedResponse](docs/models/PrepareGCUncommittedResponse.md) - - [RangeMetadata](docs/models/RangeMetadata.md) - - [Ref](docs/models/Ref.md) - - [RefList](docs/models/RefList.md) - - [RefsDump](docs/models/RefsDump.md) - - [Repository](docs/models/Repository.md) - - [RepositoryCreation](docs/models/RepositoryCreation.md) - - [RepositoryList](docs/models/RepositoryList.md) - - [ResetCreation](docs/models/ResetCreation.md) - - [RevertCreation](docs/models/RevertCreation.md) - - [Setup](docs/models/Setup.md) - - [SetupState](docs/models/SetupState.md) - - [StageRangeCreation](docs/models/StageRangeCreation.md) - - [StagingLocation](docs/models/StagingLocation.md) - - [StagingMetadata](docs/models/StagingMetadata.md) - - [Statement](docs/models/Statement.md) - - [StatsEvent](docs/models/StatsEvent.md) - - [StatsEventsList](docs/models/StatsEventsList.md) - - [StorageConfig](docs/models/StorageConfig.md) - - [StorageURI](docs/models/StorageURI.md) - - [TagCreation](docs/models/TagCreation.md) - - [UnderlyingObjectProperties](docs/models/UnderlyingObjectProperties.md) - - [UpdatePasswordByToken](docs/models/UpdatePasswordByToken.md) - - [User](docs/models/User.md) - - [UserCreation](docs/models/UserCreation.md) - - [UserList](docs/models/UserList.md) - - [VersionConfig](docs/models/VersionConfig.md) + - [AccessKeyCredentials](docs/AccessKeyCredentials.md) + - [ActionRun](docs/ActionRun.md) + - [ActionRunList](docs/ActionRunList.md) + - [AuthCapabilities](docs/AuthCapabilities.md) + - [AuthenticationToken](docs/AuthenticationToken.md) + - [BranchCreation](docs/BranchCreation.md) + - [BranchProtectionRule](docs/BranchProtectionRule.md) + - [CherryPickCreation](docs/CherryPickCreation.md) + - [CommPrefsInput](docs/CommPrefsInput.md) + - [Commit](docs/Commit.md) + - [CommitCreation](docs/CommitCreation.md) + - [CommitList](docs/CommitList.md) + - [Credentials](docs/Credentials.md) + - [CredentialsList](docs/CredentialsList.md) + - [CredentialsWithSecret](docs/CredentialsWithSecret.md) + - [CurrentUser](docs/CurrentUser.md) + - [Diff](docs/Diff.md) + - [DiffList](docs/DiffList.md) + - [Error](docs/Error.md) + - [FindMergeBaseResult](docs/FindMergeBaseResult.md) + - [ForgotPasswordRequest](docs/ForgotPasswordRequest.md) + - [GarbageCollectionConfig](docs/GarbageCollectionConfig.md) + - [GarbageCollectionPrepareRequest](docs/GarbageCollectionPrepareRequest.md) + - [GarbageCollectionPrepareResponse](docs/GarbageCollectionPrepareResponse.md) + - [GarbageCollectionRule](docs/GarbageCollectionRule.md) + - [GarbageCollectionRules](docs/GarbageCollectionRules.md) + - [Group](docs/Group.md) + - [GroupCreation](docs/GroupCreation.md) + - [GroupList](docs/GroupList.md) + - [HookRun](docs/HookRun.md) + - [HookRunList](docs/HookRunList.md) + - [ImportPagination](docs/ImportPagination.md) + - [IngestRangeCreationResponse](docs/IngestRangeCreationResponse.md) + - [InlineObject1](docs/InlineObject1.md) + - [LoginConfig](docs/LoginConfig.md) + - [LoginInformation](docs/LoginInformation.md) + - [Merge](docs/Merge.md) + - [MergeResult](docs/MergeResult.md) + - [MergeResultSummary](docs/MergeResultSummary.md) + - [MetaRangeCreation](docs/MetaRangeCreation.md) + - [MetaRangeCreationResponse](docs/MetaRangeCreationResponse.md) + - [NextStep](docs/NextStep.md) + - [ObjectCopyCreation](docs/ObjectCopyCreation.md) + - [ObjectError](docs/ObjectError.md) + - [ObjectErrorList](docs/ObjectErrorList.md) + - [ObjectStageCreation](docs/ObjectStageCreation.md) + - [ObjectStats](docs/ObjectStats.md) + - [ObjectStatsList](docs/ObjectStatsList.md) + - [ObjectUserMetadata](docs/ObjectUserMetadata.md) + - [OtfDiffEntry](docs/OtfDiffEntry.md) + - [OtfDiffList](docs/OtfDiffList.md) + - [Pagination](docs/Pagination.md) + - [PathList](docs/PathList.md) + - [Policy](docs/Policy.md) + - [PolicyList](docs/PolicyList.md) + - [PrepareGCUncommittedRequest](docs/PrepareGCUncommittedRequest.md) + - [PrepareGCUncommittedResponse](docs/PrepareGCUncommittedResponse.md) + - [RangeMetadata](docs/RangeMetadata.md) + - [Ref](docs/Ref.md) + - [RefList](docs/RefList.md) + - [RefsDump](docs/RefsDump.md) + - [Repository](docs/Repository.md) + - [RepositoryCreation](docs/RepositoryCreation.md) + - [RepositoryList](docs/RepositoryList.md) + - [ResetCreation](docs/ResetCreation.md) + - [RevertCreation](docs/RevertCreation.md) + - [Setup](docs/Setup.md) + - [SetupState](docs/SetupState.md) + - [StageRangeCreation](docs/StageRangeCreation.md) + - [StagingLocation](docs/StagingLocation.md) + - [StagingMetadata](docs/StagingMetadata.md) + - [Statement](docs/Statement.md) + - [StatsEvent](docs/StatsEvent.md) + - [StatsEventsList](docs/StatsEventsList.md) + - [StorageConfig](docs/StorageConfig.md) + - [StorageURI](docs/StorageURI.md) + - [TagCreation](docs/TagCreation.md) + - [UnderlyingObjectProperties](docs/UnderlyingObjectProperties.md) + - [UpdatePasswordByToken](docs/UpdatePasswordByToken.md) + - [User](docs/User.md) + - [UserCreation](docs/UserCreation.md) + - [UserList](docs/UserList.md) + - [VersionConfig](docs/VersionConfig.md) + ## Documentation For Authorization @@ -397,11 +310,6 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication -## jwt_token - -- **Type**: Bearer authentication (JWT) - - ## cookie_auth - **Type**: API key @@ -409,13 +317,18 @@ Class | Method | HTTP request | Description - **Location**: +## jwt_token + +- **Type**: Bearer authentication (JWT) + + ## oidc_auth - **Type**: API key - **API key parameter name**: oidc_auth_session - **Location**: - Authentication schemes defined for the API: + ## saml_auth - **Type**: API key @@ -426,23 +339,7 @@ Class | Method | HTTP request | Description ## Author services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io -services@treeverse.io + ## Notes for Large OpenAPI documents If the OpenAPI document is large, imports in lakefs_client.apis and lakefs_client.models may fail with a @@ -450,10 +347,10 @@ RecursionError indicating the maximum recursion limit has been exceeded. In that Solution 1: Use specific imports for apis and models like: -- `from lakefs_client.apis.default_api import DefaultApi` +- `from lakefs_client.api.default_api import DefaultApi` - `from lakefs_client.model.pet import Pet` -Solution 1: +Solution 2: Before importing the package, adjust the maximum recursion limit as shown below: ``` import sys @@ -462,3 +359,4 @@ import lakefs_client from lakefs_client.apis import * from lakefs_client.models import * ``` + diff --git a/clients/python/docs/AccessKeyCredentials.md b/clients/python/docs/AccessKeyCredentials.md new file mode 100644 index 00000000000..746f6c55300 --- /dev/null +++ b/clients/python/docs/AccessKeyCredentials.md @@ -0,0 +1,13 @@ +# AccessKeyCredentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key_id** | **str** | access key ID to set for user for use in integration testing. | +**secret_access_key** | **str** | secret access key to set for user for use in integration testing. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ActionRun.md b/clients/python/docs/ActionRun.md new file mode 100644 index 00000000000..042130c448a --- /dev/null +++ b/clients/python/docs/ActionRun.md @@ -0,0 +1,18 @@ +# ActionRun + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**run_id** | **str** | | +**branch** | **str** | | +**start_time** | **datetime** | | +**event_type** | **str** | | +**status** | **str** | | +**commit_id** | **str** | | +**end_time** | **datetime** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ActionRunList.md b/clients/python/docs/ActionRunList.md new file mode 100644 index 00000000000..7a865770eef --- /dev/null +++ b/clients/python/docs/ActionRunList.md @@ -0,0 +1,13 @@ +# ActionRunList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[ActionRun]**](ActionRun.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ActionsApi.md b/clients/python/docs/ActionsApi.md new file mode 100644 index 00000000000..fd8674c9161 --- /dev/null +++ b/clients/python/docs/ActionsApi.md @@ -0,0 +1,477 @@ +# lakefs_client.ActionsApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_run**](ActionsApi.md#get_run) | **GET** /repositories/{repository}/actions/runs/{run_id} | get a run +[**get_run_hook_output**](ActionsApi.md#get_run_hook_output) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output +[**list_repository_runs**](ActionsApi.md#list_repository_runs) | **GET** /repositories/{repository}/actions/runs | list runs +[**list_run_hooks**](ActionsApi.md#list_run_hooks) | **GET** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks + + +# **get_run** +> ActionRun get_run(repository, run_id) + +get a run + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import actions_api +from lakefs_client.model.action_run import ActionRun +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + repository = "repository_example" # str | + run_id = "run_id_example" # str | + + # example passing only required values which don't have defaults set + try: + # get a run + api_response = api_instance.get_run(repository, run_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ActionsApi->get_run: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **run_id** | **str**| | + +### Return type + +[**ActionRun**](ActionRun.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | action run result | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_run_hook_output** +> file_type get_run_hook_output(repository, run_id, hook_run_id) + +get run hook output + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import actions_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + repository = "repository_example" # str | + run_id = "run_id_example" # str | + hook_run_id = "hook_run_id_example" # str | + + # example passing only required values which don't have defaults set + try: + # get run hook output + api_response = api_instance.get_run_hook_output(repository, run_id, hook_run_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ActionsApi->get_run_hook_output: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **run_id** | **str**| | + **hook_run_id** | **str**| | + +### Return type + +**file_type** + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | run hook output | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_repository_runs** +> ActionRunList list_repository_runs(repository) + +list runs + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import actions_api +from lakefs_client.model.action_run_list import ActionRunList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + repository = "repository_example" # str | + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + branch = "branch_example" # str | (optional) + commit = "commit_example" # str | (optional) + + # example passing only required values which don't have defaults set + try: + # list runs + api_response = api_instance.list_repository_runs(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ActionsApi->list_repository_runs: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list runs + api_response = api_instance.list_repository_runs(repository, after=after, amount=amount, branch=branch, commit=commit) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ActionsApi->list_repository_runs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + **branch** | **str**| | [optional] + **commit** | **str**| | [optional] + +### Return type + +[**ActionRunList**](ActionRunList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | list action runs | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_run_hooks** +> HookRunList list_run_hooks(repository, run_id) + +list run hooks + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import actions_api +from lakefs_client.model.error import Error +from lakefs_client.model.hook_run_list import HookRunList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = actions_api.ActionsApi(api_client) + repository = "repository_example" # str | + run_id = "run_id_example" # str | + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # list run hooks + api_response = api_instance.list_run_hooks(repository, run_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ActionsApi->list_run_hooks: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list run hooks + api_response = api_instance.list_run_hooks(repository, run_id, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ActionsApi->list_run_hooks: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **run_id** | **str**| | + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**HookRunList**](HookRunList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | list specific run hooks | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/AuthApi.md b/clients/python/docs/AuthApi.md new file mode 100644 index 00000000000..3a343f6bee5 --- /dev/null +++ b/clients/python/docs/AuthApi.md @@ -0,0 +1,3437 @@ +# lakefs_client.AuthApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_group_membership**](AuthApi.md#add_group_membership) | **PUT** /auth/groups/{groupId}/members/{userId} | add group membership +[**attach_policy_to_group**](AuthApi.md#attach_policy_to_group) | **PUT** /auth/groups/{groupId}/policies/{policyId} | attach policy to group +[**attach_policy_to_user**](AuthApi.md#attach_policy_to_user) | **PUT** /auth/users/{userId}/policies/{policyId} | attach policy to user +[**create_credentials**](AuthApi.md#create_credentials) | **POST** /auth/users/{userId}/credentials | create credentials +[**create_group**](AuthApi.md#create_group) | **POST** /auth/groups | create group +[**create_policy**](AuthApi.md#create_policy) | **POST** /auth/policies | create policy +[**create_user**](AuthApi.md#create_user) | **POST** /auth/users | create user +[**delete_credentials**](AuthApi.md#delete_credentials) | **DELETE** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials +[**delete_group**](AuthApi.md#delete_group) | **DELETE** /auth/groups/{groupId} | delete group +[**delete_group_membership**](AuthApi.md#delete_group_membership) | **DELETE** /auth/groups/{groupId}/members/{userId} | delete group membership +[**delete_policy**](AuthApi.md#delete_policy) | **DELETE** /auth/policies/{policyId} | delete policy +[**delete_user**](AuthApi.md#delete_user) | **DELETE** /auth/users/{userId} | delete user +[**detach_policy_from_group**](AuthApi.md#detach_policy_from_group) | **DELETE** /auth/groups/{groupId}/policies/{policyId} | detach policy from group +[**detach_policy_from_user**](AuthApi.md#detach_policy_from_user) | **DELETE** /auth/users/{userId}/policies/{policyId} | detach policy from user +[**forgot_password**](AuthApi.md#forgot_password) | **POST** /auth/password/forgot | forgot password request initiates the password reset process +[**get_auth_capabilities**](AuthApi.md#get_auth_capabilities) | **GET** /auth/capabilities | list authentication capabilities supported +[**get_credentials**](AuthApi.md#get_credentials) | **GET** /auth/users/{userId}/credentials/{accessKeyId} | get credentials +[**get_current_user**](AuthApi.md#get_current_user) | **GET** /user | get current user +[**get_group**](AuthApi.md#get_group) | **GET** /auth/groups/{groupId} | get group +[**get_policy**](AuthApi.md#get_policy) | **GET** /auth/policies/{policyId} | get policy +[**get_user**](AuthApi.md#get_user) | **GET** /auth/users/{userId} | get user +[**list_group_members**](AuthApi.md#list_group_members) | **GET** /auth/groups/{groupId}/members | list group members +[**list_group_policies**](AuthApi.md#list_group_policies) | **GET** /auth/groups/{groupId}/policies | list group policies +[**list_groups**](AuthApi.md#list_groups) | **GET** /auth/groups | list groups +[**list_policies**](AuthApi.md#list_policies) | **GET** /auth/policies | list policies +[**list_user_credentials**](AuthApi.md#list_user_credentials) | **GET** /auth/users/{userId}/credentials | list user credentials +[**list_user_groups**](AuthApi.md#list_user_groups) | **GET** /auth/users/{userId}/groups | list user groups +[**list_user_policies**](AuthApi.md#list_user_policies) | **GET** /auth/users/{userId}/policies | list user policies +[**list_users**](AuthApi.md#list_users) | **GET** /auth/users | list users +[**login**](AuthApi.md#login) | **POST** /auth/login | perform a login +[**update_password**](AuthApi.md#update_password) | **POST** /auth/password | Update user password by reset_password token +[**update_policy**](AuthApi.md#update_policy) | **PUT** /auth/policies/{policyId} | update policy + + +# **add_group_membership** +> add_group_membership(group_id, user_id) + +add group membership + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + user_id = "userId_example" # str | + + # example passing only required values which don't have defaults set + try: + # add group membership + api_instance.add_group_membership(group_id, user_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->add_group_membership: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | membership added successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **attach_policy_to_group** +> attach_policy_to_group(group_id, policy_id) + +attach policy to group + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + policy_id = "policyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # attach policy to group + api_instance.attach_policy_to_group(group_id, policy_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->attach_policy_to_group: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + **policy_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | policy attached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **attach_policy_to_user** +> attach_policy_to_user(user_id, policy_id) + +attach policy to user + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + policy_id = "policyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # attach policy to user + api_instance.attach_policy_to_user(user_id, policy_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->attach_policy_to_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **policy_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | policy attached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_credentials** +> CredentialsWithSecret create_credentials(user_id) + +create credentials + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.credentials_with_secret import CredentialsWithSecret +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + + # example passing only required values which don't have defaults set + try: + # create credentials + api_response = api_instance.create_credentials(user_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->create_credentials: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + +### Return type + +[**CredentialsWithSecret**](CredentialsWithSecret.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | credentials | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_group** +> Group create_group() + +create group + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.group_creation import GroupCreation +from lakefs_client.model.error import Error +from lakefs_client.model.group import Group +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_creation = GroupCreation( + id="id_example", + ) # GroupCreation | (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create group + api_response = api_instance.create_group(group_creation=group_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->create_group: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_creation** | [**GroupCreation**](GroupCreation.md)| | [optional] + +### Return type + +[**Group**](Group.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | group | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_policy** +> Policy create_policy(policy) + +create policy + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.policy import Policy +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + policy = Policy( + id="id_example", + creation_date=1, + statement=[ + Statement( + effect="allow", + resource="resource_example", + action=[ + "action_example", + ], + ), + ], + ) # Policy | + + # example passing only required values which don't have defaults set + try: + # create policy + api_response = api_instance.create_policy(policy) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->create_policy: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policy** | [**Policy**](Policy.md)| | + +### Return type + +[**Policy**](Policy.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | policy | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_user** +> User create_user() + +create user + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from lakefs_client.model.user import User +from lakefs_client.model.user_creation import UserCreation +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_creation = UserCreation( + id="id_example", + invite_user=True, + ) # UserCreation | (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create user + api_response = api_instance.create_user(user_creation=user_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->create_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_creation** | [**UserCreation**](UserCreation.md)| | [optional] + +### Return type + +[**User**](User.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | user | - | +**400** | validation error | - | +**401** | Unauthorized | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_credentials** +> delete_credentials(user_id, access_key_id) + +delete credentials + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + access_key_id = "accessKeyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete credentials + api_instance.delete_credentials(user_id, access_key_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->delete_credentials: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **access_key_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | credentials deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_group** +> delete_group(group_id) + +delete group + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete group + api_instance.delete_group(group_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->delete_group: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | group deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_group_membership** +> delete_group_membership(group_id, user_id) + +delete group membership + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + user_id = "userId_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete group membership + api_instance.delete_group_membership(group_id, user_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->delete_group_membership: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | membership deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_policy** +> delete_policy(policy_id) + +delete policy + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + policy_id = "policyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete policy + api_instance.delete_policy(policy_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->delete_policy: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policy_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | policy deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_user** +> delete_user(user_id) + +delete user + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete user + api_instance.delete_user(user_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->delete_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | user deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **detach_policy_from_group** +> detach_policy_from_group(group_id, policy_id) + +detach policy from group + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + policy_id = "policyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # detach policy from group + api_instance.detach_policy_from_group(group_id, policy_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->detach_policy_from_group: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + **policy_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | policy detached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **detach_policy_from_user** +> detach_policy_from_user(user_id, policy_id) + +detach policy from user + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + policy_id = "policyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # detach policy from user + api_instance.detach_policy_from_user(user_id, policy_id) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->detach_policy_from_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **policy_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | policy detached successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **forgot_password** +> forgot_password(forgot_password_request) + +forgot password request initiates the password reset process + +### Example + + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.forgot_password_request import ForgotPasswordRequest +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + forgot_password_request = ForgotPasswordRequest( + email="email_example", + ) # ForgotPasswordRequest | + + # example passing only required values which don't have defaults set + try: + # forgot password request initiates the password reset process + api_instance.forgot_password(forgot_password_request) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->forgot_password: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **forgot_password_request** | [**ForgotPasswordRequest**](ForgotPasswordRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | bad request | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_auth_capabilities** +> AuthCapabilities get_auth_capabilities() + +list authentication capabilities supported + +### Example + + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from lakefs_client.model.auth_capabilities import AuthCapabilities +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # list authentication capabilities supported + api_response = api_instance.get_auth_capabilities() + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->get_auth_capabilities: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AuthCapabilities**](AuthCapabilities.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | auth capabilities | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_credentials** +> Credentials get_credentials(user_id, access_key_id) + +get credentials + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.credentials import Credentials +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + access_key_id = "accessKeyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # get credentials + api_response = api_instance.get_credentials(user_id, access_key_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->get_credentials: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **access_key_id** | **str**| | + +### Return type + +[**Credentials**](Credentials.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | credentials | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_current_user** +> CurrentUser get_current_user() + +get current user + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.current_user import CurrentUser +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # get current user + api_response = api_instance.get_current_user() + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->get_current_user: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CurrentUser**](CurrentUser.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | user | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_group** +> Group get_group(group_id) + +get group + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from lakefs_client.model.group import Group +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + + # example passing only required values which don't have defaults set + try: + # get group + api_response = api_instance.get_group(group_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->get_group: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + +### Return type + +[**Group**](Group.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | group | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_policy** +> Policy get_policy(policy_id) + +get policy + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.policy import Policy +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + policy_id = "policyId_example" # str | + + # example passing only required values which don't have defaults set + try: + # get policy + api_response = api_instance.get_policy(policy_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->get_policy: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policy_id** | **str**| | + +### Return type + +[**Policy**](Policy.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | policy | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user** +> User get_user(user_id) + +get user + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from lakefs_client.model.user import User +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + + # example passing only required values which don't have defaults set + try: + # get user + api_response = api_instance.get_user(user_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->get_user: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + +### Return type + +[**User**](User.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | user | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_group_members** +> UserList list_group_members(group_id) + +list group members + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.user_list import UserList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # list group members + api_response = api_instance.list_group_members(group_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_group_members: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list group members + api_response = api_instance.list_group_members(group_id, prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_group_members: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**UserList**](UserList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | group memeber list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_group_policies** +> PolicyList list_group_policies(group_id) + +list group policies + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.policy_list import PolicyList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + group_id = "groupId_example" # str | + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # list group policies + api_response = api_instance.list_group_policies(group_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_group_policies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list group policies + api_response = api_instance.list_group_policies(group_id, prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_group_policies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **str**| | + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**PolicyList**](PolicyList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | policy list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_groups** +> GroupList list_groups() + +list groups + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.group_list import GroupList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + # and optional values + try: + # list groups + api_response = api_instance.list_groups(prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_groups: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**GroupList**](GroupList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | group list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_policies** +> PolicyList list_policies() + +list policies + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.policy_list import PolicyList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + # and optional values + try: + # list policies + api_response = api_instance.list_policies(prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_policies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**PolicyList**](PolicyList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | policy list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_user_credentials** +> CredentialsList list_user_credentials(user_id) + +list user credentials + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.error import Error +from lakefs_client.model.credentials_list import CredentialsList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # list user credentials + api_response = api_instance.list_user_credentials(user_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_user_credentials: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list user credentials + api_response = api_instance.list_user_credentials(user_id, prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_user_credentials: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**CredentialsList**](CredentialsList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | credential list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_user_groups** +> GroupList list_user_groups(user_id) + +list user groups + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.group_list import GroupList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # list user groups + api_response = api_instance.list_user_groups(user_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_user_groups: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list user groups + api_response = api_instance.list_user_groups(user_id, prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_user_groups: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**GroupList**](GroupList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | group list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_user_policies** +> PolicyList list_user_policies(user_id) + +list user policies + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.policy_list import PolicyList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + user_id = "userId_example" # str | + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + effective = False # bool | will return all distinct policies attached to the user or any of its groups (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # list user policies + api_response = api_instance.list_user_policies(user_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_user_policies: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list user policies + api_response = api_instance.list_user_policies(user_id, prefix=prefix, after=after, amount=amount, effective=effective) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_user_policies: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + **effective** | **bool**| will return all distinct policies attached to the user or any of its groups | [optional] if omitted the server will use the default value of False + +### Return type + +[**PolicyList**](PolicyList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | policy list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_users** +> UserList list_users() + +list users + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.user_list import UserList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + # and optional values + try: + # list users + api_response = api_instance.list_users(prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->list_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**UserList**](UserList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | user list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **login** +> AuthenticationToken login() + +perform a login + +### Example + + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.authentication_token import AuthenticationToken +from lakefs_client.model.login_information import LoginInformation +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + login_information = LoginInformation( + access_key_id="access_key_id_example", + secret_access_key="secret_access_key_example", + ) # LoginInformation | (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # perform a login + api_response = api_instance.login(login_information=login_information) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->login: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **login_information** | [**LoginInformation**](LoginInformation.md)| | [optional] + +### Return type + +[**AuthenticationToken**](AuthenticationToken.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful login | * Set-Cookie -
| +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_password** +> update_password(update_password_by_token) + +Update user password by reset_password token + +### Example + +* Api Key Authentication (cookie_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.update_password_by_token import UpdatePasswordByToken +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + update_password_by_token = UpdatePasswordByToken( + token="token_example", + new_password="new_password_example", + email="email_example", + ) # UpdatePasswordByToken | + + # example passing only required values which don't have defaults set + try: + # Update user password by reset_password token + api_instance.update_password(update_password_by_token) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->update_password: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_password_by_token** | [**UpdatePasswordByToken**](UpdatePasswordByToken.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[cookie_auth](../README.md#cookie_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | successful reset | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_policy** +> Policy update_policy(policy_id, policy) + +update policy + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import auth_api +from lakefs_client.model.policy import Policy +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = auth_api.AuthApi(api_client) + policy_id = "policyId_example" # str | + policy = Policy( + id="id_example", + creation_date=1, + statement=[ + Statement( + effect="allow", + resource="resource_example", + action=[ + "action_example", + ], + ), + ], + ) # Policy | + + # example passing only required values which don't have defaults set + try: + # update policy + api_response = api_instance.update_policy(policy_id, policy) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling AuthApi->update_policy: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policy_id** | **str**| | + **policy** | [**Policy**](Policy.md)| | + +### Return type + +[**Policy**](Policy.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | policy | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/AuthCapabilities.md b/clients/python/docs/AuthCapabilities.md new file mode 100644 index 00000000000..c01ce77ed33 --- /dev/null +++ b/clients/python/docs/AuthCapabilities.md @@ -0,0 +1,13 @@ +# AuthCapabilities + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_user** | **bool** | | [optional] +**forgot_password** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/AuthenticationToken.md b/clients/python/docs/AuthenticationToken.md new file mode 100644 index 00000000000..92b12f0f7de --- /dev/null +++ b/clients/python/docs/AuthenticationToken.md @@ -0,0 +1,13 @@ +# AuthenticationToken + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | a JWT token that could be used to authenticate requests | +**token_expiration** | **int** | Unix Epoch in seconds | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/BranchCreation.md b/clients/python/docs/BranchCreation.md new file mode 100644 index 00000000000..ffef23b25fe --- /dev/null +++ b/clients/python/docs/BranchCreation.md @@ -0,0 +1,13 @@ +# BranchCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**source** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/BranchProtectionRule.md b/clients/python/docs/BranchProtectionRule.md new file mode 100644 index 00000000000..879494512a3 --- /dev/null +++ b/clients/python/docs/BranchProtectionRule.md @@ -0,0 +1,12 @@ +# BranchProtectionRule + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pattern** | **str** | fnmatch pattern for the branch name, supporting * and ? wildcards | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/BranchesApi.md b/clients/python/docs/BranchesApi.md new file mode 100644 index 00000000000..e1ee219d319 --- /dev/null +++ b/clients/python/docs/BranchesApi.md @@ -0,0 +1,940 @@ +# lakefs_client.BranchesApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cherry_pick**](BranchesApi.md#cherry_pick) | **POST** /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch +[**create_branch**](BranchesApi.md#create_branch) | **POST** /repositories/{repository}/branches | create branch +[**delete_branch**](BranchesApi.md#delete_branch) | **DELETE** /repositories/{repository}/branches/{branch} | delete branch +[**diff_branch**](BranchesApi.md#diff_branch) | **GET** /repositories/{repository}/branches/{branch}/diff | diff branch +[**get_branch**](BranchesApi.md#get_branch) | **GET** /repositories/{repository}/branches/{branch} | get branch +[**list_branches**](BranchesApi.md#list_branches) | **GET** /repositories/{repository}/branches | list branches +[**reset_branch**](BranchesApi.md#reset_branch) | **PUT** /repositories/{repository}/branches/{branch} | reset branch +[**revert_branch**](BranchesApi.md#revert_branch) | **POST** /repositories/{repository}/branches/{branch}/revert | revert + + +# **cherry_pick** +> Commit cherry_pick(repository, branch, cherry_pick_creation) + +Replay the changes from the given commit on the branch + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.commit import Commit +from lakefs_client.model.error import Error +from lakefs_client.model.cherry_pick_creation import CherryPickCreation +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + cherry_pick_creation = CherryPickCreation( + ref="ref_example", + parent_number=1, + ) # CherryPickCreation | + + # example passing only required values which don't have defaults set + try: + # Replay the changes from the given commit on the branch + api_response = api_instance.cherry_pick(repository, branch, cherry_pick_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->cherry_pick: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **cherry_pick_creation** | [**CherryPickCreation**](CherryPickCreation.md)| | + +### Return type + +[**Commit**](Commit.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | the cherry-pick commit | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Conflict Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_branch** +> str create_branch(repository, branch_creation) + +create branch + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.branch_creation import BranchCreation +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + branch_creation = BranchCreation( + name="name_example", + source="source_example", + ) # BranchCreation | + + # example passing only required values which don't have defaults set + try: + # create branch + api_response = api_instance.create_branch(repository, branch_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->create_branch: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch_creation** | [**BranchCreation**](BranchCreation.md)| | + +### Return type + +**str** + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: text/html, application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | reference | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_branch** +> delete_branch(repository, branch) + +delete branch + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete branch + api_instance.delete_branch(repository, branch) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->delete_branch: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | branch deleted successfully | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **diff_branch** +> DiffList diff_branch(repository, branch) + +diff branch + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.diff_list import DiffList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + prefix = "prefix_example" # str | return items prefixed with this value (optional) + delimiter = "delimiter_example" # str | delimiter used to group common prefixes by (optional) + + # example passing only required values which don't have defaults set + try: + # diff branch + api_response = api_instance.diff_branch(repository, branch) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->diff_branch: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # diff branch + api_response = api_instance.diff_branch(repository, branch, after=after, amount=amount, prefix=prefix, delimiter=delimiter) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->diff_branch: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + **prefix** | **str**| return items prefixed with this value | [optional] + **delimiter** | **str**| delimiter used to group common prefixes by | [optional] + +### Return type + +[**DiffList**](DiffList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | diff of branch uncommitted changes | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_branch** +> Ref get_branch(repository, branch) + +get branch + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.error import Error +from lakefs_client.model.ref import Ref +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + + # example passing only required values which don't have defaults set + try: + # get branch + api_response = api_instance.get_branch(repository, branch) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->get_branch: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + +### Return type + +[**Ref**](Ref.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | branch | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_branches** +> RefList list_branches(repository) + +list branches + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.error import Error +from lakefs_client.model.ref_list import RefList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # list branches + api_response = api_instance.list_branches(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->list_branches: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list branches + api_response = api_instance.list_branches(repository, prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->list_branches: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**RefList**](RefList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | branch list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reset_branch** +> reset_branch(repository, branch, reset_creation) + +reset branch + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.reset_creation import ResetCreation +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + reset_creation = ResetCreation( + type="object", + path="path_example", + ) # ResetCreation | + + # example passing only required values which don't have defaults set + try: + # reset branch + api_instance.reset_branch(repository, branch, reset_creation) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->reset_branch: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **reset_creation** | [**ResetCreation**](ResetCreation.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | reset successful | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revert_branch** +> revert_branch(repository, branch, revert_creation) + +revert + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import branches_api +from lakefs_client.model.revert_creation import RevertCreation +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = branches_api.BranchesApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + revert_creation = RevertCreation( + ref="ref_example", + parent_number=1, + ) # RevertCreation | + + # example passing only required values which don't have defaults set + try: + # revert + api_instance.revert_branch(repository, branch, revert_creation) + except lakefs_client.ApiException as e: + print("Exception when calling BranchesApi->revert_branch: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **revert_creation** | [**RevertCreation**](RevertCreation.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | revert successful | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Conflict Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/CherryPickCreation.md b/clients/python/docs/CherryPickCreation.md new file mode 100644 index 00000000000..cdb942da726 --- /dev/null +++ b/clients/python/docs/CherryPickCreation.md @@ -0,0 +1,13 @@ +# CherryPickCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ref** | **str** | the commit to cherry-pick, given by a ref | +**parent_number** | **int** | when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. The destination branch is parent 1, which is the default behaviour. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/CommPrefsInput.md b/clients/python/docs/CommPrefsInput.md new file mode 100644 index 00000000000..7bb4a64be1b --- /dev/null +++ b/clients/python/docs/CommPrefsInput.md @@ -0,0 +1,14 @@ +# CommPrefsInput + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feature_updates** | **bool** | was \"feature updates\" checked | +**security_updates** | **bool** | was \"security updates\" checked | +**email** | **str** | the provided email | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Commit.md b/clients/python/docs/Commit.md new file mode 100644 index 00000000000..5c5322f2168 --- /dev/null +++ b/clients/python/docs/Commit.md @@ -0,0 +1,18 @@ +# Commit + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**parents** | **[str]** | | +**committer** | **str** | | +**message** | **str** | | +**creation_date** | **int** | Unix Epoch in seconds | +**meta_range_id** | **str** | | +**metadata** | **{str: (str,)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/CommitCreation.md b/clients/python/docs/CommitCreation.md new file mode 100644 index 00000000000..0f67969ccae --- /dev/null +++ b/clients/python/docs/CommitCreation.md @@ -0,0 +1,14 @@ +# CommitCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | +**metadata** | **{str: (str,)}** | | [optional] +**date** | **int** | set date to override creation date in the commit (Unix Epoch in seconds) | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/CommitList.md b/clients/python/docs/CommitList.md new file mode 100644 index 00000000000..73541275be7 --- /dev/null +++ b/clients/python/docs/CommitList.md @@ -0,0 +1,13 @@ +# CommitList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[Commit]**](Commit.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/CommitsApi.md b/clients/python/docs/CommitsApi.md new file mode 100644 index 00000000000..c973c7a8e22 --- /dev/null +++ b/clients/python/docs/CommitsApi.md @@ -0,0 +1,374 @@ +# lakefs_client.CommitsApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**commit**](CommitsApi.md#commit) | **POST** /repositories/{repository}/branches/{branch}/commits | create commit +[**get_commit**](CommitsApi.md#get_commit) | **GET** /repositories/{repository}/commits/{commitId} | get commit +[**log_branch_commits**](CommitsApi.md#log_branch_commits) | **GET** /repositories/{repository}/branches/{branch}/commits | get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref + + +# **commit** +> Commit commit(repository, branch, commit_creation) + +create commit + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import commits_api +from lakefs_client.model.commit import Commit +from lakefs_client.model.commit_creation import CommitCreation +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = commits_api.CommitsApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + commit_creation = CommitCreation( + message="message_example", + metadata={ + "key": "key_example", + }, + date=1, + ) # CommitCreation | + source_metarange = "source_metarange_example" # str | The source metarange to commit. Branch must not have uncommitted changes. (optional) + + # example passing only required values which don't have defaults set + try: + # create commit + api_response = api_instance.commit(repository, branch, commit_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling CommitsApi->commit: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create commit + api_response = api_instance.commit(repository, branch, commit_creation, source_metarange=source_metarange) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling CommitsApi->commit: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **commit_creation** | [**CommitCreation**](CommitCreation.md)| | + **source_metarange** | **str**| The source metarange to commit. Branch must not have uncommitted changes. | [optional] + +### Return type + +[**Commit**](Commit.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | commit | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed (e.g. a pre-commit hook returned a failure) | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_commit** +> Commit get_commit(repository, commit_id) + +get commit + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import commits_api +from lakefs_client.model.commit import Commit +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = commits_api.CommitsApi(api_client) + repository = "repository_example" # str | + commit_id = "commitId_example" # str | + + # example passing only required values which don't have defaults set + try: + # get commit + api_response = api_instance.get_commit(repository, commit_id) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling CommitsApi->get_commit: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **commit_id** | **str**| | + +### Return type + +[**Commit**](Commit.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | commit | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **log_branch_commits** +> CommitList log_branch_commits(repository, branch) + +get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import commits_api +from lakefs_client.model.commit_list import CommitList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = commits_api.CommitsApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref + api_response = api_instance.log_branch_commits(repository, branch) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling CommitsApi->log_branch_commits: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref + api_response = api_instance.log_branch_commits(repository, branch, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling CommitsApi->log_branch_commits: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**CommitList**](CommitList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | commit log | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/ConfigApi.md b/clients/python/docs/ConfigApi.md new file mode 100644 index 00000000000..efb11bf7ed1 --- /dev/null +++ b/clients/python/docs/ConfigApi.md @@ -0,0 +1,533 @@ +# lakefs_client.ConfigApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_garbage_collection_config**](ConfigApi.md#get_garbage_collection_config) | **GET** /config/garbage-collection | +[**get_lake_fs_version**](ConfigApi.md#get_lake_fs_version) | **GET** /config/version | +[**get_setup_state**](ConfigApi.md#get_setup_state) | **GET** /setup_lakefs | check if the lakeFS installation is already set up +[**get_storage_config**](ConfigApi.md#get_storage_config) | **GET** /config/storage | +[**setup**](ConfigApi.md#setup) | **POST** /setup_lakefs | setup lakeFS and create a first user +[**setup_comm_prefs**](ConfigApi.md#setup_comm_prefs) | **POST** /setup_comm_prefs | setup communications preferences + + +# **get_garbage_collection_config** +> GarbageCollectionConfig get_garbage_collection_config() + + + +get information of gc settings + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import config_api +from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = config_api.ConfigApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.get_garbage_collection_config() + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ConfigApi->get_garbage_collection_config: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GarbageCollectionConfig**](GarbageCollectionConfig.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | lakeFS garbage collection config | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_lake_fs_version** +> VersionConfig get_lake_fs_version() + + + +get version of lakeFS server + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import config_api +from lakefs_client.model.version_config import VersionConfig +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = config_api.ConfigApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.get_lake_fs_version() + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ConfigApi->get_lake_fs_version: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**VersionConfig**](VersionConfig.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | lakeFS version | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_setup_state** +> SetupState get_setup_state() + +check if the lakeFS installation is already set up + +### Example + + +```python +import time +import lakefs_client +from lakefs_client.api import config_api +from lakefs_client.model.error import Error +from lakefs_client.model.setup_state import SetupState +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = config_api.ConfigApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # check if the lakeFS installation is already set up + api_response = api_instance.get_setup_state() + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ConfigApi->get_setup_state: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SetupState**](SetupState.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | lakeFS setup state | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_storage_config** +> StorageConfig get_storage_config() + + + +retrieve lakeFS storage configuration + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import config_api +from lakefs_client.model.error import Error +from lakefs_client.model.storage_config import StorageConfig +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = config_api.ConfigApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_response = api_instance.get_storage_config() + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ConfigApi->get_storage_config: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**StorageConfig**](StorageConfig.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | lakeFS storage configuration | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **setup** +> CredentialsWithSecret setup(setup) + +setup lakeFS and create a first user + +### Example + + +```python +import time +import lakefs_client +from lakefs_client.api import config_api +from lakefs_client.model.credentials_with_secret import CredentialsWithSecret +from lakefs_client.model.setup import Setup +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = config_api.ConfigApi(api_client) + setup = Setup( + username="username_example", + key=AccessKeyCredentials( + access_key_id="AKIAIOSFODNN7EXAMPLE", + secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + ), + ) # Setup | + + # example passing only required values which don't have defaults set + try: + # setup lakeFS and create a first user + api_response = api_instance.setup(setup) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ConfigApi->setup: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **setup** | [**Setup**](Setup.md)| | + +### Return type + +[**CredentialsWithSecret**](CredentialsWithSecret.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | user created successfully | - | +**400** | bad request | - | +**409** | setup was already called | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **setup_comm_prefs** +> NextStep setup_comm_prefs(comm_prefs_input) + +setup communications preferences + +### Example + + +```python +import time +import lakefs_client +from lakefs_client.api import config_api +from lakefs_client.model.comm_prefs_input import CommPrefsInput +from lakefs_client.model.error import Error +from lakefs_client.model.next_step import NextStep +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = config_api.ConfigApi(api_client) + comm_prefs_input = CommPrefsInput( + email="email_example", + feature_updates=True, + security_updates=True, + ) # CommPrefsInput | + + # example passing only required values which don't have defaults set + try: + # setup communications preferences + api_response = api_instance.setup_comm_prefs(comm_prefs_input) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ConfigApi->setup_comm_prefs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **comm_prefs_input** | [**CommPrefsInput**](CommPrefsInput.md)| | + +### Return type + +[**NextStep**](NextStep.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | communication preferences saved successfully | - | +**409** | setup was already completed | - | +**412** | wrong setup state for this operation | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/Credentials.md b/clients/python/docs/Credentials.md new file mode 100644 index 00000000000..1312c83a031 --- /dev/null +++ b/clients/python/docs/Credentials.md @@ -0,0 +1,13 @@ +# Credentials + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key_id** | **str** | | +**creation_date** | **int** | Unix Epoch in seconds | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/CredentialsList.md b/clients/python/docs/CredentialsList.md new file mode 100644 index 00000000000..f96a413cda1 --- /dev/null +++ b/clients/python/docs/CredentialsList.md @@ -0,0 +1,13 @@ +# CredentialsList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[Credentials]**](Credentials.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/CredentialsWithSecret.md b/clients/python/docs/CredentialsWithSecret.md new file mode 100644 index 00000000000..bef0aed764c --- /dev/null +++ b/clients/python/docs/CredentialsWithSecret.md @@ -0,0 +1,14 @@ +# CredentialsWithSecret + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key_id** | **str** | | +**secret_access_key** | **str** | | +**creation_date** | **int** | Unix Epoch in seconds | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/CurrentUser.md b/clients/python/docs/CurrentUser.md new file mode 100644 index 00000000000..27560761bea --- /dev/null +++ b/clients/python/docs/CurrentUser.md @@ -0,0 +1,12 @@ +# CurrentUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [**User**](User.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Diff.md b/clients/python/docs/Diff.md new file mode 100644 index 00000000000..7247f664645 --- /dev/null +++ b/clients/python/docs/Diff.md @@ -0,0 +1,15 @@ +# Diff + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**path** | **str** | | +**path_type** | **str** | | +**size_bytes** | **int** | represents the size of the added/changed/deleted entry | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/DiffList.md b/clients/python/docs/DiffList.md new file mode 100644 index 00000000000..04d04562a30 --- /dev/null +++ b/clients/python/docs/DiffList.md @@ -0,0 +1,13 @@ +# DiffList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[Diff]**](Diff.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Error.md b/clients/python/docs/Error.md new file mode 100644 index 00000000000..fb2e93baa58 --- /dev/null +++ b/clients/python/docs/Error.md @@ -0,0 +1,12 @@ +# Error + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | short message explaining the error | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ExperimentalApi.md b/clients/python/docs/ExperimentalApi.md new file mode 100644 index 00000000000..33c156f94de --- /dev/null +++ b/clients/python/docs/ExperimentalApi.md @@ -0,0 +1,125 @@ +# lakefs_client.ExperimentalApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**otf_diff**](ExperimentalApi.md#otf_diff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff + + +# **otf_diff** +> OtfDiffList otf_diff(repository, left_ref, right_ref, table_path, type) + +perform otf diff + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import experimental_api +from lakefs_client.model.otf_diff_list import OtfDiffList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = experimental_api.ExperimentalApi(api_client) + repository = "repository_example" # str | + left_ref = "left_ref_example" # str | + right_ref = "right_ref_example" # str | + table_path = "table_path_example" # str | a path to the table location under the specified ref. + type = "type_example" # str | the type of otf + + # example passing only required values which don't have defaults set + try: + # perform otf diff + api_response = api_instance.otf_diff(repository, left_ref, right_ref, table_path, type) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ExperimentalApi->otf_diff: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **left_ref** | **str**| | + **right_ref** | **str**| | + **table_path** | **str**| a path to the table location under the specified ref. | + **type** | **str**| the type of otf | + +### Return type + +[**OtfDiffList**](OtfDiffList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | diff list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/FindMergeBaseResult.md b/clients/python/docs/FindMergeBaseResult.md new file mode 100644 index 00000000000..7789f05aa44 --- /dev/null +++ b/clients/python/docs/FindMergeBaseResult.md @@ -0,0 +1,14 @@ +# FindMergeBaseResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_commit_id** | **str** | The commit ID of the merge source | +**destination_commit_id** | **str** | The commit ID of the merge destination | +**base_commit_id** | **str** | The commit ID of the merge base | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ForgotPasswordRequest.md b/clients/python/docs/ForgotPasswordRequest.md new file mode 100644 index 00000000000..ab61e973795 --- /dev/null +++ b/clients/python/docs/ForgotPasswordRequest.md @@ -0,0 +1,12 @@ +# ForgotPasswordRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/GarbageCollectionConfig.md b/clients/python/docs/GarbageCollectionConfig.md new file mode 100644 index 00000000000..ebf33ddca7b --- /dev/null +++ b/clients/python/docs/GarbageCollectionConfig.md @@ -0,0 +1,12 @@ +# GarbageCollectionConfig + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**grace_period** | **int** | Duration in seconds. Objects created in the recent grace_period will not be collected. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/GarbageCollectionPrepareRequest.md b/clients/python/docs/GarbageCollectionPrepareRequest.md new file mode 100644 index 00000000000..d06de32510d --- /dev/null +++ b/clients/python/docs/GarbageCollectionPrepareRequest.md @@ -0,0 +1,12 @@ +# GarbageCollectionPrepareRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous_run_id** | **str** | run id of a previous successful GC job | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/GarbageCollectionPrepareResponse.md b/clients/python/docs/GarbageCollectionPrepareResponse.md new file mode 100644 index 00000000000..98eca70eb99 --- /dev/null +++ b/clients/python/docs/GarbageCollectionPrepareResponse.md @@ -0,0 +1,14 @@ +# GarbageCollectionPrepareResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**run_id** | **str** | a unique identifier generated for this GC job | +**gc_commits_location** | **str** | location of the resulting commits csv table (partitioned by run_id) | +**gc_addresses_location** | **str** | location to use for expired addresses parquet table (partitioned by run_id) | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/GarbageCollectionRule.md b/clients/python/docs/GarbageCollectionRule.md new file mode 100644 index 00000000000..ee3b946ee29 --- /dev/null +++ b/clients/python/docs/GarbageCollectionRule.md @@ -0,0 +1,13 @@ +# GarbageCollectionRule + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**branch_id** | **str** | | +**retention_days** | **int** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/GarbageCollectionRules.md b/clients/python/docs/GarbageCollectionRules.md new file mode 100644 index 00000000000..c0dbed3548b --- /dev/null +++ b/clients/python/docs/GarbageCollectionRules.md @@ -0,0 +1,13 @@ +# GarbageCollectionRules + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_retention_days** | **int** | | +**branches** | [**[GarbageCollectionRule]**](GarbageCollectionRule.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Group.md b/clients/python/docs/Group.md new file mode 100644 index 00000000000..be35bc7471d --- /dev/null +++ b/clients/python/docs/Group.md @@ -0,0 +1,13 @@ +# Group + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**creation_date** | **int** | Unix Epoch in seconds | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/GroupCreation.md b/clients/python/docs/GroupCreation.md new file mode 100644 index 00000000000..d95d37a85bd --- /dev/null +++ b/clients/python/docs/GroupCreation.md @@ -0,0 +1,12 @@ +# GroupCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/GroupList.md b/clients/python/docs/GroupList.md new file mode 100644 index 00000000000..d9cfdd71c4f --- /dev/null +++ b/clients/python/docs/GroupList.md @@ -0,0 +1,13 @@ +# GroupList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[Group]**](Group.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/HealthCheckApi.md b/clients/python/docs/HealthCheckApi.md new file mode 100644 index 00000000000..2313e1fd40d --- /dev/null +++ b/clients/python/docs/HealthCheckApi.md @@ -0,0 +1,69 @@ +# lakefs_client.HealthCheckApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**health_check**](HealthCheckApi.md#health_check) | **GET** /healthcheck | + + +# **health_check** +> health_check() + + + +check that the API server is up and running + +### Example + + +```python +import time +import lakefs_client +from lakefs_client.api import health_check_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = health_check_api.HealthCheckApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + api_instance.health_check() + except lakefs_client.ApiException as e: + print("Exception when calling HealthCheckApi->health_check: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | NoContent | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/HookRun.md b/clients/python/docs/HookRun.md new file mode 100644 index 00000000000..ce53b9b7558 --- /dev/null +++ b/clients/python/docs/HookRun.md @@ -0,0 +1,17 @@ +# HookRun + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hook_run_id** | **str** | | +**action** | **str** | | +**hook_id** | **str** | | +**start_time** | **datetime** | | +**status** | **str** | | +**end_time** | **datetime** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/HookRunList.md b/clients/python/docs/HookRunList.md new file mode 100644 index 00000000000..70021ae470e --- /dev/null +++ b/clients/python/docs/HookRunList.md @@ -0,0 +1,13 @@ +# HookRunList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[HookRun]**](HookRun.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ImportApi.md b/clients/python/docs/ImportApi.md new file mode 100644 index 00000000000..ca5b85b128b --- /dev/null +++ b/clients/python/docs/ImportApi.md @@ -0,0 +1,248 @@ +# lakefs_client.ImportApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_meta_range**](ImportApi.md#create_meta_range) | **POST** /repositories/{repository}/branches/metaranges | create a lakeFS metarange file from the given ranges +[**ingest_range**](ImportApi.md#ingest_range) | **POST** /repositories/{repository}/branches/ranges | create a lakeFS range file from the source uri + + +# **create_meta_range** +> MetaRangeCreationResponse create_meta_range(repository, meta_range_creation) + +create a lakeFS metarange file from the given ranges + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import import_api +from lakefs_client.model.meta_range_creation import MetaRangeCreation +from lakefs_client.model.meta_range_creation_response import MetaRangeCreationResponse +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = import_api.ImportApi(api_client) + repository = "repository_example" # str | + meta_range_creation = MetaRangeCreation( + ranges=[ + RangeMetadata( + id="480e19972a6fbe98ab8e81ae5efdfd1a29037587e91244e87abd4adefffdb01c", + min_key="production/collections/some/file_1.parquet", + max_key="production/collections/some/file_8229.parquet", + count=1, + estimated_size=1, + ), + ], + ) # MetaRangeCreation | + + # example passing only required values which don't have defaults set + try: + # create a lakeFS metarange file from the given ranges + api_response = api_instance.create_meta_range(repository, meta_range_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ImportApi->create_meta_range: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **meta_range_creation** | [**MetaRangeCreation**](MetaRangeCreation.md)| | + +### Return type + +[**MetaRangeCreationResponse**](MetaRangeCreationResponse.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | metarange metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ingest_range** +> IngestRangeCreationResponse ingest_range(repository, stage_range_creation) + +create a lakeFS range file from the source uri + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import import_api +from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse +from lakefs_client.model.stage_range_creation import StageRangeCreation +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = import_api.ImportApi(api_client) + repository = "repository_example" # str | + stage_range_creation = StageRangeCreation( + from_source_uri="s3://my-bucket/production/collections/", + after="production/collections/some/file.parquet", + prepend="collections/", + continuation_token="continuation_token_example", + ) # StageRangeCreation | + + # example passing only required values which don't have defaults set + try: + # create a lakeFS range file from the source uri + api_response = api_instance.ingest_range(repository, stage_range_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ImportApi->ingest_range: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **stage_range_creation** | [**StageRangeCreation**](StageRangeCreation.md)| | + +### Return type + +[**IngestRangeCreationResponse**](IngestRangeCreationResponse.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | range metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/ImportPagination.md b/clients/python/docs/ImportPagination.md new file mode 100644 index 00000000000..fd17efbafcc --- /dev/null +++ b/clients/python/docs/ImportPagination.md @@ -0,0 +1,14 @@ +# ImportPagination + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_more** | **bool** | More keys to be ingested. | +**last_key** | **str** | Last object store key that was ingested. | +**continuation_token** | **str** | Opaque. Token used to import the next range. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/IngestRangeCreationResponse.md b/clients/python/docs/IngestRangeCreationResponse.md new file mode 100644 index 00000000000..55637f92b4e --- /dev/null +++ b/clients/python/docs/IngestRangeCreationResponse.md @@ -0,0 +1,13 @@ +# IngestRangeCreationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**range** | [**RangeMetadata**](RangeMetadata.md) | | [optional] +**pagination** | [**ImportPagination**](ImportPagination.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/InlineObject1.md b/clients/python/docs/InlineObject1.md new file mode 100644 index 00000000000..4c2a7dc74f0 --- /dev/null +++ b/clients/python/docs/InlineObject1.md @@ -0,0 +1,12 @@ +# InlineObject1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pattern** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/LoginConfig.md b/clients/python/docs/LoginConfig.md new file mode 100644 index 00000000000..300a544db44 --- /dev/null +++ b/clients/python/docs/LoginConfig.md @@ -0,0 +1,18 @@ +# LoginConfig + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**login_url** | **str** | primary URL to use for login. | +**login_cookie_names** | **[str]** | cookie names used to store JWT | +**logout_url** | **str** | URL to use for logging out. | +**rbac** | **str** | RBAC will remain enabled on GUI if \"external\". That only works with an external auth service. | [optional] +**login_failed_message** | **str** | message to display to users who fail to login; a full sentence that is rendered in HTML and may contain a link to a secondary login method | [optional] +**fallback_login_url** | **str** | secondary URL to offer users to use for login. | [optional] +**fallback_login_label** | **str** | label to place on fallback_login_url. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/LoginInformation.md b/clients/python/docs/LoginInformation.md new file mode 100644 index 00000000000..41d915f08eb --- /dev/null +++ b/clients/python/docs/LoginInformation.md @@ -0,0 +1,13 @@ +# LoginInformation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key_id** | **str** | | +**secret_access_key** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Merge.md b/clients/python/docs/Merge.md new file mode 100644 index 00000000000..4a10db2a78e --- /dev/null +++ b/clients/python/docs/Merge.md @@ -0,0 +1,14 @@ +# Merge + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**metadata** | **{str: (str,)}** | | [optional] +**strategy** | **str** | In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/MergeResult.md b/clients/python/docs/MergeResult.md new file mode 100644 index 00000000000..7d3395dcc8d --- /dev/null +++ b/clients/python/docs/MergeResult.md @@ -0,0 +1,13 @@ +# MergeResult + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference** | **str** | | +**summary** | [**MergeResultSummary**](MergeResultSummary.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/MergeResultSummary.md b/clients/python/docs/MergeResultSummary.md new file mode 100644 index 00000000000..a7915ffb251 --- /dev/null +++ b/clients/python/docs/MergeResultSummary.md @@ -0,0 +1,15 @@ +# MergeResultSummary + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**added** | **int** | Deprecated: inaccurate and will be removed. | [optional] +**removed** | **int** | Deprecated: inaccurate and will be removed. | [optional] +**changed** | **int** | Deprecated: inaccurate and will be removed. | [optional] +**conflict** | **int** | Deprecated: inaccurate and will be removed. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/MetaRangeCreation.md b/clients/python/docs/MetaRangeCreation.md new file mode 100644 index 00000000000..16b819dc0f7 --- /dev/null +++ b/clients/python/docs/MetaRangeCreation.md @@ -0,0 +1,12 @@ +# MetaRangeCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ranges** | [**[RangeMetadata]**](RangeMetadata.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/MetaRangeCreationResponse.md b/clients/python/docs/MetaRangeCreationResponse.md new file mode 100644 index 00000000000..ff9dd851f80 --- /dev/null +++ b/clients/python/docs/MetaRangeCreationResponse.md @@ -0,0 +1,12 @@ +# MetaRangeCreationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The id of the created metarange | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/MetadataApi.md b/clients/python/docs/MetadataApi.md new file mode 100644 index 00000000000..46180afdd82 --- /dev/null +++ b/clients/python/docs/MetadataApi.md @@ -0,0 +1,349 @@ +# lakefs_client.MetadataApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_symlink_file**](MetadataApi.md#create_symlink_file) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory +[**get_meta_range**](MetadataApi.md#get_meta_range) | **GET** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file +[**get_range**](MetadataApi.md#get_range) | **GET** /repositories/{repository}/metadata/range/{range} | return URI to a range file + + +# **create_symlink_file** +> StorageURI create_symlink_file(repository, branch) + +creates symlink files corresponding to the given directory + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import metadata_api +from lakefs_client.model.error import Error +from lakefs_client.model.storage_uri import StorageURI +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = metadata_api.MetadataApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + location = "location_example" # str | path to the table data (optional) + + # example passing only required values which don't have defaults set + try: + # creates symlink files corresponding to the given directory + api_response = api_instance.create_symlink_file(repository, branch) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling MetadataApi->create_symlink_file: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # creates symlink files corresponding to the given directory + api_response = api_instance.create_symlink_file(repository, branch, location=location) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling MetadataApi->create_symlink_file: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **location** | **str**| path to the table data | [optional] + +### Return type + +[**StorageURI**](StorageURI.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | location created | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_meta_range** +> StorageURI get_meta_range(repository, meta_range) + +return URI to a meta-range file + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import metadata_api +from lakefs_client.model.error import Error +from lakefs_client.model.storage_uri import StorageURI +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = metadata_api.MetadataApi(api_client) + repository = "repository_example" # str | + meta_range = "meta_range_example" # str | + + # example passing only required values which don't have defaults set + try: + # return URI to a meta-range file + api_response = api_instance.get_meta_range(repository, meta_range) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling MetadataApi->get_meta_range: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **meta_range** | **str**| | + +### Return type + +[**StorageURI**](StorageURI.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | meta-range URI | * Location - redirect to S3
| +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_range** +> StorageURI get_range(repository, range) + +return URI to a range file + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import metadata_api +from lakefs_client.model.error import Error +from lakefs_client.model.storage_uri import StorageURI +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = metadata_api.MetadataApi(api_client) + repository = "repository_example" # str | + range = "range_example" # str | + + # example passing only required values which don't have defaults set + try: + # return URI to a range file + api_response = api_instance.get_range(repository, range) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling MetadataApi->get_range: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **range** | **str**| | + +### Return type + +[**StorageURI**](StorageURI.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | range URI | * Location - redirect to S3
| +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/NextStep.md b/clients/python/docs/NextStep.md new file mode 100644 index 00000000000..b1cf2ccfab6 --- /dev/null +++ b/clients/python/docs/NextStep.md @@ -0,0 +1,12 @@ +# NextStep + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next_step** | **str** | the next step in the setup process | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectCopyCreation.md b/clients/python/docs/ObjectCopyCreation.md new file mode 100644 index 00000000000..f4ca6408114 --- /dev/null +++ b/clients/python/docs/ObjectCopyCreation.md @@ -0,0 +1,13 @@ +# ObjectCopyCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**src_path** | **str** | path of the copied object relative to the ref | +**src_ref** | **str** | a reference, if empty uses the provided branch as ref | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectError.md b/clients/python/docs/ObjectError.md new file mode 100644 index 00000000000..816796959f5 --- /dev/null +++ b/clients/python/docs/ObjectError.md @@ -0,0 +1,14 @@ +# ObjectError + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status_code** | **int** | HTTP status code associated for operation on path | +**message** | **str** | short message explaining status_code | +**path** | **str** | affected path | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectErrorList.md b/clients/python/docs/ObjectErrorList.md new file mode 100644 index 00000000000..5d05052a02d --- /dev/null +++ b/clients/python/docs/ObjectErrorList.md @@ -0,0 +1,12 @@ +# ObjectErrorList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[ObjectError]**](ObjectError.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectStageCreation.md b/clients/python/docs/ObjectStageCreation.md new file mode 100644 index 00000000000..33080cf08c4 --- /dev/null +++ b/clients/python/docs/ObjectStageCreation.md @@ -0,0 +1,17 @@ +# ObjectStageCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**physical_address** | **str** | | +**checksum** | **str** | | +**size_bytes** | **int** | | +**mtime** | **int** | Unix Epoch in seconds | [optional] +**metadata** | [**ObjectUserMetadata**](ObjectUserMetadata.md) | | [optional] +**content_type** | **str** | Object media type | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectStats.md b/clients/python/docs/ObjectStats.md new file mode 100644 index 00000000000..c2c9b7ef9ff --- /dev/null +++ b/clients/python/docs/ObjectStats.md @@ -0,0 +1,19 @@ +# ObjectStats + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | | +**path_type** | **str** | | +**physical_address** | **str** | The location of the object on the underlying object store. Formatted as a native URI with the object store type as scheme (\"s3://...\", \"gs://...\", etc.) Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET | +**checksum** | **str** | | +**mtime** | **int** | Unix Epoch in seconds | +**size_bytes** | **int** | | [optional] +**metadata** | [**ObjectUserMetadata**](ObjectUserMetadata.md) | | [optional] +**content_type** | **str** | Object media type | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectStatsList.md b/clients/python/docs/ObjectStatsList.md new file mode 100644 index 00000000000..4a7663eab5e --- /dev/null +++ b/clients/python/docs/ObjectStatsList.md @@ -0,0 +1,13 @@ +# ObjectStatsList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[ObjectStats]**](ObjectStats.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectUserMetadata.md b/clients/python/docs/ObjectUserMetadata.md new file mode 100644 index 00000000000..879e0591251 --- /dev/null +++ b/clients/python/docs/ObjectUserMetadata.md @@ -0,0 +1,11 @@ +# ObjectUserMetadata + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **str** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ObjectsApi.md b/clients/python/docs/ObjectsApi.md new file mode 100644 index 00000000000..633c9bf69bb --- /dev/null +++ b/clients/python/docs/ObjectsApi.md @@ -0,0 +1,1229 @@ +# lakefs_client.ObjectsApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**copy_object**](ObjectsApi.md#copy_object) | **POST** /repositories/{repository}/branches/{branch}/objects/copy | create a copy of an object +[**delete_object**](ObjectsApi.md#delete_object) | **DELETE** /repositories/{repository}/branches/{branch}/objects | delete object. Missing objects will not return a NotFound error. +[**delete_objects**](ObjectsApi.md#delete_objects) | **POST** /repositories/{repository}/branches/{branch}/objects/delete | delete objects. Missing objects will not return a NotFound error. +[**get_object**](ObjectsApi.md#get_object) | **GET** /repositories/{repository}/refs/{ref}/objects | get object content +[**get_underlying_properties**](ObjectsApi.md#get_underlying_properties) | **GET** /repositories/{repository}/refs/{ref}/objects/underlyingProperties | get object properties on underlying storage +[**head_object**](ObjectsApi.md#head_object) | **HEAD** /repositories/{repository}/refs/{ref}/objects | check if object exists +[**list_objects**](ObjectsApi.md#list_objects) | **GET** /repositories/{repository}/refs/{ref}/objects/ls | list objects under a given prefix +[**stage_object**](ObjectsApi.md#stage_object) | **PUT** /repositories/{repository}/branches/{branch}/objects | stage an object's metadata for the given branch +[**stat_object**](ObjectsApi.md#stat_object) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata +[**upload_object**](ObjectsApi.md#upload_object) | **POST** /repositories/{repository}/branches/{branch}/objects | + + +# **copy_object** +> ObjectStats copy_object(repository, branch, dest_path, object_copy_creation) + +create a copy of an object + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.object_copy_creation import ObjectCopyCreation +from lakefs_client.model.error import Error +from lakefs_client.model.object_stats import ObjectStats +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | destination branch for the copy + dest_path = "dest_path_example" # str | destination path relative to the branch + object_copy_creation = ObjectCopyCreation( + src_path="src_path_example", + src_ref="src_ref_example", + ) # ObjectCopyCreation | + + # example passing only required values which don't have defaults set + try: + # create a copy of an object + api_response = api_instance.copy_object(repository, branch, dest_path, object_copy_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->copy_object: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| destination branch for the copy | + **dest_path** | **str**| destination path relative to the branch | + **object_copy_creation** | [**ObjectCopyCreation**](ObjectCopyCreation.md)| | + +### Return type + +[**ObjectStats**](ObjectStats.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Copy object response | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_object** +> delete_object(repository, branch, path) + +delete object. Missing objects will not return a NotFound error. + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + path = "path_example" # str | relative to the branch + + # example passing only required values which don't have defaults set + try: + # delete object. Missing objects will not return a NotFound error. + api_instance.delete_object(repository, branch, path) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->delete_object: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **path** | **str**| relative to the branch | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | object deleted successfully | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_objects** +> ObjectErrorList delete_objects(repository, branch, path_list) + +delete objects. Missing objects will not return a NotFound error. + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.object_error_list import ObjectErrorList +from lakefs_client.model.error import Error +from lakefs_client.model.path_list import PathList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + path_list = PathList( + paths=[ + "paths_example", + ], + ) # PathList | + + # example passing only required values which don't have defaults set + try: + # delete objects. Missing objects will not return a NotFound error. + api_response = api_instance.delete_objects(repository, branch, path_list) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->delete_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **path_list** | [**PathList**](PathList.md)| | + +### Return type + +[**ObjectErrorList**](ObjectErrorList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Delete objects response | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_object** +> file_type get_object(repository, ref, path) + +get object content + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + ref = "ref_example" # str | a reference (could be either a branch or a commit ID) + path = "path_example" # str | relative to the ref + range = "bytes=0-1023" # str | Byte range to retrieve (optional) + presign = True # bool | (optional) + + # example passing only required values which don't have defaults set + try: + # get object content + api_response = api_instance.get_object(repository, ref, path) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->get_object: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # get object content + api_response = api_instance.get_object(repository, ref, path, range=range, presign=presign) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->get_object: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **ref** | **str**| a reference (could be either a branch or a commit ID) | + **path** | **str**| relative to the ref | + **range** | **str**| Byte range to retrieve | [optional] + **presign** | **bool**| | [optional] + +### Return type + +**file_type** + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | object content | * Content-Length -
* Last-Modified -
* ETag -
| +**206** | partial object content | * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
| +**302** | Redirect to a pre-signed URL for the object | * Location - redirect to S3
| +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**410** | object expired | - | +**416** | Requested Range Not Satisfiable | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_underlying_properties** +> UnderlyingObjectProperties get_underlying_properties(repository, ref, path) + +get object properties on underlying storage + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.underlying_object_properties import UnderlyingObjectProperties +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + ref = "ref_example" # str | a reference (could be either a branch or a commit ID) + path = "path_example" # str | relative to the branch + + # example passing only required values which don't have defaults set + try: + # get object properties on underlying storage + api_response = api_instance.get_underlying_properties(repository, ref, path) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->get_underlying_properties: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **ref** | **str**| a reference (could be either a branch or a commit ID) | + **path** | **str**| relative to the branch | + +### Return type + +[**UnderlyingObjectProperties**](UnderlyingObjectProperties.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | object metadata on underlying storage | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **head_object** +> head_object(repository, ref, path) + +check if object exists + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + ref = "ref_example" # str | a reference (could be either a branch or a commit ID) + path = "path_example" # str | relative to the ref + range = "bytes=0-1023" # str | Byte range to retrieve (optional) + + # example passing only required values which don't have defaults set + try: + # check if object exists + api_instance.head_object(repository, ref, path) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->head_object: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # check if object exists + api_instance.head_object(repository, ref, path, range=range) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->head_object: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **ref** | **str**| a reference (could be either a branch or a commit ID) | + **path** | **str**| relative to the ref | + **range** | **str**| Byte range to retrieve | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | object exists | * Content-Length -
* Last-Modified -
* ETag -
| +**206** | partial object content info | * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
| +**401** | Unauthorized | - | +**404** | object not found | - | +**410** | object expired | - | +**416** | Requested Range Not Satisfiable | - | +**0** | internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_objects** +> ObjectStatsList list_objects(repository, ref) + +list objects under a given prefix + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.object_stats_list import ObjectStatsList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + ref = "ref_example" # str | a reference (could be either a branch or a commit ID) + user_metadata = True # bool | (optional) if omitted the server will use the default value of True + presign = True # bool | (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + delimiter = "delimiter_example" # str | delimiter used to group common prefixes by (optional) + prefix = "prefix_example" # str | return items prefixed with this value (optional) + + # example passing only required values which don't have defaults set + try: + # list objects under a given prefix + api_response = api_instance.list_objects(repository, ref) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->list_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list objects under a given prefix + api_response = api_instance.list_objects(repository, ref, user_metadata=user_metadata, presign=presign, after=after, amount=amount, delimiter=delimiter, prefix=prefix) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->list_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **ref** | **str**| a reference (could be either a branch or a commit ID) | + **user_metadata** | **bool**| | [optional] if omitted the server will use the default value of True + **presign** | **bool**| | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + **delimiter** | **str**| delimiter used to group common prefixes by | [optional] + **prefix** | **str**| return items prefixed with this value | [optional] + +### Return type + +[**ObjectStatsList**](ObjectStatsList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | object listing | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **stage_object** +> ObjectStats stage_object(repository, branch, path, object_stage_creation) + +stage an object's metadata for the given branch + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.object_stage_creation import ObjectStageCreation +from lakefs_client.model.error import Error +from lakefs_client.model.object_stats import ObjectStats +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + path = "path_example" # str | relative to the branch + object_stage_creation = ObjectStageCreation( + physical_address="physical_address_example", + checksum="checksum_example", + size_bytes=1, + mtime=1, + metadata=ObjectUserMetadata( + key="key_example", + ), + content_type="content_type_example", + ) # ObjectStageCreation | + + # example passing only required values which don't have defaults set + try: + # stage an object's metadata for the given branch + api_response = api_instance.stage_object(repository, branch, path, object_stage_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->stage_object: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **path** | **str**| relative to the branch | + **object_stage_creation** | [**ObjectStageCreation**](ObjectStageCreation.md)| | + +### Return type + +[**ObjectStats**](ObjectStats.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | object metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **stat_object** +> ObjectStats stat_object(repository, ref, path) + +get object metadata + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.error import Error +from lakefs_client.model.object_stats import ObjectStats +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + ref = "ref_example" # str | a reference (could be either a branch or a commit ID) + path = "path_example" # str | relative to the branch + user_metadata = True # bool | (optional) if omitted the server will use the default value of True + presign = True # bool | (optional) + + # example passing only required values which don't have defaults set + try: + # get object metadata + api_response = api_instance.stat_object(repository, ref, path) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->stat_object: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # get object metadata + api_response = api_instance.stat_object(repository, ref, path, user_metadata=user_metadata, presign=presign) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->stat_object: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **ref** | **str**| a reference (could be either a branch or a commit ID) | + **path** | **str**| relative to the branch | + **user_metadata** | **bool**| | [optional] if omitted the server will use the default value of True + **presign** | **bool**| | [optional] + +### Return type + +[**ObjectStats**](ObjectStats.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | object metadata | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**410** | object gone (but partial metadata may be available) | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **upload_object** +> ObjectStats upload_object(repository, branch, path) + + + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import objects_api +from lakefs_client.model.error import Error +from lakefs_client.model.object_stats import ObjectStats +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = objects_api.ObjectsApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + path = "path_example" # str | relative to the branch + storage_class = "storageClass_example" # str | (optional) + if_none_match = "*" # str | Currently supports only \"*\" to allow uploading an object only if one doesn't exist yet (optional) + content = open('/path/to/file', 'rb') # file_type | Only a single file per upload which must be named \\\"content\\\". (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.upload_object(repository, branch, path) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->upload_object: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.upload_object(repository, branch, path, storage_class=storage_class, if_none_match=if_none_match, content=content) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling ObjectsApi->upload_object: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **path** | **str**| relative to the branch | + **storage_class** | **str**| | [optional] + **if_none_match** | **str**| Currently supports only \"*\" to allow uploading an object only if one doesn't exist yet | [optional] + **content** | **file_type**| Only a single file per upload which must be named \\\"content\\\". | [optional] + +### Return type + +[**ObjectStats**](ObjectStats.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | object metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/OtfDiffApi.md b/clients/python/docs/OtfDiffApi.md new file mode 100644 index 00000000000..fe35d4d0c04 --- /dev/null +++ b/clients/python/docs/OtfDiffApi.md @@ -0,0 +1,125 @@ +# lakefs_client.OtfDiffApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**otf_diff**](OtfDiffApi.md#otf_diff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff + + +# **otf_diff** +> OtfDiffList otf_diff(repository, left_ref, right_ref, table_path, type) + +perform otf diff + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import otf_diff_api +from lakefs_client.model.otf_diff_list import OtfDiffList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = otf_diff_api.OtfDiffApi(api_client) + repository = "repository_example" # str | + left_ref = "left_ref_example" # str | + right_ref = "right_ref_example" # str | + table_path = "table_path_example" # str | a path to the table location under the specified ref. + type = "type_example" # str | the type of otf + + # example passing only required values which don't have defaults set + try: + # perform otf diff + api_response = api_instance.otf_diff(repository, left_ref, right_ref, table_path, type) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling OtfDiffApi->otf_diff: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **left_ref** | **str**| | + **right_ref** | **str**| | + **table_path** | **str**| a path to the table location under the specified ref. | + **type** | **str**| the type of otf | + +### Return type + +[**OtfDiffList**](OtfDiffList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | diff list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**412** | Precondition Failed | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/OtfDiffEntry.md b/clients/python/docs/OtfDiffEntry.md new file mode 100644 index 00000000000..3e5de1d2d3d --- /dev/null +++ b/clients/python/docs/OtfDiffEntry.md @@ -0,0 +1,16 @@ +# OtfDiffEntry + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**timestamp** | **int** | | +**operation** | **str** | | +**operation_content** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | free form content describing the returned operation diff | +**operation_type** | **str** | the operation category (CUD) | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/OtfDiffList.md b/clients/python/docs/OtfDiffList.md new file mode 100644 index 00000000000..ec1ce0d7d42 --- /dev/null +++ b/clients/python/docs/OtfDiffList.md @@ -0,0 +1,13 @@ +# OtfDiffList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**[OtfDiffEntry]**](OtfDiffEntry.md) | | +**diff_type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Pagination.md b/clients/python/docs/Pagination.md new file mode 100644 index 00000000000..d559ce2b288 --- /dev/null +++ b/clients/python/docs/Pagination.md @@ -0,0 +1,15 @@ +# Pagination + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_more** | **bool** | Next page is available | +**next_offset** | **str** | Token used to retrieve the next page | +**results** | **int** | Number of values found in the results | +**max_per_page** | **int** | Maximal number of entries per page | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/PathList.md b/clients/python/docs/PathList.md new file mode 100644 index 00000000000..1b208a6c191 --- /dev/null +++ b/clients/python/docs/PathList.md @@ -0,0 +1,12 @@ +# PathList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**paths** | **[str]** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Policy.md b/clients/python/docs/Policy.md new file mode 100644 index 00000000000..8a943039cd8 --- /dev/null +++ b/clients/python/docs/Policy.md @@ -0,0 +1,14 @@ +# Policy + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**statement** | [**[Statement]**](Statement.md) | | +**creation_date** | **int** | Unix Epoch in seconds | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/PolicyList.md b/clients/python/docs/PolicyList.md new file mode 100644 index 00000000000..6c9fd4f207d --- /dev/null +++ b/clients/python/docs/PolicyList.md @@ -0,0 +1,13 @@ +# PolicyList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[Policy]**](Policy.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/PrepareGCUncommittedRequest.md b/clients/python/docs/PrepareGCUncommittedRequest.md new file mode 100644 index 00000000000..7508fd4b002 --- /dev/null +++ b/clients/python/docs/PrepareGCUncommittedRequest.md @@ -0,0 +1,12 @@ +# PrepareGCUncommittedRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**continuation_token** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/PrepareGCUncommittedResponse.md b/clients/python/docs/PrepareGCUncommittedResponse.md new file mode 100644 index 00000000000..4fe9c9741c5 --- /dev/null +++ b/clients/python/docs/PrepareGCUncommittedResponse.md @@ -0,0 +1,14 @@ +# PrepareGCUncommittedResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**run_id** | **str** | | +**gc_uncommitted_location** | **str** | location of uncommitted information data | +**continuation_token** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/RangeMetadata.md b/clients/python/docs/RangeMetadata.md new file mode 100644 index 00000000000..828547b9d03 --- /dev/null +++ b/clients/python/docs/RangeMetadata.md @@ -0,0 +1,16 @@ +# RangeMetadata + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the range. | +**min_key** | **str** | First key in the range. | +**max_key** | **str** | Last key in the range. | +**count** | **int** | Number of records in the range. | +**estimated_size** | **int** | Estimated size of the range in bytes | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Ref.md b/clients/python/docs/Ref.md new file mode 100644 index 00000000000..9f449bf96fd --- /dev/null +++ b/clients/python/docs/Ref.md @@ -0,0 +1,13 @@ +# Ref + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**commit_id** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/RefList.md b/clients/python/docs/RefList.md new file mode 100644 index 00000000000..ae2784f41a9 --- /dev/null +++ b/clients/python/docs/RefList.md @@ -0,0 +1,13 @@ +# RefList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[Ref]**](Ref.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/RefsApi.md b/clients/python/docs/RefsApi.md new file mode 100644 index 00000000000..c55d0eac698 --- /dev/null +++ b/clients/python/docs/RefsApi.md @@ -0,0 +1,742 @@ +# lakefs_client.RefsApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**diff_refs**](RefsApi.md#diff_refs) | **GET** /repositories/{repository}/refs/{leftRef}/diff/{rightRef} | diff references +[**dump_refs**](RefsApi.md#dump_refs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store +[**find_merge_base**](RefsApi.md#find_merge_base) | **GET** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | find the merge base for 2 references +[**log_commits**](RefsApi.md#log_commits) | **GET** /repositories/{repository}/refs/{ref}/commits | get commit log from ref. If both objects and prefixes are empty, return all commits. +[**merge_into_branch**](RefsApi.md#merge_into_branch) | **POST** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | merge references +[**restore_refs**](RefsApi.md#restore_refs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store + + +# **diff_refs** +> DiffList diff_refs(repository, left_ref, right_ref) + +diff references + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import refs_api +from lakefs_client.model.diff_list import DiffList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = refs_api.RefsApi(api_client) + repository = "repository_example" # str | + left_ref = "leftRef_example" # str | a reference (could be either a branch or a commit ID) + right_ref = "rightRef_example" # str | a reference (could be either a branch or a commit ID) to compare against + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + prefix = "prefix_example" # str | return items prefixed with this value (optional) + delimiter = "delimiter_example" # str | delimiter used to group common prefixes by (optional) + type = "three_dot" # str | (optional) if omitted the server will use the default value of "three_dot" + + # example passing only required values which don't have defaults set + try: + # diff references + api_response = api_instance.diff_refs(repository, left_ref, right_ref) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->diff_refs: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # diff references + api_response = api_instance.diff_refs(repository, left_ref, right_ref, after=after, amount=amount, prefix=prefix, delimiter=delimiter, type=type) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->diff_refs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **left_ref** | **str**| a reference (could be either a branch or a commit ID) | + **right_ref** | **str**| a reference (could be either a branch or a commit ID) to compare against | + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + **prefix** | **str**| return items prefixed with this value | [optional] + **delimiter** | **str**| delimiter used to group common prefixes by | [optional] + **type** | **str**| | [optional] if omitted the server will use the default value of "three_dot" + +### Return type + +[**DiffList**](DiffList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | diff between refs | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **dump_refs** +> RefsDump dump_refs(repository) + +Dump repository refs (tags, commits, branches) to object store + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import refs_api +from lakefs_client.model.refs_dump import RefsDump +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = refs_api.RefsApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + # Dump repository refs (tags, commits, branches) to object store + api_response = api_instance.dump_refs(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->dump_refs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + +### Return type + +[**RefsDump**](RefsDump.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | refs dump | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **find_merge_base** +> FindMergeBaseResult find_merge_base(repository, source_ref, destination_branch) + +find the merge base for 2 references + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import refs_api +from lakefs_client.model.find_merge_base_result import FindMergeBaseResult +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = refs_api.RefsApi(api_client) + repository = "repository_example" # str | + source_ref = "sourceRef_example" # str | source ref + destination_branch = "destinationBranch_example" # str | destination branch name + + # example passing only required values which don't have defaults set + try: + # find the merge base for 2 references + api_response = api_instance.find_merge_base(repository, source_ref, destination_branch) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->find_merge_base: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **source_ref** | **str**| source ref | + **destination_branch** | **str**| destination branch name | + +### Return type + +[**FindMergeBaseResult**](FindMergeBaseResult.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Found the merge base | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **log_commits** +> CommitList log_commits(repository, ref) + +get commit log from ref. If both objects and prefixes are empty, return all commits. + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import refs_api +from lakefs_client.model.commit_list import CommitList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = refs_api.RefsApi(api_client) + repository = "repository_example" # str | + ref = "ref_example" # str | + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + objects = [ + "objects_example", + ] # [str] | list of paths, each element is a path of a specific object (optional) + prefixes = [ + "prefixes_example", + ] # [str] | list of paths, each element is a path of a prefix (optional) + limit = True # bool | limit the number of items in return to 'amount'. Without further indication on actual number of items. (optional) + + # example passing only required values which don't have defaults set + try: + # get commit log from ref. If both objects and prefixes are empty, return all commits. + api_response = api_instance.log_commits(repository, ref) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->log_commits: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # get commit log from ref. If both objects and prefixes are empty, return all commits. + api_response = api_instance.log_commits(repository, ref, after=after, amount=amount, objects=objects, prefixes=prefixes, limit=limit) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->log_commits: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **ref** | **str**| | + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + **objects** | **[str]**| list of paths, each element is a path of a specific object | [optional] + **prefixes** | **[str]**| list of paths, each element is a path of a prefix | [optional] + **limit** | **bool**| limit the number of items in return to 'amount'. Without further indication on actual number of items. | [optional] + +### Return type + +[**CommitList**](CommitList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | commit log | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **merge_into_branch** +> MergeResult merge_into_branch(repository, source_ref, destination_branch) + +merge references + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import refs_api +from lakefs_client.model.merge import Merge +from lakefs_client.model.error import Error +from lakefs_client.model.merge_result import MergeResult +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = refs_api.RefsApi(api_client) + repository = "repository_example" # str | + source_ref = "sourceRef_example" # str | source ref + destination_branch = "destinationBranch_example" # str | destination branch name + merge = Merge( + message="message_example", + metadata={ + "key": "key_example", + }, + strategy="strategy_example", + ) # Merge | (optional) + + # example passing only required values which don't have defaults set + try: + # merge references + api_response = api_instance.merge_into_branch(repository, source_ref, destination_branch) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->merge_into_branch: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # merge references + api_response = api_instance.merge_into_branch(repository, source_ref, destination_branch, merge=merge) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->merge_into_branch: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **source_ref** | **str**| source ref | + **destination_branch** | **str**| destination branch name | + **merge** | [**Merge**](Merge.md)| | [optional] + +### Return type + +[**MergeResult**](MergeResult.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | merge completed | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Resource Not Found | - | +**409** | Conflict Deprecated: content schema will return Error format and not an empty MergeResult | - | +**412** | precondition failed (e.g. a pre-merge hook returned a failure) | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **restore_refs** +> restore_refs(repository, refs_dump) + +Restore repository refs (tags, commits, branches) from object store + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import refs_api +from lakefs_client.model.refs_dump import RefsDump +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = refs_api.RefsApi(api_client) + repository = "repository_example" # str | + refs_dump = RefsDump( + commits_meta_range_id="commits_meta_range_id_example", + tags_meta_range_id="tags_meta_range_id_example", + branches_meta_range_id="branches_meta_range_id_example", + ) # RefsDump | + + # example passing only required values which don't have defaults set + try: + # Restore repository refs (tags, commits, branches) from object store + api_instance.restore_refs(repository, refs_dump) + except lakefs_client.ApiException as e: + print("Exception when calling RefsApi->restore_refs: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **refs_dump** | [**RefsDump**](RefsDump.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | refs successfully loaded | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/RefsDump.md b/clients/python/docs/RefsDump.md new file mode 100644 index 00000000000..a1e0df47286 --- /dev/null +++ b/clients/python/docs/RefsDump.md @@ -0,0 +1,14 @@ +# RefsDump + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commits_meta_range_id** | **str** | | +**tags_meta_range_id** | **str** | | +**branches_meta_range_id** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/RepositoriesApi.md b/clients/python/docs/RepositoriesApi.md new file mode 100644 index 00000000000..a20edc0a544 --- /dev/null +++ b/clients/python/docs/RepositoriesApi.md @@ -0,0 +1,787 @@ +# lakefs_client.RepositoriesApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_branch_protection_rule**](RepositoriesApi.md#create_branch_protection_rule) | **POST** /repositories/{repository}/branch_protection | +[**create_repository**](RepositoriesApi.md#create_repository) | **POST** /repositories | create repository +[**delete_branch_protection_rule**](RepositoriesApi.md#delete_branch_protection_rule) | **DELETE** /repositories/{repository}/branch_protection | +[**delete_repository**](RepositoriesApi.md#delete_repository) | **DELETE** /repositories/{repository} | delete repository +[**get_branch_protection_rules**](RepositoriesApi.md#get_branch_protection_rules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +[**get_repository**](RepositoriesApi.md#get_repository) | **GET** /repositories/{repository} | get repository +[**list_repositories**](RepositoriesApi.md#list_repositories) | **GET** /repositories | list repositories + + +# **create_branch_protection_rule** +> create_branch_protection_rule(repository, branch_protection_rule) + + + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import repositories_api +from lakefs_client.model.error import Error +from lakefs_client.model.branch_protection_rule import BranchProtectionRule +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = repositories_api.RepositoriesApi(api_client) + repository = "repository_example" # str | + branch_protection_rule = BranchProtectionRule( + pattern="stable_*", + ) # BranchProtectionRule | + + # example passing only required values which don't have defaults set + try: + api_instance.create_branch_protection_rule(repository, branch_protection_rule) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->create_branch_protection_rule: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch_protection_rule** | [**BranchProtectionRule**](BranchProtectionRule.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | branch protection rule created successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_repository** +> Repository create_repository(repository_creation) + +create repository + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import repositories_api +from lakefs_client.model.repository import Repository +from lakefs_client.model.error import Error +from lakefs_client.model.repository_creation import RepositoryCreation +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = repositories_api.RepositoriesApi(api_client) + repository_creation = RepositoryCreation( + name="wr1c2v7s6djuy1zmeto", + storage_namespace="s3://example-bucket/", + default_branch="main", + ) # RepositoryCreation | + bare = False # bool | If true, create a bare repository with no initial commit and branch (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + # create repository + api_response = api_instance.create_repository(repository_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->create_repository: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create repository + api_response = api_instance.create_repository(repository_creation, bare=bare) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->create_repository: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository_creation** | [**RepositoryCreation**](RepositoryCreation.md)| | + **bare** | **bool**| If true, create a bare repository with no initial commit and branch | [optional] if omitted the server will use the default value of False + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | repository | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_branch_protection_rule** +> delete_branch_protection_rule(repository, inline_object1) + + + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import repositories_api +from lakefs_client.model.error import Error +from lakefs_client.model.inline_object1 import InlineObject1 +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = repositories_api.RepositoriesApi(api_client) + repository = "repository_example" # str | + inline_object1 = InlineObject1( + pattern="pattern_example", + ) # InlineObject1 | + + # example passing only required values which don't have defaults set + try: + api_instance.delete_branch_protection_rule(repository, inline_object1) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->delete_branch_protection_rule: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **inline_object1** | [**InlineObject1**](InlineObject1.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | branch protection rule deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_repository** +> delete_repository(repository) + +delete repository + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import repositories_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = repositories_api.RepositoriesApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete repository + api_instance.delete_repository(repository) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->delete_repository: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | repository deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_branch_protection_rules** +> [BranchProtectionRule] get_branch_protection_rules(repository) + +get branch protection rules + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import repositories_api +from lakefs_client.model.error import Error +from lakefs_client.model.branch_protection_rule import BranchProtectionRule +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = repositories_api.RepositoriesApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + # get branch protection rules + api_response = api_instance.get_branch_protection_rules(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->get_branch_protection_rules: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + +### Return type + +[**[BranchProtectionRule]**](BranchProtectionRule.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | branch protection rules | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_repository** +> Repository get_repository(repository) + +get repository + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import repositories_api +from lakefs_client.model.repository import Repository +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = repositories_api.RepositoriesApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + # get repository + api_response = api_instance.get_repository(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->get_repository: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | repository | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_repositories** +> RepositoryList list_repositories() + +list repositories + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import repositories_api +from lakefs_client.model.repository_list import RepositoryList +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = repositories_api.RepositoriesApi(api_client) + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + # and optional values + try: + # list repositories + api_response = api_instance.list_repositories(prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RepositoriesApi->list_repositories: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**RepositoryList**](RepositoryList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | repository list | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/Repository.md b/clients/python/docs/Repository.md new file mode 100644 index 00000000000..310da06b12c --- /dev/null +++ b/clients/python/docs/Repository.md @@ -0,0 +1,15 @@ +# Repository + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**creation_date** | **int** | Unix Epoch in seconds | +**default_branch** | **str** | | +**storage_namespace** | **str** | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/RepositoryCreation.md b/clients/python/docs/RepositoryCreation.md new file mode 100644 index 00000000000..48c1a8cee74 --- /dev/null +++ b/clients/python/docs/RepositoryCreation.md @@ -0,0 +1,14 @@ +# RepositoryCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**storage_namespace** | **str** | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | +**default_branch** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/RepositoryList.md b/clients/python/docs/RepositoryList.md new file mode 100644 index 00000000000..a492d43daf8 --- /dev/null +++ b/clients/python/docs/RepositoryList.md @@ -0,0 +1,13 @@ +# RepositoryList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[Repository]**](Repository.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/ResetCreation.md b/clients/python/docs/ResetCreation.md new file mode 100644 index 00000000000..80deaa6b503 --- /dev/null +++ b/clients/python/docs/ResetCreation.md @@ -0,0 +1,13 @@ +# ResetCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**path** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/RetentionApi.md b/clients/python/docs/RetentionApi.md new file mode 100644 index 00000000000..70bfb16f04e --- /dev/null +++ b/clients/python/docs/RetentionApi.md @@ -0,0 +1,581 @@ +# lakefs_client.RetentionApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_garbage_collection_rules**](RetentionApi.md#delete_garbage_collection_rules) | **DELETE** /repositories/{repository}/gc/rules | +[**get_garbage_collection_rules**](RetentionApi.md#get_garbage_collection_rules) | **GET** /repositories/{repository}/gc/rules | +[**prepare_garbage_collection_commits**](RetentionApi.md#prepare_garbage_collection_commits) | **POST** /repositories/{repository}/gc/prepare_commits | save lists of active and expired commits for garbage collection +[**prepare_garbage_collection_uncommitted**](RetentionApi.md#prepare_garbage_collection_uncommitted) | **POST** /repositories/{repository}/gc/prepare_uncommited | save repository uncommitted metadata for garbage collection +[**set_garbage_collection_rules**](RetentionApi.md#set_garbage_collection_rules) | **POST** /repositories/{repository}/gc/rules | + + +# **delete_garbage_collection_rules** +> delete_garbage_collection_rules(repository) + + + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import retention_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = retention_api.RetentionApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + api_instance.delete_garbage_collection_rules(repository) + except lakefs_client.ApiException as e: + print("Exception when calling RetentionApi->delete_garbage_collection_rules: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | deleted garbage collection rules successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_garbage_collection_rules** +> GarbageCollectionRules get_garbage_collection_rules(repository) + + + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import retention_api +from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = retention_api.RetentionApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_garbage_collection_rules(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RetentionApi->get_garbage_collection_rules: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + +### Return type + +[**GarbageCollectionRules**](GarbageCollectionRules.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | gc rule list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **prepare_garbage_collection_commits** +> GarbageCollectionPrepareResponse prepare_garbage_collection_commits(repository) + +save lists of active and expired commits for garbage collection + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import retention_api +from lakefs_client.model.error import Error +from lakefs_client.model.garbage_collection_prepare_response import GarbageCollectionPrepareResponse +from lakefs_client.model.garbage_collection_prepare_request import GarbageCollectionPrepareRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = retention_api.RetentionApi(api_client) + repository = "repository_example" # str | + garbage_collection_prepare_request = GarbageCollectionPrepareRequest( + previous_run_id="64eaa103-d726-4a33-bcb8-7c0b4abfe09e", + ) # GarbageCollectionPrepareRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # save lists of active and expired commits for garbage collection + api_response = api_instance.prepare_garbage_collection_commits(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RetentionApi->prepare_garbage_collection_commits: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # save lists of active and expired commits for garbage collection + api_response = api_instance.prepare_garbage_collection_commits(repository, garbage_collection_prepare_request=garbage_collection_prepare_request) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RetentionApi->prepare_garbage_collection_commits: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **garbage_collection_prepare_request** | [**GarbageCollectionPrepareRequest**](GarbageCollectionPrepareRequest.md)| | [optional] + +### Return type + +[**GarbageCollectionPrepareResponse**](GarbageCollectionPrepareResponse.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | paths to commit dataset | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **prepare_garbage_collection_uncommitted** +> PrepareGCUncommittedResponse prepare_garbage_collection_uncommitted(repository) + +save repository uncommitted metadata for garbage collection + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import retention_api +from lakefs_client.model.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse +from lakefs_client.model.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = retention_api.RetentionApi(api_client) + repository = "repository_example" # str | + prepare_gc_uncommitted_request = PrepareGCUncommittedRequest( + continuation_token="continuation_token_example", + ) # PrepareGCUncommittedRequest | (optional) + + # example passing only required values which don't have defaults set + try: + # save repository uncommitted metadata for garbage collection + api_response = api_instance.prepare_garbage_collection_uncommitted(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RetentionApi->prepare_garbage_collection_uncommitted: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # save repository uncommitted metadata for garbage collection + api_response = api_instance.prepare_garbage_collection_uncommitted(repository, prepare_gc_uncommitted_request=prepare_gc_uncommitted_request) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling RetentionApi->prepare_garbage_collection_uncommitted: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **prepare_gc_uncommitted_request** | [**PrepareGCUncommittedRequest**](PrepareGCUncommittedRequest.md)| | [optional] + +### Return type + +[**PrepareGCUncommittedResponse**](PrepareGCUncommittedResponse.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | paths to commit dataset | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_garbage_collection_rules** +> set_garbage_collection_rules(repository, garbage_collection_rules) + + + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import retention_api +from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = retention_api.RetentionApi(api_client) + repository = "repository_example" # str | + garbage_collection_rules = GarbageCollectionRules( + default_retention_days=1, + branches=[ + GarbageCollectionRule( + branch_id="branch_id_example", + retention_days=1, + ), + ], + ) # GarbageCollectionRules | + + # example passing only required values which don't have defaults set + try: + api_instance.set_garbage_collection_rules(repository, garbage_collection_rules) + except lakefs_client.ApiException as e: + print("Exception when calling RetentionApi->set_garbage_collection_rules: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **garbage_collection_rules** | [**GarbageCollectionRules**](GarbageCollectionRules.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | set garbage collection rules successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/RevertCreation.md b/clients/python/docs/RevertCreation.md new file mode 100644 index 00000000000..2a5e515c163 --- /dev/null +++ b/clients/python/docs/RevertCreation.md @@ -0,0 +1,13 @@ +# RevertCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ref** | **str** | the commit to revert, given by a ref | +**parent_number** | **int** | when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Setup.md b/clients/python/docs/Setup.md new file mode 100644 index 00000000000..e90ffd04a7f --- /dev/null +++ b/clients/python/docs/Setup.md @@ -0,0 +1,13 @@ +# Setup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | an identifier for the user (e.g. jane.doe) | +**key** | [**AccessKeyCredentials**](AccessKeyCredentials.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/SetupState.md b/clients/python/docs/SetupState.md new file mode 100644 index 00000000000..e9e9c0ead74 --- /dev/null +++ b/clients/python/docs/SetupState.md @@ -0,0 +1,13 @@ +# SetupState + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | | [optional] +**login_config** | [**LoginConfig**](LoginConfig.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/StageRangeCreation.md b/clients/python/docs/StageRangeCreation.md new file mode 100644 index 00000000000..a76578e65d7 --- /dev/null +++ b/clients/python/docs/StageRangeCreation.md @@ -0,0 +1,15 @@ +# StageRangeCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from_source_uri** | **str** | The source location of the ingested files. Must match the lakeFS installation blockstore type. | +**after** | **str** | Only objects after this key would be ingested. | +**prepend** | **str** | A prefix to prepend to ingested objects. | +**continuation_token** | **str** | Opaque. Client should pass the continuation_token received from server to continue creation ranges from the same key. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/StagingApi.md b/clients/python/docs/StagingApi.md new file mode 100644 index 00000000000..b82876c7499 --- /dev/null +++ b/clients/python/docs/StagingApi.md @@ -0,0 +1,263 @@ +# lakefs_client.StagingApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_physical_address**](StagingApi.md#get_physical_address) | **GET** /repositories/{repository}/branches/{branch}/staging/backing | get a physical address and a return token to write object to underlying storage +[**link_physical_address**](StagingApi.md#link_physical_address) | **PUT** /repositories/{repository}/branches/{branch}/staging/backing | associate staging on this physical address with a path + + +# **get_physical_address** +> StagingLocation get_physical_address(repository, branch, path) + +get a physical address and a return token to write object to underlying storage + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import staging_api +from lakefs_client.model.staging_location import StagingLocation +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = staging_api.StagingApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + path = "path_example" # str | relative to the branch + presign = True # bool | (optional) + + # example passing only required values which don't have defaults set + try: + # get a physical address and a return token to write object to underlying storage + api_response = api_instance.get_physical_address(repository, branch, path) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling StagingApi->get_physical_address: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # get a physical address and a return token to write object to underlying storage + api_response = api_instance.get_physical_address(repository, branch, path, presign=presign) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling StagingApi->get_physical_address: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **path** | **str**| relative to the branch | + **presign** | **bool**| | [optional] + +### Return type + +[**StagingLocation**](StagingLocation.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | physical address for staging area | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **link_physical_address** +> ObjectStats link_physical_address(repository, branch, path, staging_metadata) + +associate staging on this physical address with a path + +If the supplied token matches the current staging token, associate the object as the physical address with the supplied path. Otherwise, if staging has been committed and the token has expired, return a conflict and hint where to place the object to try again. Caller should copy the object to the new physical address and PUT again with the new staging token. (No need to back off, this is due to losing the race against a concurrent commit operation.) + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import staging_api +from lakefs_client.model.staging_location import StagingLocation +from lakefs_client.model.error import Error +from lakefs_client.model.object_stats import ObjectStats +from lakefs_client.model.staging_metadata import StagingMetadata +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = staging_api.StagingApi(api_client) + repository = "repository_example" # str | + branch = "branch_example" # str | + path = "path_example" # str | relative to the branch + staging_metadata = StagingMetadata( + staging=StagingLocation( + physical_address="physical_address_example", + token="token_example", + presigned_url="presigned_url_example", + ), + checksum="checksum_example", + size_bytes=1, + user_metadata={ + "key": "key_example", + }, + content_type="content_type_example", + ) # StagingMetadata | + + # example passing only required values which don't have defaults set + try: + # associate staging on this physical address with a path + api_response = api_instance.link_physical_address(repository, branch, path, staging_metadata) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling StagingApi->link_physical_address: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **branch** | **str**| | + **path** | **str**| relative to the branch | + **staging_metadata** | [**StagingMetadata**](StagingMetadata.md)| | + +### Return type + +[**ObjectStats**](ObjectStats.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | object metadata | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Internal Server Error | - | +**409** | conflict with a commit, try here | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/StagingLocation.md b/clients/python/docs/StagingLocation.md new file mode 100644 index 00000000000..a34636bd5f0 --- /dev/null +++ b/clients/python/docs/StagingLocation.md @@ -0,0 +1,15 @@ +# StagingLocation + +location for placing an object when staging it + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | opaque staging token to use to link uploaded object | +**physical_address** | **str** | | [optional] +**presigned_url** | **str, none_type** | if presign=true is passed in the request, this field will contain a presigned URL to use when uploading | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/StagingMetadata.md b/clients/python/docs/StagingMetadata.md new file mode 100644 index 00000000000..181aeeefce7 --- /dev/null +++ b/clients/python/docs/StagingMetadata.md @@ -0,0 +1,17 @@ +# StagingMetadata + +information about uploaded object + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**staging** | [**StagingLocation**](StagingLocation.md) | | +**checksum** | **str** | unique identifier of object content on backing store (typically ETag) | +**size_bytes** | **int** | | +**user_metadata** | **{str: (str,)}** | | [optional] +**content_type** | **str** | Object media type | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/Statement.md b/clients/python/docs/Statement.md new file mode 100644 index 00000000000..a7f0bd35174 --- /dev/null +++ b/clients/python/docs/Statement.md @@ -0,0 +1,14 @@ +# Statement + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effect** | **str** | | +**resource** | **str** | | +**action** | **[str]** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/StatisticsApi.md b/clients/python/docs/StatisticsApi.md new file mode 100644 index 00000000000..c5015901110 --- /dev/null +++ b/clients/python/docs/StatisticsApi.md @@ -0,0 +1,123 @@ +# lakefs_client.StatisticsApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**post_stats_events**](StatisticsApi.md#post_stats_events) | **POST** /statistics | post stats events, this endpoint is meant for internal use only + + +# **post_stats_events** +> post_stats_events(stats_events_list) + +post stats events, this endpoint is meant for internal use only + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import statistics_api +from lakefs_client.model.error import Error +from lakefs_client.model.stats_events_list import StatsEventsList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = statistics_api.StatisticsApi(api_client) + stats_events_list = StatsEventsList( + events=[ + StatsEvent( + _class="_class_example", + name="name_example", + count=1, + ), + ], + ) # StatsEventsList | + + # example passing only required values which don't have defaults set + try: + # post stats events, this endpoint is meant for internal use only + api_instance.post_stats_events(stats_events_list) + except lakefs_client.ApiException as e: + print("Exception when calling StatisticsApi->post_stats_events: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **stats_events_list** | [**StatsEventsList**](StatsEventsList.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | reported successfully | - | +**400** | bad request | - | +**401** | Unauthorized | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/StatsEvent.md b/clients/python/docs/StatsEvent.md new file mode 100644 index 00000000000..2f313005d4a --- /dev/null +++ b/clients/python/docs/StatsEvent.md @@ -0,0 +1,14 @@ +# StatsEvent + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **str** | stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\") | +**name** | **str** | stats event name (e.g. \"put_object\", \"create_repository\", \"<experimental-feature-name>\") | +**count** | **int** | number of events of the class and name | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/StatsEventsList.md b/clients/python/docs/StatsEventsList.md new file mode 100644 index 00000000000..3f5a230b766 --- /dev/null +++ b/clients/python/docs/StatsEventsList.md @@ -0,0 +1,12 @@ +# StatsEventsList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**[StatsEvent]**](StatsEvent.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/StorageConfig.md b/clients/python/docs/StorageConfig.md new file mode 100644 index 00000000000..85f44afccdf --- /dev/null +++ b/clients/python/docs/StorageConfig.md @@ -0,0 +1,18 @@ +# StorageConfig + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**blockstore_type** | **str** | | +**blockstore_namespace_example** | **str** | | +**blockstore_namespace_validity_regex** | **str** | | +**pre_sign_support** | **bool** | | +**pre_sign_support_ui** | **bool** | | +**import_support** | **bool** | | +**default_namespace_prefix** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/StorageURI.md b/clients/python/docs/StorageURI.md new file mode 100644 index 00000000000..b8a0b829ce5 --- /dev/null +++ b/clients/python/docs/StorageURI.md @@ -0,0 +1,13 @@ +# StorageURI + +URI to a path in a storage provider (e.g. \"s3://bucket1/path/to/object\") + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/TagCreation.md b/clients/python/docs/TagCreation.md new file mode 100644 index 00000000000..2ad290e308f --- /dev/null +++ b/clients/python/docs/TagCreation.md @@ -0,0 +1,13 @@ +# TagCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**ref** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/TagsApi.md b/clients/python/docs/TagsApi.md new file mode 100644 index 00000000000..13b7b31baae --- /dev/null +++ b/clients/python/docs/TagsApi.md @@ -0,0 +1,465 @@ +# lakefs_client.TagsApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tag**](TagsApi.md#create_tag) | **POST** /repositories/{repository}/tags | create tag +[**delete_tag**](TagsApi.md#delete_tag) | **DELETE** /repositories/{repository}/tags/{tag} | delete tag +[**get_tag**](TagsApi.md#get_tag) | **GET** /repositories/{repository}/tags/{tag} | get tag +[**list_tags**](TagsApi.md#list_tags) | **GET** /repositories/{repository}/tags | list tags + + +# **create_tag** +> Ref create_tag(repository, tag_creation) + +create tag + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import tags_api +from lakefs_client.model.tag_creation import TagCreation +from lakefs_client.model.error import Error +from lakefs_client.model.ref import Ref +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags_api.TagsApi(api_client) + repository = "repository_example" # str | + tag_creation = TagCreation( + id="id_example", + ref="ref_example", + ) # TagCreation | + + # example passing only required values which don't have defaults set + try: + # create tag + api_response = api_instance.create_tag(repository, tag_creation) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling TagsApi->create_tag: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **tag_creation** | [**TagCreation**](TagCreation.md)| | + +### Return type + +[**Ref**](Ref.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | tag | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**409** | Resource Conflicts With Target | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_tag** +> delete_tag(repository, tag) + +delete tag + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import tags_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags_api.TagsApi(api_client) + repository = "repository_example" # str | + tag = "tag_example" # str | + + # example passing only required values which don't have defaults set + try: + # delete tag + api_instance.delete_tag(repository, tag) + except lakefs_client.ApiException as e: + print("Exception when calling TagsApi->delete_tag: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **tag** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | tag deleted successfully | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_tag** +> Ref get_tag(repository, tag) + +get tag + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import tags_api +from lakefs_client.model.error import Error +from lakefs_client.model.ref import Ref +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags_api.TagsApi(api_client) + repository = "repository_example" # str | + tag = "tag_example" # str | + + # example passing only required values which don't have defaults set + try: + # get tag + api_response = api_instance.get_tag(repository, tag) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling TagsApi->get_tag: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **tag** | **str**| | + +### Return type + +[**Ref**](Ref.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | tag | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_tags** +> RefList list_tags(repository) + +list tags + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import tags_api +from lakefs_client.model.error import Error +from lakefs_client.model.ref_list import RefList +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags_api.TagsApi(api_client) + repository = "repository_example" # str | + prefix = "prefix_example" # str | return items prefixed with this value (optional) + after = "after_example" # str | return items after this value (optional) + amount = 100 # int | how many items to return (optional) if omitted the server will use the default value of 100 + + # example passing only required values which don't have defaults set + try: + # list tags + api_response = api_instance.list_tags(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling TagsApi->list_tags: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list tags + api_response = api_instance.list_tags(repository, prefix=prefix, after=after, amount=amount) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling TagsApi->list_tags: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **str**| | + **prefix** | **str**| return items prefixed with this value | [optional] + **after** | **str**| return items after this value | [optional] + **amount** | **int**| how many items to return | [optional] if omitted the server will use the default value of 100 + +### Return type + +[**RefList**](RefList.md) + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | tag list | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/TemplatesApi.md b/clients/python/docs/TemplatesApi.md new file mode 100644 index 00000000000..498fb3e7b1b --- /dev/null +++ b/clients/python/docs/TemplatesApi.md @@ -0,0 +1,128 @@ +# lakefs_client.TemplatesApi + +All URIs are relative to *http://localhost/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**expand_template**](TemplatesApi.md#expand_template) | **GET** /templates/{template_location} | + + +# **expand_template** +> bool, date, datetime, dict, float, int, list, str, none_type expand_template(template_location) + + + +fetch and expand template + +### Example + +* Basic Authentication (basic_auth): +* Api Key Authentication (cookie_auth): +* Bearer (JWT) Authentication (jwt_token): +* Api Key Authentication (oidc_auth): +* Api Key Authentication (saml_auth): + +```python +import time +import lakefs_client +from lakefs_client.api import templates_api +from lakefs_client.model.error import Error +from pprint import pprint +# Defining the host is optional and defaults to http://localhost/api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lakefs_client.Configuration( + host = "http://localhost/api/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic_auth +configuration = lakefs_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure API key authorization: cookie_auth +configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['cookie_auth'] = 'Bearer' + +# Configure Bearer authorization (JWT): jwt_token +configuration = lakefs_client.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Configure API key authorization: oidc_auth +configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['oidc_auth'] = 'Bearer' + +# Configure API key authorization: saml_auth +configuration.api_key['saml_auth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['saml_auth'] = 'Bearer' + +# Enter a context with an instance of the API client +with lakefs_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = templates_api.TemplatesApi(api_client) + template_location = "spark.submit.conf.tt" # str | URL of the template; must be relative (to a URL configured on the server). + params = { + "key": "key_example", + } # {str: (str,)} | (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.expand_template(template_location) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling TemplatesApi->expand_template: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.expand_template(template_location, params=params) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling TemplatesApi->expand_template: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_location** | **str**| URL of the template; must be relative (to a URL configured on the server). | + **params** | **{str: (str,)}**| | [optional] + +### Return type + +**bool, date, datetime, dict, float, int, list, str, none_type** + +### Authorization + +[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */*, application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | expanded template | - | +**401** | Unauthorized | - | +**404** | Resource Not Found | - | +**0** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/clients/python/docs/UnderlyingObjectProperties.md b/clients/python/docs/UnderlyingObjectProperties.md new file mode 100644 index 00000000000..8212e96bb19 --- /dev/null +++ b/clients/python/docs/UnderlyingObjectProperties.md @@ -0,0 +1,12 @@ +# UnderlyingObjectProperties + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storage_class** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/UpdatePasswordByToken.md b/clients/python/docs/UpdatePasswordByToken.md new file mode 100644 index 00000000000..7a7ffebee6f --- /dev/null +++ b/clients/python/docs/UpdatePasswordByToken.md @@ -0,0 +1,14 @@ +# UpdatePasswordByToken + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | token used for authentication | +**new_password** | **str** | new password to update | +**email** | **str** | optional user email to match the token for verification | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/User.md b/clients/python/docs/User.md new file mode 100644 index 00000000000..fd8ec228439 --- /dev/null +++ b/clients/python/docs/User.md @@ -0,0 +1,15 @@ +# User + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | a unique identifier for the user. In password-based authentication, this is the email. | +**creation_date** | **int** | Unix Epoch in seconds | +**friendly_name** | **str** | | [optional] +**email** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/UserCreation.md b/clients/python/docs/UserCreation.md new file mode 100644 index 00000000000..a0dca37f28d --- /dev/null +++ b/clients/python/docs/UserCreation.md @@ -0,0 +1,13 @@ +# UserCreation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | a unique identifier for the user. In password-based authentication, this is the email. | +**invite_user** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/UserList.md b/clients/python/docs/UserList.md new file mode 100644 index 00000000000..36f49a3c2dc --- /dev/null +++ b/clients/python/docs/UserList.md @@ -0,0 +1,13 @@ +# UserList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | +**results** | [**[User]**](User.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/VersionConfig.md b/clients/python/docs/VersionConfig.md new file mode 100644 index 00000000000..ba0f78fe755 --- /dev/null +++ b/clients/python/docs/VersionConfig.md @@ -0,0 +1,14 @@ +# VersionConfig + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] +**upgrade_recommended** | **bool** | | [optional] +**upgrade_url** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/python/docs/apis/tags/ActionsApi.md b/clients/python/docs/apis/tags/ActionsApi.md deleted file mode 100644 index 424ad85747d..00000000000 --- a/clients/python/docs/apis/tags/ActionsApi.md +++ /dev/null @@ -1,829 +0,0 @@ - -# lakefs_client.apis.tags.actions_api.ActionsApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_run**](#get_run) | **get** /repositories/{repository}/actions/runs/{run_id} | get a run -[**get_run_hook_output**](#get_run_hook_output) | **get** /repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output | get run hook output -[**list_repository_runs**](#list_repository_runs) | **get** /repositories/{repository}/actions/runs | list runs -[**list_run_hooks**](#list_run_hooks) | **get** /repositories/{repository}/actions/runs/{run_id}/hooks | list run hooks - -# **get_run** - -> ActionRun get_run(repositoryrun_id) - -get a run - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import actions_api -from lakefs_client.model.action_run import ActionRun -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = actions_api.ActionsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'run_id': "run_id_example", - } - try: - # get a run - api_response = api_instance.get_run( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ActionsApi->get_run: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -run_id | RunIdSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RunIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_run.ApiResponseFor200) | action run result -401 | [ApiResponseFor401](#get_run.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_run.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_run.ApiResponseForDefault) | Internal Server Error - -#### get_run.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ActionRun**](../../models/ActionRun.md) | | - - -#### get_run.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_run.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_run.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_run_hook_output** - -> file_type get_run_hook_output(repositoryrun_idhook_run_id) - -get run hook output - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import actions_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = actions_api.ActionsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'run_id': "run_id_example", - 'hook_run_id': "hook_run_id_example", - } - try: - # get run hook output - api_response = api_instance.get_run_hook_output( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ActionsApi->get_run_hook_output: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/octet-stream', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -run_id | RunIdSchema | | -hook_run_id | HookRunIdSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RunIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# HookRunIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_run_hook_output.ApiResponseFor200) | run hook output -401 | [ApiResponseFor401](#get_run_hook_output.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_run_hook_output.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_run_hook_output.ApiResponseForDefault) | Internal Server Error - -#### get_run_hook_output.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationOctetStream - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -#### get_run_hook_output.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_run_hook_output.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_run_hook_output.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_repository_runs** - -> ActionRunList list_repository_runs(repository) - -list runs - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import actions_api -from lakefs_client.model.action_run_list import ActionRunList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = actions_api.ActionsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - query_params = { - } - try: - # list runs - api_response = api_instance.list_repository_runs( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ActionsApi->list_repository_runs: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - } - query_params = { - 'after': "after_example", - 'amount': 100, - 'branch': "branch_example", - 'commit': "commit_example", - } - try: - # list runs - api_response = api_instance.list_repository_runs( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ActionsApi->list_repository_runs: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -after | AfterSchema | | optional -amount | AmountSchema | | optional -branch | BranchSchema | | optional -commit | CommitSchema | | optional - - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_repository_runs.ApiResponseFor200) | list action runs -401 | [ApiResponseFor401](#list_repository_runs.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_repository_runs.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_repository_runs.ApiResponseForDefault) | Internal Server Error - -#### list_repository_runs.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ActionRunList**](../../models/ActionRunList.md) | | - - -#### list_repository_runs.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_repository_runs.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_repository_runs.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_run_hooks** - -> HookRunList list_run_hooks(repositoryrun_id) - -list run hooks - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import actions_api -from lakefs_client.model.error import Error -from lakefs_client.model.hook_run_list import HookRunList -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = actions_api.ActionsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'run_id': "run_id_example", - } - query_params = { - } - try: - # list run hooks - api_response = api_instance.list_run_hooks( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ActionsApi->list_run_hooks: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'run_id': "run_id_example", - } - query_params = { - 'after': "after_example", - 'amount': 100, - } - try: - # list run hooks - api_response = api_instance.list_run_hooks( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ActionsApi->list_run_hooks: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -run_id | RunIdSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RunIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_run_hooks.ApiResponseFor200) | list specific run hooks -401 | [ApiResponseFor401](#list_run_hooks.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_run_hooks.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_run_hooks.ApiResponseForDefault) | Internal Server Error - -#### list_run_hooks.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**HookRunList**](../../models/HookRunList.md) | | - - -#### list_run_hooks.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_run_hooks.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_run_hooks.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/AuthApi.md b/clients/python/docs/apis/tags/AuthApi.md deleted file mode 100644 index 381076763f5..00000000000 --- a/clients/python/docs/apis/tags/AuthApi.md +++ /dev/null @@ -1,5434 +0,0 @@ - -# lakefs_client.apis.tags.auth_api.AuthApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_group_membership**](#add_group_membership) | **put** /auth/groups/{groupId}/members/{userId} | add group membership -[**attach_policy_to_group**](#attach_policy_to_group) | **put** /auth/groups/{groupId}/policies/{policyId} | attach policy to group -[**attach_policy_to_user**](#attach_policy_to_user) | **put** /auth/users/{userId}/policies/{policyId} | attach policy to user -[**create_credentials**](#create_credentials) | **post** /auth/users/{userId}/credentials | create credentials -[**create_group**](#create_group) | **post** /auth/groups | create group -[**create_policy**](#create_policy) | **post** /auth/policies | create policy -[**create_user**](#create_user) | **post** /auth/users | create user -[**delete_credentials**](#delete_credentials) | **delete** /auth/users/{userId}/credentials/{accessKeyId} | delete credentials -[**delete_group**](#delete_group) | **delete** /auth/groups/{groupId} | delete group -[**delete_group_membership**](#delete_group_membership) | **delete** /auth/groups/{groupId}/members/{userId} | delete group membership -[**delete_policy**](#delete_policy) | **delete** /auth/policies/{policyId} | delete policy -[**delete_user**](#delete_user) | **delete** /auth/users/{userId} | delete user -[**detach_policy_from_group**](#detach_policy_from_group) | **delete** /auth/groups/{groupId}/policies/{policyId} | detach policy from group -[**detach_policy_from_user**](#detach_policy_from_user) | **delete** /auth/users/{userId}/policies/{policyId} | detach policy from user -[**forgot_password**](#forgot_password) | **post** /auth/password/forgot | forgot password request initiates the password reset process -[**get_auth_capabilities**](#get_auth_capabilities) | **get** /auth/capabilities | list authentication capabilities supported -[**get_credentials**](#get_credentials) | **get** /auth/users/{userId}/credentials/{accessKeyId} | get credentials -[**get_current_user**](#get_current_user) | **get** /user | get current user -[**get_group**](#get_group) | **get** /auth/groups/{groupId} | get group -[**get_policy**](#get_policy) | **get** /auth/policies/{policyId} | get policy -[**get_user**](#get_user) | **get** /auth/users/{userId} | get user -[**list_group_members**](#list_group_members) | **get** /auth/groups/{groupId}/members | list group members -[**list_group_policies**](#list_group_policies) | **get** /auth/groups/{groupId}/policies | list group policies -[**list_groups**](#list_groups) | **get** /auth/groups | list groups -[**list_policies**](#list_policies) | **get** /auth/policies | list policies -[**list_user_credentials**](#list_user_credentials) | **get** /auth/users/{userId}/credentials | list user credentials -[**list_user_groups**](#list_user_groups) | **get** /auth/users/{userId}/groups | list user groups -[**list_user_policies**](#list_user_policies) | **get** /auth/users/{userId}/policies | list user policies -[**list_users**](#list_users) | **get** /auth/users | list users -[**login**](#login) | **post** /auth/login | perform a login -[**update_password**](#update_password) | **post** /auth/password | Update user password by reset_password token -[**update_policy**](#update_policy) | **put** /auth/policies/{policyId} | update policy - -# **add_group_membership** - -> add_group_membership(group_iduser_id) - -add group membership - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - 'userId': "userId_example", - } - try: - # add group membership - api_response = api_instance.add_group_membership( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->add_group_membership: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | -userId | UserIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#add_group_membership.ApiResponseFor201) | membership added successfully -401 | [ApiResponseFor401](#add_group_membership.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#add_group_membership.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#add_group_membership.ApiResponseForDefault) | Internal Server Error - -#### add_group_membership.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### add_group_membership.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### add_group_membership.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### add_group_membership.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **attach_policy_to_group** - -> attach_policy_to_group(group_idpolicy_id) - -attach policy to group - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - 'policyId': "policyId_example", - } - try: - # attach policy to group - api_response = api_instance.attach_policy_to_group( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->attach_policy_to_group: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | -policyId | PolicyIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PolicyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#attach_policy_to_group.ApiResponseFor201) | policy attached successfully -401 | [ApiResponseFor401](#attach_policy_to_group.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#attach_policy_to_group.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#attach_policy_to_group.ApiResponseForDefault) | Internal Server Error - -#### attach_policy_to_group.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### attach_policy_to_group.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### attach_policy_to_group.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### attach_policy_to_group.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **attach_policy_to_user** - -> attach_policy_to_user(user_idpolicy_id) - -attach policy to user - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - 'policyId': "policyId_example", - } - try: - # attach policy to user - api_response = api_instance.attach_policy_to_user( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->attach_policy_to_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | -policyId | PolicyIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PolicyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#attach_policy_to_user.ApiResponseFor201) | policy attached successfully -401 | [ApiResponseFor401](#attach_policy_to_user.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#attach_policy_to_user.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#attach_policy_to_user.ApiResponseForDefault) | Internal Server Error - -#### attach_policy_to_user.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### attach_policy_to_user.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### attach_policy_to_user.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### attach_policy_to_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_credentials** - -> CredentialsWithSecret create_credentials(user_id) - -create credentials - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.credentials_with_secret import CredentialsWithSecret -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - } - try: - # create credentials - api_response = api_instance.create_credentials( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->create_credentials: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_credentials.ApiResponseFor201) | credentials -401 | [ApiResponseFor401](#create_credentials.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#create_credentials.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#create_credentials.ApiResponseForDefault) | Internal Server Error - -#### create_credentials.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CredentialsWithSecret**](../../models/CredentialsWithSecret.md) | | - - -#### create_credentials.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_credentials.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_credentials.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_group** - -> Group create_group() - -create group - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.group_creation import GroupCreation -from lakefs_client.model.error import Error -from lakefs_client.model.group import Group -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only optional values - body = GroupCreation( - id="id_example", - ) - try: - # create group - api_response = api_instance.create_group( - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->create_group: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GroupCreation**](../../models/GroupCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_group.ApiResponseFor201) | group -401 | [ApiResponseFor401](#create_group.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#create_group.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#create_group.ApiResponseForDefault) | Internal Server Error - -#### create_group.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Group**](../../models/Group.md) | | - - -#### create_group.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_group.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_group.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_policy** - -> Policy create_policy(policy) - -create policy - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - body = Policy( - id="id_example", - creation_date=1, - statement=[ - Statement( - effect="allow", - resource="resource_example", - action=[ - "action_example" - ], - ) - ], - ) - try: - # create policy - api_response = api_instance.create_policy( - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->create_policy: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Policy**](../../models/Policy.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_policy.ApiResponseFor201) | policy -400 | [ApiResponseFor400](#create_policy.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#create_policy.ApiResponseFor401) | Unauthorized -409 | [ApiResponseFor409](#create_policy.ApiResponseFor409) | Resource Conflicts With Target -default | [ApiResponseForDefault](#create_policy.ApiResponseForDefault) | Internal Server Error - -#### create_policy.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Policy**](../../models/Policy.md) | | - - -#### create_policy.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_policy.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_policy.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_policy.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_user** - -> User create_user() - -create user - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from lakefs_client.model.user import User -from lakefs_client.model.user_creation import UserCreation -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only optional values - body = UserCreation( - id="id_example", - invite_user=True, - ) - try: - # create user - api_response = api_instance.create_user( - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->create_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserCreation**](../../models/UserCreation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_user.ApiResponseFor201) | user -400 | [ApiResponseFor400](#create_user.ApiResponseFor400) | validation error -401 | [ApiResponseFor401](#create_user.ApiResponseFor401) | Unauthorized -409 | [ApiResponseFor409](#create_user.ApiResponseFor409) | Resource Conflicts With Target -default | [ApiResponseForDefault](#create_user.ApiResponseForDefault) | Internal Server Error - -#### create_user.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**User**](../../models/User.md) | | - - -#### create_user.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_user.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_user.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_credentials** - -> delete_credentials(user_idaccess_key_id) - -delete credentials - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - 'accessKeyId': "accessKeyId_example", - } - try: - # delete credentials - api_response = api_instance.delete_credentials( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->delete_credentials: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | -accessKeyId | AccessKeyIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AccessKeyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_credentials.ApiResponseFor204) | credentials deleted successfully -401 | [ApiResponseFor401](#delete_credentials.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_credentials.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_credentials.ApiResponseForDefault) | Internal Server Error - -#### delete_credentials.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_credentials.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_credentials.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_credentials.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_group** - -> delete_group(group_id) - -delete group - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - } - try: - # delete group - api_response = api_instance.delete_group( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->delete_group: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_group.ApiResponseFor204) | group deleted successfully -401 | [ApiResponseFor401](#delete_group.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_group.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_group.ApiResponseForDefault) | Internal Server Error - -#### delete_group.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_group.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_group.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_group.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_group_membership** - -> delete_group_membership(group_iduser_id) - -delete group membership - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - 'userId': "userId_example", - } - try: - # delete group membership - api_response = api_instance.delete_group_membership( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->delete_group_membership: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | -userId | UserIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_group_membership.ApiResponseFor204) | membership deleted successfully -401 | [ApiResponseFor401](#delete_group_membership.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_group_membership.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_group_membership.ApiResponseForDefault) | Internal Server Error - -#### delete_group_membership.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_group_membership.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_group_membership.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_group_membership.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_policy** - -> delete_policy(policy_id) - -delete policy - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'policyId': "policyId_example", - } - try: - # delete policy - api_response = api_instance.delete_policy( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->delete_policy: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -policyId | PolicyIdSchema | | - -# PolicyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_policy.ApiResponseFor204) | policy deleted successfully -401 | [ApiResponseFor401](#delete_policy.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_policy.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_policy.ApiResponseForDefault) | Internal Server Error - -#### delete_policy.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_policy.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_policy.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_policy.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_user** - -> delete_user(user_id) - -delete user - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - } - try: - # delete user - api_response = api_instance.delete_user( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->delete_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_user.ApiResponseFor204) | user deleted successfully -401 | [ApiResponseFor401](#delete_user.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_user.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_user.ApiResponseForDefault) | Internal Server Error - -#### delete_user.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_user.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_user.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **detach_policy_from_group** - -> detach_policy_from_group(group_idpolicy_id) - -detach policy from group - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - 'policyId': "policyId_example", - } - try: - # detach policy from group - api_response = api_instance.detach_policy_from_group( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->detach_policy_from_group: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | -policyId | PolicyIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PolicyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#detach_policy_from_group.ApiResponseFor204) | policy detached successfully -401 | [ApiResponseFor401](#detach_policy_from_group.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#detach_policy_from_group.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#detach_policy_from_group.ApiResponseForDefault) | Internal Server Error - -#### detach_policy_from_group.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### detach_policy_from_group.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### detach_policy_from_group.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### detach_policy_from_group.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **detach_policy_from_user** - -> detach_policy_from_user(user_idpolicy_id) - -detach policy from user - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - 'policyId': "policyId_example", - } - try: - # detach policy from user - api_response = api_instance.detach_policy_from_user( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->detach_policy_from_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | -policyId | PolicyIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PolicyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#detach_policy_from_user.ApiResponseFor204) | policy detached successfully -401 | [ApiResponseFor401](#detach_policy_from_user.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#detach_policy_from_user.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#detach_policy_from_user.ApiResponseForDefault) | Internal Server Error - -#### detach_policy_from_user.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### detach_policy_from_user.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### detach_policy_from_user.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### detach_policy_from_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **forgot_password** - -> forgot_password(forgot_password_request) - -forgot password request initiates the password reset process - -### Example - -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.forgot_password_request import ForgotPasswordRequest -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - body = ForgotPasswordRequest( - email="email_example", - ) - try: - # forgot password request initiates the password reset process - api_response = api_instance.forgot_password( - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->forgot_password: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForgotPasswordRequest**](../../models/ForgotPasswordRequest.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#forgot_password.ApiResponseFor204) | No content -400 | [ApiResponseFor400](#forgot_password.ApiResponseFor400) | bad request -default | [ApiResponseForDefault](#forgot_password.ApiResponseForDefault) | Internal Server Error - -#### forgot_password.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### forgot_password.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### forgot_password.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_auth_capabilities** - -> AuthCapabilities get_auth_capabilities() - -list authentication capabilities supported - -### Example - -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from lakefs_client.model.auth_capabilities import AuthCapabilities -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # list authentication capabilities supported - api_response = api_instance.get_auth_capabilities() - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->get_auth_capabilities: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_auth_capabilities.ApiResponseFor200) | auth capabilities -default | [ApiResponseForDefault](#get_auth_capabilities.ApiResponseForDefault) | Internal Server Error - -#### get_auth_capabilities.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AuthCapabilities**](../../models/AuthCapabilities.md) | | - - -#### get_auth_capabilities.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_credentials** - -> Credentials get_credentials(user_idaccess_key_id) - -get credentials - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.credentials import Credentials -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - 'accessKeyId': "accessKeyId_example", - } - try: - # get credentials - api_response = api_instance.get_credentials( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->get_credentials: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | -accessKeyId | AccessKeyIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AccessKeyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_credentials.ApiResponseFor200) | credentials -401 | [ApiResponseFor401](#get_credentials.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_credentials.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_credentials.ApiResponseForDefault) | Internal Server Error - -#### get_credentials.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Credentials**](../../models/Credentials.md) | | - - -#### get_credentials.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_credentials.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_credentials.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_current_user** - -> CurrentUser get_current_user() - -get current user - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.current_user import CurrentUser -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # get current user - api_response = api_instance.get_current_user() - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->get_current_user: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_current_user.ApiResponseFor200) | user - -#### get_current_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CurrentUser**](../../models/CurrentUser.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_group** - -> Group get_group(group_id) - -get group - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from lakefs_client.model.group import Group -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - } - try: - # get group - api_response = api_instance.get_group( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->get_group: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_group.ApiResponseFor200) | group -401 | [ApiResponseFor401](#get_group.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_group.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_group.ApiResponseForDefault) | Internal Server Error - -#### get_group.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Group**](../../models/Group.md) | | - - -#### get_group.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_group.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_group.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_policy** - -> Policy get_policy(policy_id) - -get policy - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'policyId': "policyId_example", - } - try: - # get policy - api_response = api_instance.get_policy( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->get_policy: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -policyId | PolicyIdSchema | | - -# PolicyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_policy.ApiResponseFor200) | policy -401 | [ApiResponseFor401](#get_policy.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_policy.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_policy.ApiResponseForDefault) | Internal Server Error - -#### get_policy.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Policy**](../../models/Policy.md) | | - - -#### get_policy.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_policy.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_policy.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_user** - -> User get_user(user_id) - -get user - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from lakefs_client.model.user import User -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - } - try: - # get user - api_response = api_instance.get_user( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->get_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_user.ApiResponseFor200) | user -401 | [ApiResponseFor401](#get_user.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_user.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_user.ApiResponseForDefault) | Internal Server Error - -#### get_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**User**](../../models/User.md) | | - - -#### get_user.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_user.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_group_members** - -> UserList list_group_members(group_id) - -list group members - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.user_list import UserList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - } - query_params = { - } - try: - # list group members - api_response = api_instance.list_group_members( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_group_members: %s\n" % e) - - # example passing only optional values - path_params = { - 'groupId': "groupId_example", - } - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list group members - api_response = api_instance.list_group_members( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_group_members: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_group_members.ApiResponseFor200) | group memeber list -401 | [ApiResponseFor401](#list_group_members.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#list_group_members.ApiResponseForDefault) | Internal Server Error - -#### list_group_members.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserList**](../../models/UserList.md) | | - - -#### list_group_members.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_group_members.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_group_policies** - -> PolicyList list_group_policies(group_id) - -list group policies - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'groupId': "groupId_example", - } - query_params = { - } - try: - # list group policies - api_response = api_instance.list_group_policies( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_group_policies: %s\n" % e) - - # example passing only optional values - path_params = { - 'groupId': "groupId_example", - } - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list group policies - api_response = api_instance.list_group_policies( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_group_policies: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -groupId | GroupIdSchema | | - -# GroupIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_group_policies.ApiResponseFor200) | policy list -401 | [ApiResponseFor401](#list_group_policies.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_group_policies.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_group_policies.ApiResponseForDefault) | Internal Server Error - -#### list_group_policies.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PolicyList**](../../models/PolicyList.md) | | - - -#### list_group_policies.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_group_policies.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_group_policies.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_groups** - -> GroupList list_groups() - -list groups - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.group_list import GroupList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only optional values - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list groups - api_response = api_instance.list_groups( - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_groups: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_groups.ApiResponseFor200) | group list -401 | [ApiResponseFor401](#list_groups.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#list_groups.ApiResponseForDefault) | Internal Server Error - -#### list_groups.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GroupList**](../../models/GroupList.md) | | - - -#### list_groups.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_groups.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_policies** - -> PolicyList list_policies() - -list policies - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only optional values - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list policies - api_response = api_instance.list_policies( - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_policies: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_policies.ApiResponseFor200) | policy list -401 | [ApiResponseFor401](#list_policies.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#list_policies.ApiResponseForDefault) | Internal Server Error - -#### list_policies.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PolicyList**](../../models/PolicyList.md) | | - - -#### list_policies.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_policies.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_user_credentials** - -> CredentialsList list_user_credentials(user_id) - -list user credentials - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.error import Error -from lakefs_client.model.credentials_list import CredentialsList -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - } - query_params = { - } - try: - # list user credentials - api_response = api_instance.list_user_credentials( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_user_credentials: %s\n" % e) - - # example passing only optional values - path_params = { - 'userId': "userId_example", - } - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list user credentials - api_response = api_instance.list_user_credentials( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_user_credentials: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_user_credentials.ApiResponseFor200) | credential list -401 | [ApiResponseFor401](#list_user_credentials.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_user_credentials.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_user_credentials.ApiResponseForDefault) | Internal Server Error - -#### list_user_credentials.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CredentialsList**](../../models/CredentialsList.md) | | - - -#### list_user_credentials.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_user_credentials.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_user_credentials.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_user_groups** - -> GroupList list_user_groups(user_id) - -list user groups - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.group_list import GroupList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - } - query_params = { - } - try: - # list user groups - api_response = api_instance.list_user_groups( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_user_groups: %s\n" % e) - - # example passing only optional values - path_params = { - 'userId': "userId_example", - } - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list user groups - api_response = api_instance.list_user_groups( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_user_groups: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_user_groups.ApiResponseFor200) | group list -401 | [ApiResponseFor401](#list_user_groups.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_user_groups.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_user_groups.ApiResponseForDefault) | Internal Server Error - -#### list_user_groups.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GroupList**](../../models/GroupList.md) | | - - -#### list_user_groups.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_user_groups.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_user_groups.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_user_policies** - -> PolicyList list_user_policies(user_id) - -list user policies - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - } - query_params = { - } - try: - # list user policies - api_response = api_instance.list_user_policies( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_user_policies: %s\n" % e) - - # example passing only optional values - path_params = { - 'userId': "userId_example", - } - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - 'effective': False, - } - try: - # list user policies - api_response = api_instance.list_user_policies( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_user_policies: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional -effective | EffectiveSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -# EffectiveSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_user_policies.ApiResponseFor200) | policy list -401 | [ApiResponseFor401](#list_user_policies.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_user_policies.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_user_policies.ApiResponseForDefault) | Internal Server Error - -#### list_user_policies.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PolicyList**](../../models/PolicyList.md) | | - - -#### list_user_policies.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_user_policies.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_user_policies.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_users** - -> UserList list_users() - -list users - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.user_list import UserList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only optional values - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list users - api_response = api_instance.list_users( - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->list_users: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_users.ApiResponseFor200) | user list -401 | [ApiResponseFor401](#list_users.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#list_users.ApiResponseForDefault) | Internal Server Error - -#### list_users.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UserList**](../../models/UserList.md) | | - - -#### list_users.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_users.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **login** - -> AuthenticationToken login() - -perform a login - -### Example - -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.authentication_token import AuthenticationToken -from lakefs_client.model.login_information import LoginInformation -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only optional values - body = LoginInformation( - access_key_id="access_key_id_example", - secret_access_key="secret_access_key_example", - ) - try: - # perform a login - api_response = api_instance.login( - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->login: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**LoginInformation**](../../models/LoginInformation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#login.ApiResponseFor200) | successful login -401 | [ApiResponseFor401](#login.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#login.ApiResponseForDefault) | Internal Server Error - -#### login.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | ResponseHeadersFor200 | | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AuthenticationToken**](../../models/AuthenticationToken.md) | | - -#### ResponseHeadersFor200 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Set-Cookie | SetCookieSchema | | optional - -# SetCookieSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - - -#### login.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### login.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_password** - -> update_password(update_password_by_token) - -Update user password by reset_password token - -### Example - -* Api Key Authentication (cookie_auth): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.update_password_by_token import UpdatePasswordByToken -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - body = UpdatePasswordByToken( - token="token_example", - new_password="new_password_example", - email="email_example", - ) - try: - # Update user password by reset_password token - api_response = api_instance.update_password( - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->update_password: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UpdatePasswordByToken**](../../models/UpdatePasswordByToken.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#update_password.ApiResponseFor201) | successful reset -401 | [ApiResponseFor401](#update_password.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#update_password.ApiResponseForDefault) | Internal Server Error - -#### update_password.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### update_password.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### update_password.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[cookie_auth](../../../README.md#cookie_auth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_policy** - -> Policy update_policy(policy_idpolicy) - -update policy - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import auth_api -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = auth_api.AuthApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'policyId': "policyId_example", - } - body = Policy( - id="id_example", - creation_date=1, - statement=[ - Statement( - effect="allow", - resource="resource_example", - action=[ - "action_example" - ], - ) - ], - ) - try: - # update policy - api_response = api_instance.update_policy( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling AuthApi->update_policy: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Policy**](../../models/Policy.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -policyId | PolicyIdSchema | | - -# PolicyIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_policy.ApiResponseFor200) | policy -400 | [ApiResponseFor400](#update_policy.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#update_policy.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#update_policy.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#update_policy.ApiResponseForDefault) | Internal Server Error - -#### update_policy.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Policy**](../../models/Policy.md) | | - - -#### update_policy.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### update_policy.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### update_policy.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### update_policy.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/BranchesApi.md b/clients/python/docs/apis/tags/BranchesApi.md deleted file mode 100644 index 7d0abdfa01d..00000000000 --- a/clients/python/docs/apis/tags/BranchesApi.md +++ /dev/null @@ -1,1670 +0,0 @@ - -# lakefs_client.apis.tags.branches_api.BranchesApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**cherry_pick**](#cherry_pick) | **post** /repositories/{repository}/branches/{branch}/cherry-pick | Replay the changes from the given commit on the branch -[**create_branch**](#create_branch) | **post** /repositories/{repository}/branches | create branch -[**delete_branch**](#delete_branch) | **delete** /repositories/{repository}/branches/{branch} | delete branch -[**diff_branch**](#diff_branch) | **get** /repositories/{repository}/branches/{branch}/diff | diff branch -[**get_branch**](#get_branch) | **get** /repositories/{repository}/branches/{branch} | get branch -[**list_branches**](#list_branches) | **get** /repositories/{repository}/branches | list branches -[**reset_branch**](#reset_branch) | **put** /repositories/{repository}/branches/{branch} | reset branch -[**revert_branch**](#revert_branch) | **post** /repositories/{repository}/branches/{branch}/revert | revert - -# **cherry_pick** - -> Commit cherry_pick(repositorybranchcherry_pick_creation) - -Replay the changes from the given commit on the branch - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.commit import Commit -from lakefs_client.model.error import Error -from lakefs_client.model.cherry_pick_creation import CherryPickCreation -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - body = CherryPickCreation( - ref="ref_example", - parent_number=1, - ) - try: - # Replay the changes from the given commit on the branch - api_response = api_instance.cherry_pick( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->cherry_pick: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CherryPickCreation**](../../models/CherryPickCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#cherry_pick.ApiResponseFor201) | the cherry-pick commit -400 | [ApiResponseFor400](#cherry_pick.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#cherry_pick.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#cherry_pick.ApiResponseFor404) | Resource Not Found -409 | [ApiResponseFor409](#cherry_pick.ApiResponseFor409) | Conflict Found -default | [ApiResponseForDefault](#cherry_pick.ApiResponseForDefault) | Internal Server Error - -#### cherry_pick.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Commit**](../../models/Commit.md) | | - - -#### cherry_pick.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### cherry_pick.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### cherry_pick.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### cherry_pick.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### cherry_pick.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_branch** - -> str create_branch(repositorybranch_creation) - -create branch - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.branch_creation import BranchCreation -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = BranchCreation( - name="name_example", - source="source_example", - ) - try: - # create branch - api_response = api_instance.create_branch( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->create_branch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('text/html', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BranchCreation**](../../models/BranchCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_branch.ApiResponseFor201) | reference -400 | [ApiResponseFor400](#create_branch.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#create_branch.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#create_branch.ApiResponseFor404) | Resource Not Found -409 | [ApiResponseFor409](#create_branch.ApiResponseFor409) | Resource Conflicts With Target -default | [ApiResponseForDefault](#create_branch.ApiResponseForDefault) | Internal Server Error - -#### create_branch.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyTextHtml, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyTextHtml - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -#### create_branch.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_branch.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_branch.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_branch.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_branch.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_branch** - -> delete_branch(repositorybranch) - -delete branch - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - try: - # delete branch - api_response = api_instance.delete_branch( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->delete_branch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_branch.ApiResponseFor204) | branch deleted successfully -401 | [ApiResponseFor401](#delete_branch.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#delete_branch.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#delete_branch.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_branch.ApiResponseForDefault) | Internal Server Error - -#### delete_branch.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_branch.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_branch.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_branch.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_branch.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **diff_branch** - -> DiffList diff_branch(repositorybranch) - -diff branch - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.diff_list import DiffList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - } - try: - # diff branch - api_response = api_instance.diff_branch( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->diff_branch: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'after': "after_example", - 'amount': 100, - 'prefix': "prefix_example", - 'delimiter': "delimiter_example", - } - try: - # diff branch - api_response = api_instance.diff_branch( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->diff_branch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -after | AfterSchema | | optional -amount | AmountSchema | | optional -prefix | PrefixSchema | | optional -delimiter | DelimiterSchema | | optional - - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# DelimiterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#diff_branch.ApiResponseFor200) | diff of branch uncommitted changes -401 | [ApiResponseFor401](#diff_branch.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#diff_branch.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#diff_branch.ApiResponseForDefault) | Internal Server Error - -#### diff_branch.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**DiffList**](../../models/DiffList.md) | | - - -#### diff_branch.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### diff_branch.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### diff_branch.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_branch** - -> Ref get_branch(repositorybranch) - -get branch - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - try: - # get branch - api_response = api_instance.get_branch( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->get_branch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_branch.ApiResponseFor200) | branch -401 | [ApiResponseFor401](#get_branch.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_branch.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_branch.ApiResponseForDefault) | Internal Server Error - -#### get_branch.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Ref**](../../models/Ref.md) | | - - -#### get_branch.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_branch.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_branch.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_branches** - -> RefList list_branches(repository) - -list branches - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.error import Error -from lakefs_client.model.ref_list import RefList -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - query_params = { - } - try: - # list branches - api_response = api_instance.list_branches( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->list_branches: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - } - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list branches - api_response = api_instance.list_branches( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->list_branches: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_branches.ApiResponseFor200) | branch list -401 | [ApiResponseFor401](#list_branches.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_branches.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_branches.ApiResponseForDefault) | Internal Server Error - -#### list_branches.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefList**](../../models/RefList.md) | | - - -#### list_branches.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_branches.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_branches.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **reset_branch** - -> reset_branch(repositorybranchreset_creation) - -reset branch - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.reset_creation import ResetCreation -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - body = ResetCreation( - type="object", - path="path_example", - ) - try: - # reset branch - api_response = api_instance.reset_branch( - path_params=path_params, - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->reset_branch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ResetCreation**](../../models/ResetCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#reset_branch.ApiResponseFor204) | reset successful -401 | [ApiResponseFor401](#reset_branch.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#reset_branch.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#reset_branch.ApiResponseForDefault) | Internal Server Error - -#### reset_branch.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### reset_branch.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### reset_branch.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### reset_branch.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **revert_branch** - -> revert_branch(repositorybranchrevert_creation) - -revert - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import branches_api -from lakefs_client.model.revert_creation import RevertCreation -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = branches_api.BranchesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - body = RevertCreation( - ref="ref_example", - parent_number=1, - ) - try: - # revert - api_response = api_instance.revert_branch( - path_params=path_params, - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling BranchesApi->revert_branch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RevertCreation**](../../models/RevertCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#revert_branch.ApiResponseFor204) | revert successful -400 | [ApiResponseFor400](#revert_branch.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#revert_branch.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#revert_branch.ApiResponseFor404) | Resource Not Found -409 | [ApiResponseFor409](#revert_branch.ApiResponseFor409) | Conflict Found -default | [ApiResponseForDefault](#revert_branch.ApiResponseForDefault) | Internal Server Error - -#### revert_branch.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### revert_branch.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### revert_branch.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### revert_branch.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### revert_branch.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### revert_branch.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/CommitsApi.md b/clients/python/docs/apis/tags/CommitsApi.md deleted file mode 100644 index 6ab4ea4cd50..00000000000 --- a/clients/python/docs/apis/tags/CommitsApi.md +++ /dev/null @@ -1,694 +0,0 @@ - -# lakefs_client.apis.tags.commits_api.CommitsApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**commit**](#commit) | **post** /repositories/{repository}/branches/{branch}/commits | create commit -[**get_commit**](#get_commit) | **get** /repositories/{repository}/commits/{commitId} | get commit -[**log_branch_commits**](#log_branch_commits) | **get** /repositories/{repository}/branches/{branch}/commits | get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref - -# **commit** - -> Commit commit(repositorybranchcommit_creation) - -create commit - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import commits_api -from lakefs_client.model.commit import Commit -from lakefs_client.model.commit_creation import CommitCreation -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = commits_api.CommitsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - } - body = CommitCreation( - message="message_example", - metadata=dict( - "key": "key_example", - ), - date=1, - ) - try: - # create commit - api_response = api_instance.commit( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling CommitsApi->commit: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'source_metarange': "source_metarange_example", - } - body = CommitCreation( - message="message_example", - metadata=dict( - "key": "key_example", - ), - date=1, - ) - try: - # create commit - api_response = api_instance.commit( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling CommitsApi->commit: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CommitCreation**](../../models/CommitCreation.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -source_metarange | SourceMetarangeSchema | | optional - - -# SourceMetarangeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#commit.ApiResponseFor201) | commit -400 | [ApiResponseFor400](#commit.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#commit.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#commit.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#commit.ApiResponseFor404) | Resource Not Found -412 | [ApiResponseFor412](#commit.ApiResponseFor412) | Precondition Failed (e.g. a pre-commit hook returned a failure) -default | [ApiResponseForDefault](#commit.ApiResponseForDefault) | Internal Server Error - -#### commit.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Commit**](../../models/Commit.md) | | - - -#### commit.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### commit.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### commit.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### commit.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### commit.ApiResponseFor412 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor412ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor412ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### commit.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_commit** - -> Commit get_commit(repositorycommit_id) - -get commit - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import commits_api -from lakefs_client.model.commit import Commit -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = commits_api.CommitsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'commitId': "commitId_example", - } - try: - # get commit - api_response = api_instance.get_commit( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling CommitsApi->get_commit: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -commitId | CommitIdSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CommitIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_commit.ApiResponseFor200) | commit -401 | [ApiResponseFor401](#get_commit.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_commit.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_commit.ApiResponseForDefault) | Internal Server Error - -#### get_commit.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Commit**](../../models/Commit.md) | | - - -#### get_commit.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_commit.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_commit.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **log_branch_commits** - -> CommitList log_branch_commits(repositorybranch) - -get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import commits_api -from lakefs_client.model.commit_list import CommitList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = commits_api.CommitsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - } - try: - # get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref - api_response = api_instance.log_branch_commits( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling CommitsApi->log_branch_commits: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'after': "after_example", - 'amount': 100, - } - try: - # get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref - api_response = api_instance.log_branch_commits( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling CommitsApi->log_branch_commits: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#log_branch_commits.ApiResponseFor200) | commit log -401 | [ApiResponseFor401](#log_branch_commits.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#log_branch_commits.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#log_branch_commits.ApiResponseForDefault) | Internal Server Error - -#### log_branch_commits.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CommitList**](../../models/CommitList.md) | | - - -#### log_branch_commits.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### log_branch_commits.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### log_branch_commits.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/ConfigApi.md b/clients/python/docs/apis/tags/ConfigApi.md deleted file mode 100644 index 93ee94f1436..00000000000 --- a/clients/python/docs/apis/tags/ConfigApi.md +++ /dev/null @@ -1,693 +0,0 @@ - -# lakefs_client.apis.tags.config_api.ConfigApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_garbage_collection_config**](#get_garbage_collection_config) | **get** /config/garbage-collection | -[**get_lake_fs_version**](#get_lake_fs_version) | **get** /config/version | -[**get_setup_state**](#get_setup_state) | **get** /setup_lakefs | check if the lakeFS installation is already set up -[**get_storage_config**](#get_storage_config) | **get** /config/storage | -[**setup**](#setup) | **post** /setup_lakefs | setup lakeFS and create a first user -[**setup_comm_prefs**](#setup_comm_prefs) | **post** /setup_comm_prefs | setup communications preferences - -# **get_garbage_collection_config** - -> GarbageCollectionConfig get_garbage_collection_config() - - - -get information of gc settings - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import config_api -from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = config_api.ConfigApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.get_garbage_collection_config() - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ConfigApi->get_garbage_collection_config: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_garbage_collection_config.ApiResponseFor200) | lakeFS garbage collection config -401 | [ApiResponseFor401](#get_garbage_collection_config.ApiResponseFor401) | Unauthorized - -#### get_garbage_collection_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GarbageCollectionConfig**](../../models/GarbageCollectionConfig.md) | | - - -#### get_garbage_collection_config.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_lake_fs_version** - -> VersionConfig get_lake_fs_version() - - - -get version of lakeFS server - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import config_api -from lakefs_client.model.version_config import VersionConfig -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = config_api.ConfigApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.get_lake_fs_version() - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ConfigApi->get_lake_fs_version: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_lake_fs_version.ApiResponseFor200) | lakeFS version -401 | [ApiResponseFor401](#get_lake_fs_version.ApiResponseFor401) | Unauthorized - -#### get_lake_fs_version.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**VersionConfig**](../../models/VersionConfig.md) | | - - -#### get_lake_fs_version.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_setup_state** - -> SetupState get_setup_state() - -check if the lakeFS installation is already set up - -### Example - -```python -import lakefs_client -from lakefs_client.apis.tags import config_api -from lakefs_client.model.error import Error -from lakefs_client.model.setup_state import SetupState -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = config_api.ConfigApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # check if the lakeFS installation is already set up - api_response = api_instance.get_setup_state() - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ConfigApi->get_setup_state: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_setup_state.ApiResponseFor200) | lakeFS setup state -default | [ApiResponseForDefault](#get_setup_state.ApiResponseForDefault) | Internal Server Error - -#### get_setup_state.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SetupState**](../../models/SetupState.md) | | - - -#### get_setup_state.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_storage_config** - -> StorageConfig get_storage_config() - - - -retrieve lakeFS storage configuration - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import config_api -from lakefs_client.model.error import Error -from lakefs_client.model.storage_config import StorageConfig -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = config_api.ConfigApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.get_storage_config() - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ConfigApi->get_storage_config: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_storage_config.ApiResponseFor200) | lakeFS storage configuration -401 | [ApiResponseFor401](#get_storage_config.ApiResponseFor401) | Unauthorized - -#### get_storage_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StorageConfig**](../../models/StorageConfig.md) | | - - -#### get_storage_config.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **setup** - -> CredentialsWithSecret setup(setup) - -setup lakeFS and create a first user - -### Example - -```python -import lakefs_client -from lakefs_client.apis.tags import config_api -from lakefs_client.model.credentials_with_secret import CredentialsWithSecret -from lakefs_client.model.setup import Setup -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = config_api.ConfigApi(api_client) - - # example passing only required values which don't have defaults set - body = Setup( - username="username_example", - key=AccessKeyCredentials( - access_key_id="AKIAIOSFODNN7EXAMPLE", - secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - ), - ) - try: - # setup lakeFS and create a first user - api_response = api_instance.setup( - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ConfigApi->setup: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Setup**](../../models/Setup.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#setup.ApiResponseFor200) | user created successfully -400 | [ApiResponseFor400](#setup.ApiResponseFor400) | bad request -409 | [ApiResponseFor409](#setup.ApiResponseFor409) | setup was already called -default | [ApiResponseForDefault](#setup.ApiResponseForDefault) | Internal Server Error - -#### setup.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CredentialsWithSecret**](../../models/CredentialsWithSecret.md) | | - - -#### setup.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### setup.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### setup.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **setup_comm_prefs** - -> NextStep setup_comm_prefs(comm_prefs_input) - -setup communications preferences - -### Example - -```python -import lakefs_client -from lakefs_client.apis.tags import config_api -from lakefs_client.model.comm_prefs_input import CommPrefsInput -from lakefs_client.model.error import Error -from lakefs_client.model.next_step import NextStep -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = config_api.ConfigApi(api_client) - - # example passing only required values which don't have defaults set - body = CommPrefsInput( - email="email_example", - feature_updates=True, - security_updates=True, - ) - try: - # setup communications preferences - api_response = api_instance.setup_comm_prefs( - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ConfigApi->setup_comm_prefs: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CommPrefsInput**](../../models/CommPrefsInput.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#setup_comm_prefs.ApiResponseFor200) | communication preferences saved successfully -409 | [ApiResponseFor409](#setup_comm_prefs.ApiResponseFor409) | setup was already completed -412 | [ApiResponseFor412](#setup_comm_prefs.ApiResponseFor412) | wrong setup state for this operation -default | [ApiResponseForDefault](#setup_comm_prefs.ApiResponseForDefault) | Internal Server Error - -#### setup_comm_prefs.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NextStep**](../../models/NextStep.md) | | - - -#### setup_comm_prefs.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### setup_comm_prefs.ApiResponseFor412 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor412ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor412ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### setup_comm_prefs.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/ExperimentalApi.md b/clients/python/docs/apis/tags/ExperimentalApi.md deleted file mode 100644 index e2170f9a1c7..00000000000 --- a/clients/python/docs/apis/tags/ExperimentalApi.md +++ /dev/null @@ -1,238 +0,0 @@ - -# lakefs_client.apis.tags.experimental_api.ExperimentalApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**otf_diff**](#otf_diff) | **get** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff - -# **otf_diff** - -> OtfDiffList otf_diff(repositoryleft_refright_reftable_pathtype) - -perform otf diff - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import experimental_api -from lakefs_client.model.otf_diff_list import OtfDiffList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = experimental_api.ExperimentalApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'left_ref': "left_ref_example", - 'right_ref': "right_ref_example", - } - query_params = { - 'table_path': "table_path_example", - 'type': "type_example", - } - try: - # perform otf diff - api_response = api_instance.otf_diff( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ExperimentalApi->otf_diff: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -table_path | TablePathSchema | | -type | TypeSchema | | - - -# TablePathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TypeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -left_ref | LeftRefSchema | | -right_ref | RightRefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# LeftRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RightRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#otf_diff.ApiResponseFor200) | diff list -401 | [ApiResponseFor401](#otf_diff.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#otf_diff.ApiResponseFor404) | Resource Not Found -412 | [ApiResponseFor412](#otf_diff.ApiResponseFor412) | Precondition Failed -default | [ApiResponseForDefault](#otf_diff.ApiResponseForDefault) | Internal Server Error - -#### otf_diff.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OtfDiffList**](../../models/OtfDiffList.md) | | - - -#### otf_diff.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### otf_diff.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### otf_diff.ApiResponseFor412 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor412ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor412ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### otf_diff.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/HealthCheckApi.md b/clients/python/docs/apis/tags/HealthCheckApi.md deleted file mode 100644 index 55b69b8cf1b..00000000000 --- a/clients/python/docs/apis/tags/HealthCheckApi.md +++ /dev/null @@ -1,63 +0,0 @@ - -# lakefs_client.apis.tags.health_check_api.HealthCheckApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**health_check**](#health_check) | **get** /healthcheck | - -# **health_check** - -> health_check() - - - -check that the API server is up and running - -### Example - -```python -import lakefs_client -from lakefs_client.apis.tags import health_check_api -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = health_check_api.HealthCheckApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.health_check() - except lakefs_client.ApiException as e: - print("Exception when calling HealthCheckApi->health_check: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#health_check.ApiResponseFor204) | NoContent - -#### health_check.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/MetadataApi.md b/clients/python/docs/apis/tags/MetadataApi.md deleted file mode 100644 index 018c347b4ca..00000000000 --- a/clients/python/docs/apis/tags/MetadataApi.md +++ /dev/null @@ -1,609 +0,0 @@ - -# lakefs_client.apis.tags.metadata_api.MetadataApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_symlink_file**](#create_symlink_file) | **post** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory -[**get_meta_range**](#get_meta_range) | **get** /repositories/{repository}/metadata/meta_range/{meta_range} | return URI to a meta-range file -[**get_range**](#get_range) | **get** /repositories/{repository}/metadata/range/{range} | return URI to a range file - -# **create_symlink_file** - -> StorageURI create_symlink_file(repositorybranch) - -creates symlink files corresponding to the given directory - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import metadata_api -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = metadata_api.MetadataApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - } - try: - # creates symlink files corresponding to the given directory - api_response = api_instance.create_symlink_file( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling MetadataApi->create_symlink_file: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'location': "location_example", - } - try: - # creates symlink files corresponding to the given directory - api_response = api_instance.create_symlink_file( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling MetadataApi->create_symlink_file: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -location | LocationSchema | | optional - - -# LocationSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_symlink_file.ApiResponseFor201) | location created -401 | [ApiResponseFor401](#create_symlink_file.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#create_symlink_file.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#create_symlink_file.ApiResponseForDefault) | Internal Server Error - -#### create_symlink_file.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StorageURI**](../../models/StorageURI.md) | | - - -#### create_symlink_file.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_symlink_file.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_symlink_file.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_meta_range** - -> StorageURI get_meta_range(repositorymeta_range) - -return URI to a meta-range file - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import metadata_api -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = metadata_api.MetadataApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'meta_range': "meta_range_example", - } - try: - # return URI to a meta-range file - api_response = api_instance.get_meta_range( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling MetadataApi->get_meta_range: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -meta_range | MetaRangeSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# MetaRangeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_meta_range.ApiResponseFor200) | meta-range URI -401 | [ApiResponseFor401](#get_meta_range.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_meta_range.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_meta_range.ApiResponseForDefault) | Internal Server Error - -#### get_meta_range.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | ResponseHeadersFor200 | | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StorageURI**](../../models/StorageURI.md) | | - -#### ResponseHeadersFor200 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Location | LocationSchema | | optional - -# LocationSchema - -redirect to S3 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | redirect to S3 | - - -#### get_meta_range.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_meta_range.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_meta_range.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_range** - -> StorageURI get_range(repositoryrange) - -return URI to a range file - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import metadata_api -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = metadata_api.MetadataApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'range': "range_example", - } - try: - # return URI to a range file - api_response = api_instance.get_range( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling MetadataApi->get_range: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -range | RangeSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RangeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_range.ApiResponseFor200) | range URI -401 | [ApiResponseFor401](#get_range.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_range.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_range.ApiResponseForDefault) | Internal Server Error - -#### get_range.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | ResponseHeadersFor200 | | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StorageURI**](../../models/StorageURI.md) | | - -#### ResponseHeadersFor200 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Location | LocationSchema | | optional - -# LocationSchema - -redirect to S3 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | redirect to S3 | - - -#### get_range.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_range.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_range.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/ModelImportApi.md b/clients/python/docs/apis/tags/ModelImportApi.md deleted file mode 100644 index 14cc943ff32..00000000000 --- a/clients/python/docs/apis/tags/ModelImportApi.md +++ /dev/null @@ -1,429 +0,0 @@ - -# lakefs_client.apis.tags.model_import_api.ModelImportApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_meta_range**](#create_meta_range) | **post** /repositories/{repository}/branches/metaranges | create a lakeFS metarange file from the given ranges -[**ingest_range**](#ingest_range) | **post** /repositories/{repository}/branches/ranges | create a lakeFS range file from the source uri - -# **create_meta_range** - -> MetaRangeCreationResponse create_meta_range(repositorymeta_range_creation) - -create a lakeFS metarange file from the given ranges - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import model_import_api -from lakefs_client.model.meta_range_creation import MetaRangeCreation -from lakefs_client.model.meta_range_creation_response import MetaRangeCreationResponse -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_import_api.ModelImportApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = MetaRangeCreation( - ranges=[ - RangeMetadata( - id="480e19972a6fbe98ab8e81ae5efdfd1a29037587e91244e87abd4adefffdb01c", - min_key="production/collections/some/file_1.parquet", - max_key="production/collections/some/file_8229.parquet", - count=1, - estimated_size=1, - ) - ], - ) - try: - # create a lakeFS metarange file from the given ranges - api_response = api_instance.create_meta_range( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ModelImportApi->create_meta_range: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MetaRangeCreation**](../../models/MetaRangeCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_meta_range.ApiResponseFor201) | metarange metadata -400 | [ApiResponseFor400](#create_meta_range.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#create_meta_range.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#create_meta_range.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#create_meta_range.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#create_meta_range.ApiResponseForDefault) | Internal Server Error - -#### create_meta_range.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MetaRangeCreationResponse**](../../models/MetaRangeCreationResponse.md) | | - - -#### create_meta_range.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_meta_range.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_meta_range.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_meta_range.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_meta_range.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **ingest_range** - -> IngestRangeCreationResponse ingest_range(repositorystage_range_creation) - -create a lakeFS range file from the source uri - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import model_import_api -from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse -from lakefs_client.model.stage_range_creation import StageRangeCreation -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_import_api.ModelImportApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = StageRangeCreation( - from_source_uri="s3://my-bucket/production/collections/", - after="production/collections/some/file.parquet", - prepend="collections/", - continuation_token="continuation_token_example", - ) - try: - # create a lakeFS range file from the source uri - api_response = api_instance.ingest_range( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ModelImportApi->ingest_range: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StageRangeCreation**](../../models/StageRangeCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#ingest_range.ApiResponseFor201) | range metadata -400 | [ApiResponseFor400](#ingest_range.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#ingest_range.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#ingest_range.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#ingest_range.ApiResponseForDefault) | Internal Server Error - -#### ingest_range.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**IngestRangeCreationResponse**](../../models/IngestRangeCreationResponse.md) | | - - -#### ingest_range.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### ingest_range.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### ingest_range.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### ingest_range.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/ObjectsApi.md b/clients/python/docs/apis/tags/ObjectsApi.md deleted file mode 100644 index 8b5cfb96928..00000000000 --- a/clients/python/docs/apis/tags/ObjectsApi.md +++ /dev/null @@ -1,2581 +0,0 @@ - -# lakefs_client.apis.tags.objects_api.ObjectsApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**copy_object**](#copy_object) | **post** /repositories/{repository}/branches/{branch}/objects/copy | create a copy of an object -[**delete_object**](#delete_object) | **delete** /repositories/{repository}/branches/{branch}/objects | delete object. Missing objects will not return a NotFound error. -[**delete_objects**](#delete_objects) | **post** /repositories/{repository}/branches/{branch}/objects/delete | delete objects. Missing objects will not return a NotFound error. -[**get_object**](#get_object) | **get** /repositories/{repository}/refs/{ref}/objects | get object content -[**get_underlying_properties**](#get_underlying_properties) | **get** /repositories/{repository}/refs/{ref}/objects/underlyingProperties | get object properties on underlying storage -[**head_object**](#head_object) | **head** /repositories/{repository}/refs/{ref}/objects | check if object exists -[**list_objects**](#list_objects) | **get** /repositories/{repository}/refs/{ref}/objects/ls | list objects under a given prefix -[**stage_object**](#stage_object) | **put** /repositories/{repository}/branches/{branch}/objects | stage an object's metadata for the given branch -[**stat_object**](#stat_object) | **get** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata -[**upload_object**](#upload_object) | **post** /repositories/{repository}/branches/{branch}/objects | - -# **copy_object** - -> ObjectStats copy_object(repositorybranchdest_pathobject_copy_creation) - -create a copy of an object - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.object_copy_creation import ObjectCopyCreation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'dest_path': "dest_path_example", - } - body = ObjectCopyCreation( - src_path="src_path_example", - src_ref="src_ref_example", - ) - try: - # create a copy of an object - api_response = api_instance.copy_object( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->copy_object: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectCopyCreation**](../../models/ObjectCopyCreation.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -dest_path | DestPathSchema | | - - -# DestPathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#copy_object.ApiResponseFor201) | Copy object response -400 | [ApiResponseFor400](#copy_object.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#copy_object.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#copy_object.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#copy_object.ApiResponseForDefault) | Internal Server Error - -#### copy_object.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectStats**](../../models/ObjectStats.md) | | - - -#### copy_object.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### copy_object.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### copy_object.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### copy_object.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_object** - -> delete_object(repositorybranchpath) - -delete object. Missing objects will not return a NotFound error. - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'path': "path_example", - } - try: - # delete object. Missing objects will not return a NotFound error. - api_response = api_instance.delete_object( - path_params=path_params, - query_params=query_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->delete_object: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_object.ApiResponseFor204) | object deleted successfully -401 | [ApiResponseFor401](#delete_object.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#delete_object.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#delete_object.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_object.ApiResponseForDefault) | Internal Server Error - -#### delete_object.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_object.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_object.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_object.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_object.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_objects** - -> ObjectErrorList delete_objects(repositorybranchpath_list) - -delete objects. Missing objects will not return a NotFound error. - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.object_error_list import ObjectErrorList -from lakefs_client.model.error import Error -from lakefs_client.model.path_list import PathList -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - body = PathList( - paths=[ - "paths_example" - ], - ) - try: - # delete objects. Missing objects will not return a NotFound error. - api_response = api_instance.delete_objects( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->delete_objects: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PathList**](../../models/PathList.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_objects.ApiResponseFor200) | Delete objects response -401 | [ApiResponseFor401](#delete_objects.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#delete_objects.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#delete_objects.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_objects.ApiResponseForDefault) | Internal Server Error - -#### delete_objects.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectErrorList**](../../models/ObjectErrorList.md) | | - - -#### delete_objects.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_objects.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_objects.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_objects.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_object** - -> file_type get_object(repositoryrefpath) - -get object content - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'path': "path_example", - } - header_params = { - } - try: - # get object content - api_response = api_instance.get_object( - path_params=path_params, - query_params=query_params, - header_params=header_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->get_object: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'path': "path_example", - 'presign': True, - } - header_params = { - 'Range': "bytes=0-1023", - } - try: - # get object content - api_response = api_instance.get_object( - path_params=path_params, - query_params=query_params, - header_params=header_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->get_object: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/octet-stream', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | -presign | PresignSchema | | optional - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PresignSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### header_params -#### RequestHeaderParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Range | RangeSchema | | optional - -# RangeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -ref | RefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_object.ApiResponseFor200) | object content -206 | [ApiResponseFor206](#get_object.ApiResponseFor206) | partial object content -302 | [ApiResponseFor302](#get_object.ApiResponseFor302) | Redirect to a pre-signed URL for the object -401 | [ApiResponseFor401](#get_object.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_object.ApiResponseFor404) | Resource Not Found -410 | [ApiResponseFor410](#get_object.ApiResponseFor410) | object expired -416 | [ApiResponseFor416](#get_object.ApiResponseFor416) | Requested Range Not Satisfiable -default | [ApiResponseForDefault](#get_object.ApiResponseForDefault) | Internal Server Error - -#### get_object.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | -headers | ResponseHeadersFor200 | | - -# SchemaFor200ResponseBodyApplicationOctetStream - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | -#### ResponseHeadersFor200 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Content-Length | ContentLengthSchema | | optional -Last-Modified | LastModifiedSchema | | optional -ETag | ETagSchema | | optional - -# ContentLengthSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# LastModifiedSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ETagSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - - -#### get_object.ApiResponseFor206 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor206ResponseBodyApplicationOctetStream, ] | | -headers | ResponseHeadersFor206 | | - -# SchemaFor206ResponseBodyApplicationOctetStream - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | -#### ResponseHeadersFor206 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Content-Length | ContentLengthSchema | | optional -Content-Range | ContentRangeSchema | | optional -Last-Modified | LastModifiedSchema | | optional -ETag | ETagSchema | | optional - -# ContentLengthSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# ContentRangeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# LastModifiedSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ETagSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - - -#### get_object.ApiResponseFor302 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | ResponseHeadersFor302 | | -#### ResponseHeadersFor302 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Location | LocationSchema | | optional - -# LocationSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - - -#### get_object.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_object.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_object.ApiResponseFor410 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor410ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor410ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_object.ApiResponseFor416 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor416ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor416ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_object.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_underlying_properties** - -> UnderlyingObjectProperties get_underlying_properties(repositoryrefpath) - -get object properties on underlying storage - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.underlying_object_properties import UnderlyingObjectProperties -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'path': "path_example", - } - try: - # get object properties on underlying storage - api_response = api_instance.get_underlying_properties( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->get_underlying_properties: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -ref | RefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_underlying_properties.ApiResponseFor200) | object metadata on underlying storage -401 | [ApiResponseFor401](#get_underlying_properties.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_underlying_properties.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_underlying_properties.ApiResponseForDefault) | Internal Server Error - -#### get_underlying_properties.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UnderlyingObjectProperties**](../../models/UnderlyingObjectProperties.md) | | - - -#### get_underlying_properties.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_underlying_properties.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_underlying_properties.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **head_object** - -> head_object(repositoryrefpath) - -check if object exists - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'path': "path_example", - } - header_params = { - } - try: - # check if object exists - api_response = api_instance.head_object( - path_params=path_params, - query_params=query_params, - header_params=header_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->head_object: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'path': "path_example", - } - header_params = { - 'Range': "bytes=0-1023", - } - try: - # check if object exists - api_response = api_instance.head_object( - path_params=path_params, - query_params=query_params, - header_params=header_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->head_object: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### header_params -#### RequestHeaderParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Range | RangeSchema | | optional - -# RangeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -ref | RefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#head_object.ApiResponseFor200) | object exists -206 | [ApiResponseFor206](#head_object.ApiResponseFor206) | partial object content info -401 | [ApiResponseFor401](#head_object.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#head_object.ApiResponseFor404) | object not found -410 | [ApiResponseFor410](#head_object.ApiResponseFor410) | object expired -416 | [ApiResponseFor416](#head_object.ApiResponseFor416) | Requested Range Not Satisfiable -default | [ApiResponseForDefault](#head_object.ApiResponseForDefault) | internal server error - -#### head_object.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | ResponseHeadersFor200 | | -#### ResponseHeadersFor200 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Content-Length | ContentLengthSchema | | optional -Last-Modified | LastModifiedSchema | | optional -ETag | ETagSchema | | optional - -# ContentLengthSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# LastModifiedSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ETagSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - - -#### head_object.ApiResponseFor206 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | ResponseHeadersFor206 | | -#### ResponseHeadersFor206 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -Content-Length | ContentLengthSchema | | optional -Content-Range | ContentRangeSchema | | optional -Last-Modified | LastModifiedSchema | | optional -ETag | ETagSchema | | optional - -# ContentLengthSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# ContentRangeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# LastModifiedSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ETagSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - - -#### head_object.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### head_object.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### head_object.ApiResponseFor410 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### head_object.ApiResponseFor416 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### head_object.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_objects** - -> ObjectStatsList list_objects(repositoryref) - -list objects under a given prefix - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.object_stats_list import ObjectStatsList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - } - try: - # list objects under a given prefix - api_response = api_instance.list_objects( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->list_objects: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'user_metadata': True, - 'presign': True, - 'after': "after_example", - 'amount': 100, - 'delimiter': "delimiter_example", - 'prefix': "prefix_example", - } - try: - # list objects under a given prefix - api_response = api_instance.list_objects( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->list_objects: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -user_metadata | UserMetadataSchema | | optional -presign | PresignSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional -delimiter | DelimiterSchema | | optional -prefix | PrefixSchema | | optional - - -# UserMetadataSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of True - -# PresignSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -# DelimiterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -ref | RefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_objects.ApiResponseFor200) | object listing -401 | [ApiResponseFor401](#list_objects.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_objects.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_objects.ApiResponseForDefault) | Internal Server Error - -#### list_objects.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectStatsList**](../../models/ObjectStatsList.md) | | - - -#### list_objects.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_objects.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_objects.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **stage_object** - -> ObjectStats stage_object(repositorybranchpathobject_stage_creation) - -stage an object's metadata for the given branch - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.object_stage_creation import ObjectStageCreation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'path': "path_example", - } - body = ObjectStageCreation( - physical_address="physical_address_example", - checksum="checksum_example", - size_bytes=1, - mtime=1, - metadata=ObjectUserMetadata( - key="key_example", - ), - content_type="content_type_example", - ) - try: - # stage an object's metadata for the given branch - api_response = api_instance.stage_object( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->stage_object: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectStageCreation**](../../models/ObjectStageCreation.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#stage_object.ApiResponseFor201) | object metadata -400 | [ApiResponseFor400](#stage_object.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#stage_object.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#stage_object.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#stage_object.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#stage_object.ApiResponseForDefault) | Internal Server Error - -#### stage_object.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectStats**](../../models/ObjectStats.md) | | - - -#### stage_object.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### stage_object.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### stage_object.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### stage_object.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### stage_object.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **stat_object** - -> ObjectStats stat_object(repositoryrefpath) - -get object metadata - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'path': "path_example", - } - try: - # get object metadata - api_response = api_instance.stat_object( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->stat_object: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'path': "path_example", - 'user_metadata': True, - 'presign': True, - } - try: - # get object metadata - api_response = api_instance.stat_object( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->stat_object: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | -user_metadata | UserMetadataSchema | | optional -presign | PresignSchema | | optional - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserMetadataSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of True - -# PresignSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -ref | RefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#stat_object.ApiResponseFor200) | object metadata -401 | [ApiResponseFor401](#stat_object.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#stat_object.ApiResponseFor404) | Resource Not Found -410 | [ApiResponseFor410](#stat_object.ApiResponseFor410) | object gone (but partial metadata may be available) -default | [ApiResponseForDefault](#stat_object.ApiResponseForDefault) | Internal Server Error - -#### stat_object.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectStats**](../../models/ObjectStats.md) | | - - -#### stat_object.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### stat_object.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### stat_object.ApiResponseFor410 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### stat_object.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **upload_object** - -> ObjectStats upload_object(repositorybranchpath) - - - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import objects_api -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = objects_api.ObjectsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'path': "path_example", - } - header_params = { - } - try: - api_response = api_instance.upload_object( - path_params=path_params, - query_params=query_params, - header_params=header_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->upload_object: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'path': "path_example", - 'storageClass': "storageClass_example", - } - header_params = { - 'If-None-Match': "*", - } - body = dict( - content=open('/path/to/file', 'rb'), - ) - try: - api_response = api_instance.upload_object( - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling ObjectsApi->upload_object: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**content** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | Only a single file per upload which must be named \"content\". | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | -storageClass | StorageClassSchema | | optional - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# StorageClassSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### header_params -#### RequestHeaderParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -If-None-Match | IfNoneMatchSchema | | optional - -# IfNoneMatchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#upload_object.ApiResponseFor201) | object metadata -400 | [ApiResponseFor400](#upload_object.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#upload_object.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#upload_object.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#upload_object.ApiResponseFor404) | Resource Not Found -412 | [ApiResponseFor412](#upload_object.ApiResponseFor412) | Precondition Failed -default | [ApiResponseForDefault](#upload_object.ApiResponseForDefault) | Internal Server Error - -#### upload_object.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectStats**](../../models/ObjectStats.md) | | - - -#### upload_object.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### upload_object.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### upload_object.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### upload_object.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### upload_object.ApiResponseFor412 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor412ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor412ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### upload_object.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/OtfDiffApi.md b/clients/python/docs/apis/tags/OtfDiffApi.md deleted file mode 100644 index bb75c4aa6af..00000000000 --- a/clients/python/docs/apis/tags/OtfDiffApi.md +++ /dev/null @@ -1,238 +0,0 @@ - -# lakefs_client.apis.tags.otf_diff_api.OtfDiffApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**otf_diff**](#otf_diff) | **get** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff - -# **otf_diff** - -> OtfDiffList otf_diff(repositoryleft_refright_reftable_pathtype) - -perform otf diff - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import otf_diff_api -from lakefs_client.model.otf_diff_list import OtfDiffList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = otf_diff_api.OtfDiffApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'left_ref': "left_ref_example", - 'right_ref': "right_ref_example", - } - query_params = { - 'table_path': "table_path_example", - 'type': "type_example", - } - try: - # perform otf diff - api_response = api_instance.otf_diff( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling OtfDiffApi->otf_diff: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -table_path | TablePathSchema | | -type | TypeSchema | | - - -# TablePathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TypeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -left_ref | LeftRefSchema | | -right_ref | RightRefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# LeftRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RightRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#otf_diff.ApiResponseFor200) | diff list -401 | [ApiResponseFor401](#otf_diff.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#otf_diff.ApiResponseFor404) | Resource Not Found -412 | [ApiResponseFor412](#otf_diff.ApiResponseFor412) | Precondition Failed -default | [ApiResponseForDefault](#otf_diff.ApiResponseForDefault) | Internal Server Error - -#### otf_diff.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OtfDiffList**](../../models/OtfDiffList.md) | | - - -#### otf_diff.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### otf_diff.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### otf_diff.ApiResponseFor412 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor412ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor412ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### otf_diff.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/RefsApi.md b/clients/python/docs/apis/tags/RefsApi.md deleted file mode 100644 index fb04ebfb4e1..00000000000 --- a/clients/python/docs/apis/tags/RefsApi.md +++ /dev/null @@ -1,1387 +0,0 @@ - -# lakefs_client.apis.tags.refs_api.RefsApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**diff_refs**](#diff_refs) | **get** /repositories/{repository}/refs/{leftRef}/diff/{rightRef} | diff references -[**dump_refs**](#dump_refs) | **put** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store -[**find_merge_base**](#find_merge_base) | **get** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | find the merge base for 2 references -[**log_commits**](#log_commits) | **get** /repositories/{repository}/refs/{ref}/commits | get commit log from ref. If both objects and prefixes are empty, return all commits. -[**merge_into_branch**](#merge_into_branch) | **post** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | merge references -[**restore_refs**](#restore_refs) | **put** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store - -# **diff_refs** - -> DiffList diff_refs(repositoryleft_refright_ref) - -diff references - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import refs_api -from lakefs_client.model.diff_list import DiffList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = refs_api.RefsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'leftRef': "leftRef_example", - 'rightRef': "rightRef_example", - } - query_params = { - } - try: - # diff references - api_response = api_instance.diff_refs( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->diff_refs: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'leftRef': "leftRef_example", - 'rightRef': "rightRef_example", - } - query_params = { - 'after': "after_example", - 'amount': 100, - 'prefix': "prefix_example", - 'delimiter': "delimiter_example", - 'type': "three_dot", - } - try: - # diff references - api_response = api_instance.diff_refs( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->diff_refs: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -after | AfterSchema | | optional -amount | AmountSchema | | optional -prefix | PrefixSchema | | optional -delimiter | DelimiterSchema | | optional -type | TypeSchema | | optional - - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# DelimiterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TypeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["two_dot", "three_dot", ] if omitted the server will use the default value of "three_dot" - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -leftRef | LeftRefSchema | | -rightRef | RightRefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# LeftRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RightRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#diff_refs.ApiResponseFor200) | diff between refs -401 | [ApiResponseFor401](#diff_refs.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#diff_refs.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#diff_refs.ApiResponseForDefault) | Internal Server Error - -#### diff_refs.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**DiffList**](../../models/DiffList.md) | | - - -#### diff_refs.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### diff_refs.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### diff_refs.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **dump_refs** - -> RefsDump dump_refs(repository) - -Dump repository refs (tags, commits, branches) to object store - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import refs_api -from lakefs_client.model.refs_dump import RefsDump -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = refs_api.RefsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - # Dump repository refs (tags, commits, branches) to object store - api_response = api_instance.dump_refs( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->dump_refs: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#dump_refs.ApiResponseFor201) | refs dump -400 | [ApiResponseFor400](#dump_refs.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#dump_refs.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#dump_refs.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#dump_refs.ApiResponseForDefault) | Internal Server Error - -#### dump_refs.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefsDump**](../../models/RefsDump.md) | | - - -#### dump_refs.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### dump_refs.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### dump_refs.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### dump_refs.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_merge_base** - -> FindMergeBaseResult find_merge_base(repositorysource_refdestination_branch) - -find the merge base for 2 references - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import refs_api -from lakefs_client.model.find_merge_base_result import FindMergeBaseResult -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = refs_api.RefsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'sourceRef': "sourceRef_example", - 'destinationBranch': "destinationBranch_example", - } - try: - # find the merge base for 2 references - api_response = api_instance.find_merge_base( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->find_merge_base: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -sourceRef | SourceRefSchema | | -destinationBranch | DestinationBranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SourceRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# DestinationBranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_merge_base.ApiResponseFor200) | Found the merge base -400 | [ApiResponseFor400](#find_merge_base.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#find_merge_base.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#find_merge_base.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#find_merge_base.ApiResponseForDefault) | Internal Server Error - -#### find_merge_base.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FindMergeBaseResult**](../../models/FindMergeBaseResult.md) | | - - -#### find_merge_base.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### find_merge_base.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### find_merge_base.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### find_merge_base.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **log_commits** - -> CommitList log_commits(repositoryref) - -get commit log from ref. If both objects and prefixes are empty, return all commits. - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import refs_api -from lakefs_client.model.commit_list import CommitList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = refs_api.RefsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - } - try: - # get commit log from ref. If both objects and prefixes are empty, return all commits. - api_response = api_instance.log_commits( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->log_commits: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'ref': "ref_example", - } - query_params = { - 'after': "after_example", - 'amount': 100, - 'objects': [ - "objects_example" - ], - 'prefixes': [ - "prefixes_example" - ], - 'limit': True, - } - try: - # get commit log from ref. If both objects and prefixes are empty, return all commits. - api_response = api_instance.log_commits( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->log_commits: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -after | AfterSchema | | optional -amount | AmountSchema | | optional -objects | ObjectsSchema | | optional -prefixes | PrefixesSchema | | optional -limit | LimitSchema | | optional - - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -# ObjectsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# PrefixesSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# LimitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -ref | RefSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#log_commits.ApiResponseFor200) | commit log -401 | [ApiResponseFor401](#log_commits.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#log_commits.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#log_commits.ApiResponseForDefault) | Internal Server Error - -#### log_commits.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**CommitList**](../../models/CommitList.md) | | - - -#### log_commits.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### log_commits.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### log_commits.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **merge_into_branch** - -> MergeResult merge_into_branch(repositorysource_refdestination_branch) - -merge references - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import refs_api -from lakefs_client.model.merge import Merge -from lakefs_client.model.error import Error -from lakefs_client.model.merge_result import MergeResult -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = refs_api.RefsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'sourceRef': "sourceRef_example", - 'destinationBranch': "destinationBranch_example", - } - try: - # merge references - api_response = api_instance.merge_into_branch( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->merge_into_branch: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'sourceRef': "sourceRef_example", - 'destinationBranch': "destinationBranch_example", - } - body = Merge( - message="message_example", - metadata=dict( - "key": "key_example", - ), - strategy="strategy_example", - ) - try: - # merge references - api_response = api_instance.merge_into_branch( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->merge_into_branch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Merge**](../../models/Merge.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -sourceRef | SourceRefSchema | | -destinationBranch | DestinationBranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SourceRefSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# DestinationBranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#merge_into_branch.ApiResponseFor200) | merge completed -400 | [ApiResponseFor400](#merge_into_branch.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#merge_into_branch.ApiResponseFor401) | Unauthorized -403 | [ApiResponseFor403](#merge_into_branch.ApiResponseFor403) | Forbidden -404 | [ApiResponseFor404](#merge_into_branch.ApiResponseFor404) | Resource Not Found -409 | [ApiResponseFor409](#merge_into_branch.ApiResponseFor409) | Conflict Deprecated: content schema will return Error format and not an empty MergeResult -412 | [ApiResponseFor412](#merge_into_branch.ApiResponseFor412) | precondition failed (e.g. a pre-merge hook returned a failure) -default | [ApiResponseForDefault](#merge_into_branch.ApiResponseForDefault) | Internal Server Error - -#### merge_into_branch.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MergeResult**](../../models/MergeResult.md) | | - - -#### merge_into_branch.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### merge_into_branch.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### merge_into_branch.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### merge_into_branch.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### merge_into_branch.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MergeResult**](../../models/MergeResult.md) | | - - -#### merge_into_branch.ApiResponseFor412 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor412ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor412ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### merge_into_branch.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **restore_refs** - -> restore_refs(repositoryrefs_dump) - -Restore repository refs (tags, commits, branches) from object store - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import refs_api -from lakefs_client.model.refs_dump import RefsDump -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = refs_api.RefsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = RefsDump( - commits_meta_range_id="commits_meta_range_id_example", - tags_meta_range_id="tags_meta_range_id_example", - branches_meta_range_id="branches_meta_range_id_example", - ) - try: - # Restore repository refs (tags, commits, branches) from object store - api_response = api_instance.restore_refs( - path_params=path_params, - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling RefsApi->restore_refs: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefsDump**](../../models/RefsDump.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#restore_refs.ApiResponseFor200) | refs successfully loaded -400 | [ApiResponseFor400](#restore_refs.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#restore_refs.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#restore_refs.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#restore_refs.ApiResponseForDefault) | Internal Server Error - -#### restore_refs.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### restore_refs.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### restore_refs.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### restore_refs.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### restore_refs.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/RepositoriesApi.md b/clients/python/docs/apis/tags/RepositoriesApi.md deleted file mode 100644 index 96cdee7b12d..00000000000 --- a/clients/python/docs/apis/tags/RepositoriesApi.md +++ /dev/null @@ -1,1262 +0,0 @@ - -# lakefs_client.apis.tags.repositories_api.RepositoriesApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_branch_protection_rule**](#create_branch_protection_rule) | **post** /repositories/{repository}/branch_protection | -[**create_repository**](#create_repository) | **post** /repositories | create repository -[**delete_branch_protection_rule**](#delete_branch_protection_rule) | **delete** /repositories/{repository}/branch_protection | -[**delete_repository**](#delete_repository) | **delete** /repositories/{repository} | delete repository -[**get_branch_protection_rules**](#get_branch_protection_rules) | **get** /repositories/{repository}/branch_protection | get branch protection rules -[**get_repository**](#get_repository) | **get** /repositories/{repository} | get repository -[**list_repositories**](#list_repositories) | **get** /repositories | list repositories - -# **create_branch_protection_rule** - -> create_branch_protection_rule(repositorybranch_protection_rule) - - - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import repositories_api -from lakefs_client.model.error import Error -from lakefs_client.model.branch_protection_rule import BranchProtectionRule -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = repositories_api.RepositoriesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = BranchProtectionRule( - pattern="stable_*", - ) - try: - api_response = api_instance.create_branch_protection_rule( - path_params=path_params, - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->create_branch_protection_rule: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BranchProtectionRule**](../../models/BranchProtectionRule.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#create_branch_protection_rule.ApiResponseFor204) | branch protection rule created successfully -401 | [ApiResponseFor401](#create_branch_protection_rule.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#create_branch_protection_rule.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#create_branch_protection_rule.ApiResponseForDefault) | Internal Server Error - -#### create_branch_protection_rule.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### create_branch_protection_rule.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_branch_protection_rule.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_branch_protection_rule.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_repository** - -> Repository create_repository(repository_creation) - -create repository - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import repositories_api -from lakefs_client.model.repository import Repository -from lakefs_client.model.error import Error -from lakefs_client.model.repository_creation import RepositoryCreation -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = repositories_api.RepositoriesApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - } - body = RepositoryCreation( - name="wr1c2v7s6djuy1zmeto", - storage_namespace="s3://example-bucket/", - default_branch="main", - ) - try: - # create repository - api_response = api_instance.create_repository( - query_params=query_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->create_repository: %s\n" % e) - - # example passing only optional values - query_params = { - 'bare': False, - } - body = RepositoryCreation( - name="wr1c2v7s6djuy1zmeto", - storage_namespace="s3://example-bucket/", - default_branch="main", - ) - try: - # create repository - api_response = api_instance.create_repository( - query_params=query_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->create_repository: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RepositoryCreation**](../../models/RepositoryCreation.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -bare | BareSchema | | optional - - -# BareSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_repository.ApiResponseFor201) | repository -400 | [ApiResponseFor400](#create_repository.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#create_repository.ApiResponseFor401) | Unauthorized -409 | [ApiResponseFor409](#create_repository.ApiResponseFor409) | Resource Conflicts With Target -default | [ApiResponseForDefault](#create_repository.ApiResponseForDefault) | Internal Server Error - -#### create_repository.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Repository**](../../models/Repository.md) | | - - -#### create_repository.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_repository.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_repository.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_repository.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_branch_protection_rule** - -> delete_branch_protection_rule(repositoryany_type) - - - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import repositories_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = repositories_api.RepositoriesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = dict( - pattern="pattern_example", - ) - try: - api_response = api_instance.delete_branch_protection_rule( - path_params=path_params, - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->delete_branch_protection_rule: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pattern** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_branch_protection_rule.ApiResponseFor204) | branch protection rule deleted successfully -401 | [ApiResponseFor401](#delete_branch_protection_rule.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_branch_protection_rule.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_branch_protection_rule.ApiResponseForDefault) | Internal Server Error - -#### delete_branch_protection_rule.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_branch_protection_rule.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_branch_protection_rule.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_branch_protection_rule.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_repository** - -> delete_repository(repository) - -delete repository - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import repositories_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = repositories_api.RepositoriesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - # delete repository - api_response = api_instance.delete_repository( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->delete_repository: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_repository.ApiResponseFor204) | repository deleted successfully -401 | [ApiResponseFor401](#delete_repository.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_repository.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_repository.ApiResponseForDefault) | Internal Server Error - -#### delete_repository.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_repository.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_repository.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_repository.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_branch_protection_rules** - -> [BranchProtectionRule] get_branch_protection_rules(repository) - -get branch protection rules - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import repositories_api -from lakefs_client.model.error import Error -from lakefs_client.model.branch_protection_rule import BranchProtectionRule -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = repositories_api.RepositoriesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - # get branch protection rules - api_response = api_instance.get_branch_protection_rules( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->get_branch_protection_rules: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_branch_protection_rules.ApiResponseFor200) | branch protection rules -401 | [ApiResponseFor401](#get_branch_protection_rules.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_branch_protection_rules.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_branch_protection_rules.ApiResponseForDefault) | Internal Server Error - -#### get_branch_protection_rules.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**BranchProtectionRule**]({{complexTypePrefix}}BranchProtectionRule.md) | [**BranchProtectionRule**]({{complexTypePrefix}}BranchProtectionRule.md) | [**BranchProtectionRule**]({{complexTypePrefix}}BranchProtectionRule.md) | | - -#### get_branch_protection_rules.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_branch_protection_rules.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_branch_protection_rules.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_repository** - -> Repository get_repository(repository) - -get repository - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import repositories_api -from lakefs_client.model.repository import Repository -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = repositories_api.RepositoriesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - # get repository - api_response = api_instance.get_repository( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->get_repository: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_repository.ApiResponseFor200) | repository -401 | [ApiResponseFor401](#get_repository.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_repository.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_repository.ApiResponseForDefault) | Internal Server Error - -#### get_repository.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Repository**](../../models/Repository.md) | | - - -#### get_repository.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_repository.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_repository.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_repositories** - -> RepositoryList list_repositories() - -list repositories - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import repositories_api -from lakefs_client.model.repository_list import RepositoryList -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = repositories_api.RepositoriesApi(api_client) - - # example passing only optional values - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list repositories - api_response = api_instance.list_repositories( - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RepositoriesApi->list_repositories: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_repositories.ApiResponseFor200) | repository list -401 | [ApiResponseFor401](#list_repositories.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#list_repositories.ApiResponseForDefault) | Internal Server Error - -#### list_repositories.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RepositoryList**](../../models/RepositoryList.md) | | - - -#### list_repositories.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_repositories.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/RetentionApi.md b/clients/python/docs/apis/tags/RetentionApi.md deleted file mode 100644 index f8dbb09172d..00000000000 --- a/clients/python/docs/apis/tags/RetentionApi.md +++ /dev/null @@ -1,925 +0,0 @@ - -# lakefs_client.apis.tags.retention_api.RetentionApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**delete_garbage_collection_rules**](#delete_garbage_collection_rules) | **delete** /repositories/{repository}/gc/rules | -[**get_garbage_collection_rules**](#get_garbage_collection_rules) | **get** /repositories/{repository}/gc/rules | -[**prepare_garbage_collection_commits**](#prepare_garbage_collection_commits) | **post** /repositories/{repository}/gc/prepare_commits | save lists of active and expired commits for garbage collection -[**prepare_garbage_collection_uncommitted**](#prepare_garbage_collection_uncommitted) | **post** /repositories/{repository}/gc/prepare_uncommited | save repository uncommitted metadata for garbage collection -[**set_garbage_collection_rules**](#set_garbage_collection_rules) | **post** /repositories/{repository}/gc/rules | - -# **delete_garbage_collection_rules** - -> delete_garbage_collection_rules(repository) - - - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import retention_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = retention_api.RetentionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - api_response = api_instance.delete_garbage_collection_rules( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling RetentionApi->delete_garbage_collection_rules: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_garbage_collection_rules.ApiResponseFor204) | deleted garbage collection rules successfully -401 | [ApiResponseFor401](#delete_garbage_collection_rules.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_garbage_collection_rules.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_garbage_collection_rules.ApiResponseForDefault) | Internal Server Error - -#### delete_garbage_collection_rules.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_garbage_collection_rules.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_garbage_collection_rules.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_garbage_collection_rules.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_garbage_collection_rules** - -> GarbageCollectionRules get_garbage_collection_rules(repository) - - - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import retention_api -from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = retention_api.RetentionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - api_response = api_instance.get_garbage_collection_rules( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RetentionApi->get_garbage_collection_rules: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_garbage_collection_rules.ApiResponseFor200) | gc rule list -401 | [ApiResponseFor401](#get_garbage_collection_rules.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_garbage_collection_rules.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_garbage_collection_rules.ApiResponseForDefault) | Internal Server Error - -#### get_garbage_collection_rules.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GarbageCollectionRules**](../../models/GarbageCollectionRules.md) | | - - -#### get_garbage_collection_rules.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_garbage_collection_rules.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_garbage_collection_rules.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **prepare_garbage_collection_commits** - -> GarbageCollectionPrepareResponse prepare_garbage_collection_commits(repository) - -save lists of active and expired commits for garbage collection - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import retention_api -from lakefs_client.model.error import Error -from lakefs_client.model.garbage_collection_prepare_response import GarbageCollectionPrepareResponse -from lakefs_client.model.garbage_collection_prepare_request import GarbageCollectionPrepareRequest -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = retention_api.RetentionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - # save lists of active and expired commits for garbage collection - api_response = api_instance.prepare_garbage_collection_commits( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RetentionApi->prepare_garbage_collection_commits: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - } - body = GarbageCollectionPrepareRequest( - previous_run_id="64eaa103-d726-4a33-bcb8-7c0b4abfe09e", - ) - try: - # save lists of active and expired commits for garbage collection - api_response = api_instance.prepare_garbage_collection_commits( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RetentionApi->prepare_garbage_collection_commits: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GarbageCollectionPrepareRequest**](../../models/GarbageCollectionPrepareRequest.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#prepare_garbage_collection_commits.ApiResponseFor201) | paths to commit dataset -401 | [ApiResponseFor401](#prepare_garbage_collection_commits.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#prepare_garbage_collection_commits.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#prepare_garbage_collection_commits.ApiResponseForDefault) | Internal Server Error - -#### prepare_garbage_collection_commits.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GarbageCollectionPrepareResponse**](../../models/GarbageCollectionPrepareResponse.md) | | - - -#### prepare_garbage_collection_commits.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### prepare_garbage_collection_commits.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### prepare_garbage_collection_commits.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **prepare_garbage_collection_uncommitted** - -> PrepareGCUncommittedResponse prepare_garbage_collection_uncommitted(repository) - -save repository uncommitted metadata for garbage collection - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import retention_api -from lakefs_client.model.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse -from lakefs_client.model.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = retention_api.RetentionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - try: - # save repository uncommitted metadata for garbage collection - api_response = api_instance.prepare_garbage_collection_uncommitted( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RetentionApi->prepare_garbage_collection_uncommitted: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - } - body = PrepareGCUncommittedRequest( - continuation_token="continuation_token_example", - ) - try: - # save repository uncommitted metadata for garbage collection - api_response = api_instance.prepare_garbage_collection_uncommitted( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling RetentionApi->prepare_garbage_collection_uncommitted: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PrepareGCUncommittedRequest**](../../models/PrepareGCUncommittedRequest.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#prepare_garbage_collection_uncommitted.ApiResponseFor201) | paths to commit dataset -400 | [ApiResponseFor400](#prepare_garbage_collection_uncommitted.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#prepare_garbage_collection_uncommitted.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#prepare_garbage_collection_uncommitted.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#prepare_garbage_collection_uncommitted.ApiResponseForDefault) | Internal Server Error - -#### prepare_garbage_collection_uncommitted.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PrepareGCUncommittedResponse**](../../models/PrepareGCUncommittedResponse.md) | | - - -#### prepare_garbage_collection_uncommitted.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### prepare_garbage_collection_uncommitted.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### prepare_garbage_collection_uncommitted.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### prepare_garbage_collection_uncommitted.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **set_garbage_collection_rules** - -> set_garbage_collection_rules(repositorygarbage_collection_rules) - - - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import retention_api -from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = retention_api.RetentionApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = GarbageCollectionRules( - default_retention_days=1, - branches=[ - GarbageCollectionRule( - branch_id="branch_id_example", - retention_days=1, - ) - ], - ) - try: - api_response = api_instance.set_garbage_collection_rules( - path_params=path_params, - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling RetentionApi->set_garbage_collection_rules: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**GarbageCollectionRules**](../../models/GarbageCollectionRules.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#set_garbage_collection_rules.ApiResponseFor204) | set garbage collection rules successfully -401 | [ApiResponseFor401](#set_garbage_collection_rules.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#set_garbage_collection_rules.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#set_garbage_collection_rules.ApiResponseForDefault) | Internal Server Error - -#### set_garbage_collection_rules.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### set_garbage_collection_rules.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### set_garbage_collection_rules.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### set_garbage_collection_rules.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/StagingApi.md b/clients/python/docs/apis/tags/StagingApi.md deleted file mode 100644 index 63cfb43d664..00000000000 --- a/clients/python/docs/apis/tags/StagingApi.md +++ /dev/null @@ -1,487 +0,0 @@ - -# lakefs_client.apis.tags.staging_api.StagingApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_physical_address**](#get_physical_address) | **get** /repositories/{repository}/branches/{branch}/staging/backing | get a physical address and a return token to write object to underlying storage -[**link_physical_address**](#link_physical_address) | **put** /repositories/{repository}/branches/{branch}/staging/backing | associate staging on this physical address with a path - -# **get_physical_address** - -> StagingLocation get_physical_address(repositorybranchpath) - -get a physical address and a return token to write object to underlying storage - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import staging_api -from lakefs_client.model.staging_location import StagingLocation -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = staging_api.StagingApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'path': "path_example", - } - try: - # get a physical address and a return token to write object to underlying storage - api_response = api_instance.get_physical_address( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling StagingApi->get_physical_address: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'path': "path_example", - 'presign': True, - } - try: - # get a physical address and a return token to write object to underlying storage - api_response = api_instance.get_physical_address( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling StagingApi->get_physical_address: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | -presign | PresignSchema | | optional - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PresignSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_physical_address.ApiResponseFor200) | physical address for staging area -401 | [ApiResponseFor401](#get_physical_address.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_physical_address.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_physical_address.ApiResponseForDefault) | Internal Server Error - -#### get_physical_address.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StagingLocation**](../../models/StagingLocation.md) | | - - -#### get_physical_address.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_physical_address.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_physical_address.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **link_physical_address** - -> ObjectStats link_physical_address(repositorybranchpathstaging_metadata) - -associate staging on this physical address with a path - -If the supplied token matches the current staging token, associate the object as the physical address with the supplied path. Otherwise, if staging has been committed and the token has expired, return a conflict and hint where to place the object to try again. Caller should copy the object to the new physical address and PUT again with the new staging token. (No need to back off, this is due to losing the race against a concurrent commit operation.) - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import staging_api -from lakefs_client.model.staging_location import StagingLocation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats -from lakefs_client.model.staging_metadata import StagingMetadata -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = staging_api.StagingApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'branch': "branch_example", - } - query_params = { - 'path': "path_example", - } - body = StagingMetadata( - staging=StagingLocation( - physical_address="physical_address_example", - token="token_example", - presigned_url="presigned_url_example", - ), - checksum="checksum_example", - size_bytes=1, - user_metadata=dict( - "key": "key_example", - ), - content_type="content_type_example", - ) - try: - # associate staging on this physical address with a path - api_response = api_instance.link_physical_address( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling StagingApi->link_physical_address: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StagingMetadata**](../../models/StagingMetadata.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path | PathSchema | | - - -# PathSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -branch | BranchSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#link_physical_address.ApiResponseFor200) | object metadata -400 | [ApiResponseFor400](#link_physical_address.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#link_physical_address.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#link_physical_address.ApiResponseFor404) | Internal Server Error -409 | [ApiResponseFor409](#link_physical_address.ApiResponseFor409) | conflict with a commit, try here -default | [ApiResponseForDefault](#link_physical_address.ApiResponseForDefault) | Internal Server Error - -#### link_physical_address.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectStats**](../../models/ObjectStats.md) | | - - -#### link_physical_address.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### link_physical_address.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### link_physical_address.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### link_physical_address.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StagingLocation**](../../models/StagingLocation.md) | | - - -#### link_physical_address.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/StatisticsApi.md b/clients/python/docs/apis/tags/StatisticsApi.md deleted file mode 100644 index d8dc5d1bfd2..00000000000 --- a/clients/python/docs/apis/tags/StatisticsApi.md +++ /dev/null @@ -1,171 +0,0 @@ - -# lakefs_client.apis.tags.statistics_api.StatisticsApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_stats_events**](#post_stats_events) | **post** /statistics | post stats events, this endpoint is meant for internal use only - -# **post_stats_events** - -> post_stats_events(stats_events_list) - -post stats events, this endpoint is meant for internal use only - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import statistics_api -from lakefs_client.model.error import Error -from lakefs_client.model.stats_events_list import StatsEventsList -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = statistics_api.StatisticsApi(api_client) - - # example passing only required values which don't have defaults set - body = StatsEventsList( - events=[ - StatsEvent( - _class="_class_example", - name="name_example", - count=1, - ) - ], - ) - try: - # post stats events, this endpoint is meant for internal use only - api_response = api_instance.post_stats_events( - body=body, - ) - except lakefs_client.ApiException as e: - print("Exception when calling StatisticsApi->post_stats_events: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StatsEventsList**](../../models/StatsEventsList.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#post_stats_events.ApiResponseFor204) | reported successfully -400 | [ApiResponseFor400](#post_stats_events.ApiResponseFor400) | bad request -401 | [ApiResponseFor401](#post_stats_events.ApiResponseFor401) | Unauthorized -default | [ApiResponseForDefault](#post_stats_events.ApiResponseForDefault) | Internal Server Error - -#### post_stats_events.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### post_stats_events.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### post_stats_events.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### post_stats_events.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/TagsApi.md b/clients/python/docs/apis/tags/TagsApi.md deleted file mode 100644 index 6987819afc8..00000000000 --- a/clients/python/docs/apis/tags/TagsApi.md +++ /dev/null @@ -1,792 +0,0 @@ - -# lakefs_client.apis.tags.tags_api.TagsApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_tag**](#create_tag) | **post** /repositories/{repository}/tags | create tag -[**delete_tag**](#delete_tag) | **delete** /repositories/{repository}/tags/{tag} | delete tag -[**get_tag**](#get_tag) | **get** /repositories/{repository}/tags/{tag} | get tag -[**list_tags**](#list_tags) | **get** /repositories/{repository}/tags | list tags - -# **create_tag** - -> Ref create_tag(repositorytag_creation) - -create tag - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import tags_api -from lakefs_client.model.tag_creation import TagCreation -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tags_api.TagsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - body = TagCreation( - id="id_example", - ref="ref_example", - ) - try: - # create tag - api_response = api_instance.create_tag( - path_params=path_params, - body=body, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling TagsApi->create_tag: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TagCreation**](../../models/TagCreation.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -201 | [ApiResponseFor201](#create_tag.ApiResponseFor201) | tag -400 | [ApiResponseFor400](#create_tag.ApiResponseFor400) | Validation Error -401 | [ApiResponseFor401](#create_tag.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#create_tag.ApiResponseFor404) | Resource Not Found -409 | [ApiResponseFor409](#create_tag.ApiResponseFor409) | Resource Conflicts With Target -default | [ApiResponseForDefault](#create_tag.ApiResponseForDefault) | Internal Server Error - -#### create_tag.ApiResponseFor201 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor201ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor201ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Ref**](../../models/Ref.md) | | - - -#### create_tag.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_tag.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_tag.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_tag.ApiResponseFor409 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor409ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor409ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### create_tag.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_tag** - -> delete_tag(repositorytag) - -delete tag - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import tags_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tags_api.TagsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'tag': "tag_example", - } - try: - # delete tag - api_response = api_instance.delete_tag( - path_params=path_params, - ) - except lakefs_client.ApiException as e: - print("Exception when calling TagsApi->delete_tag: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -tag | TagSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TagSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -204 | [ApiResponseFor204](#delete_tag.ApiResponseFor204) | tag deleted successfully -401 | [ApiResponseFor401](#delete_tag.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#delete_tag.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#delete_tag.ApiResponseForDefault) | Internal Server Error - -#### delete_tag.ApiResponseFor204 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_tag.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_tag.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### delete_tag.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_tag** - -> Ref get_tag(repositorytag) - -get tag - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import tags_api -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tags_api.TagsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - 'tag': "tag_example", - } - try: - # get tag - api_response = api_instance.get_tag( - path_params=path_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling TagsApi->get_tag: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | -tag | TagSchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# TagSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_tag.ApiResponseFor200) | tag -401 | [ApiResponseFor401](#get_tag.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#get_tag.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#get_tag.ApiResponseForDefault) | Internal Server Error - -#### get_tag.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Ref**](../../models/Ref.md) | | - - -#### get_tag.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_tag.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### get_tag.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **list_tags** - -> RefList list_tags(repository) - -list tags - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import tags_api -from lakefs_client.model.error import Error -from lakefs_client.model.ref_list import RefList -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tags_api.TagsApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'repository': "repository_example", - } - query_params = { - } - try: - # list tags - api_response = api_instance.list_tags( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling TagsApi->list_tags: %s\n" % e) - - # example passing only optional values - path_params = { - 'repository': "repository_example", - } - query_params = { - 'prefix': "prefix_example", - 'after': "after_example", - 'amount': 100, - } - try: - # list tags - api_response = api_instance.list_tags( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling TagsApi->list_tags: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -prefix | PrefixSchema | | optional -after | AfterSchema | | optional -amount | AmountSchema | | optional - - -# PrefixSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AfterSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AmountSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 100 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -repository | RepositorySchema | | - -# RepositorySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#list_tags.ApiResponseFor200) | tag list -401 | [ApiResponseFor401](#list_tags.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#list_tags.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#list_tags.ApiResponseForDefault) | Internal Server Error - -#### list_tags.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefList**](../../models/RefList.md) | | - - -#### list_tags.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_tags.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### list_tags.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/apis/tags/TemplatesApi.md b/clients/python/docs/apis/tags/TemplatesApi.md deleted file mode 100644 index 136d353bcf4..00000000000 --- a/clients/python/docs/apis/tags/TemplatesApi.md +++ /dev/null @@ -1,220 +0,0 @@ - -# lakefs_client.apis.tags.templates_api.TemplatesApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**expand_template**](#expand_template) | **get** /templates/{template_location} | - -# **expand_template** - -> bool, date, datetime, dict, float, int, list, str, none_type expand_template(template_location) - - - -fetch and expand template - -### Example - -* Basic Authentication (basic_auth): -* Api Key Authentication (cookie_auth): -* Api Key Authentication (oidc_auth): -* Api Key Authentication (saml_auth): -* Bearer (JWT) Authentication (jwt_token): -```python -import lakefs_client -from lakefs_client.apis.tags import templates_api -from lakefs_client.model.error import Error -from pprint import pprint -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = lakefs_client.Configuration( - host = "/api/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic_auth -configuration = lakefs_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure API key authorization: cookie_auth -configuration.api_key['cookie_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['cookie_auth'] = 'Bearer' - -# Configure API key authorization: oidc_auth -configuration.api_key['oidc_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['oidc_auth'] = 'Bearer' - -# Configure API key authorization: saml_auth -configuration.api_key['saml_auth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['saml_auth'] = 'Bearer' - -# Configure Bearer authorization (JWT): jwt_token -configuration = lakefs_client.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with lakefs_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = templates_api.TemplatesApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'template_location': "spark.submit.conf.tt", - } - query_params = { - } - try: - api_response = api_instance.expand_template( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling TemplatesApi->expand_template: %s\n" % e) - - # example passing only optional values - path_params = { - 'template_location': "spark.submit.conf.tt", - } - query_params = { - 'params': dict( - "key": "key_example", - ), - } - try: - api_response = api_instance.expand_template( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except lakefs_client.ApiException as e: - print("Exception when calling TemplatesApi->expand_template: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('*/*', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -params | ParamsSchema | | optional - - -# ParamsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -template_location | TemplateLocationSchema | | - -# TemplateLocationSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#expand_template.ApiResponseFor200) | expanded template -401 | [ApiResponseFor401](#expand_template.ApiResponseFor401) | Unauthorized -404 | [ApiResponseFor404](#expand_template.ApiResponseFor404) | Resource Not Found -default | [ApiResponseForDefault](#expand_template.ApiResponseForDefault) | Internal Server Error - -#### expand_template.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBody, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBody - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -#### expand_template.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### expand_template.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -#### expand_template.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Error**](../../models/Error.md) | | - - -### Authorization - -[basic_auth](../../../README.md#basic_auth), [cookie_auth](../../../README.md#cookie_auth), [oidc_auth](../../../README.md#oidc_auth), [saml_auth](../../../README.md#saml_auth), [jwt_token](../../../README.md#jwt_token) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/clients/python/docs/models/AccessKeyCredentials.md b/clients/python/docs/models/AccessKeyCredentials.md deleted file mode 100644 index ae233bd8992..00000000000 --- a/clients/python/docs/models/AccessKeyCredentials.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.access_key_credentials.AccessKeyCredentials - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**access_key_id** | str, | str, | access key ID to set for user for use in integration testing. | -**secret_access_key** | str, | str, | secret access key to set for user for use in integration testing. | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ActionRun.md b/clients/python/docs/models/ActionRun.md deleted file mode 100644 index 36fe1c54d77..00000000000 --- a/clients/python/docs/models/ActionRun.md +++ /dev/null @@ -1,21 +0,0 @@ -# lakefs_client.model.action_run.ActionRun - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**start_time** | str, datetime, | str, | | value must conform to RFC-3339 date-time -**event_type** | str, | str, | | -**run_id** | str, | str, | | -**branch** | str, | str, | | -**commit_id** | str, | str, | | -**status** | str, | str, | | must be one of ["failed", "completed", ] -**end_time** | str, datetime, | str, | | [optional] value must conform to RFC-3339 date-time -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ActionRunList.md b/clients/python/docs/models/ActionRunList.md deleted file mode 100644 index a040af5053c..00000000000 --- a/clients/python/docs/models/ActionRunList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.action_run_list.ActionRunList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ActionRun**](ActionRun.md) | [**ActionRun**](ActionRun.md) | [**ActionRun**](ActionRun.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/AuthCapabilities.md b/clients/python/docs/models/AuthCapabilities.md deleted file mode 100644 index ec90a8f44f8..00000000000 --- a/clients/python/docs/models/AuthCapabilities.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.auth_capabilities.AuthCapabilities - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**invite_user** | bool, | BoolClass, | | [optional] -**forgot_password** | bool, | BoolClass, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/AuthenticationToken.md b/clients/python/docs/models/AuthenticationToken.md deleted file mode 100644 index c467c65f295..00000000000 --- a/clients/python/docs/models/AuthenticationToken.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.authentication_token.AuthenticationToken - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**token** | str, | str, | a JWT token that could be used to authenticate requests | -**token_expiration** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | [optional] value must be a 64 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/BranchCreation.md b/clients/python/docs/models/BranchCreation.md deleted file mode 100644 index 1a8f73474a9..00000000000 --- a/clients/python/docs/models/BranchCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.branch_creation.BranchCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | | -**source** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/BranchProtectionRule.md b/clients/python/docs/models/BranchProtectionRule.md deleted file mode 100644 index e7124febb06..00000000000 --- a/clients/python/docs/models/BranchProtectionRule.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.branch_protection_rule.BranchProtectionRule - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pattern** | str, | str, | fnmatch pattern for the branch name, supporting * and ? wildcards | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/CherryPickCreation.md b/clients/python/docs/models/CherryPickCreation.md deleted file mode 100644 index 066d73e6026..00000000000 --- a/clients/python/docs/models/CherryPickCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.cherry_pick_creation.CherryPickCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**ref** | str, | str, | the commit to cherry-pick, given by a ref | -**parent_number** | decimal.Decimal, int, | decimal.Decimal, | when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. The destination branch is parent 1, which is the default behaviour. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/CommPrefsInput.md b/clients/python/docs/models/CommPrefsInput.md deleted file mode 100644 index 2c5247806ac..00000000000 --- a/clients/python/docs/models/CommPrefsInput.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.comm_prefs_input.CommPrefsInput - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**featureUpdates** | bool, | BoolClass, | was \"feature updates\" checked | -**securityUpdates** | bool, | BoolClass, | was \"security updates\" checked | -**email** | str, | str, | the provided email | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Commit.md b/clients/python/docs/models/Commit.md deleted file mode 100644 index 862cb57d0f3..00000000000 --- a/clients/python/docs/models/Commit.md +++ /dev/null @@ -1,45 +0,0 @@ -# lakefs_client.model.commit.Commit - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**committer** | str, | str, | | -**creation_date** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | value must be a 64 bit integer -**id** | str, | str, | | -**meta_range_id** | str, | str, | | -**message** | str, | str, | | -**[parents](#parents)** | list, tuple, | tuple, | | -**[metadata](#metadata)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# parents - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# metadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/CommitCreation.md b/clients/python/docs/models/CommitCreation.md deleted file mode 100644 index 463545e3d2b..00000000000 --- a/clients/python/docs/models/CommitCreation.md +++ /dev/null @@ -1,29 +0,0 @@ -# lakefs_client.model.commit_creation.CommitCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**message** | str, | str, | | -**[metadata](#metadata)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**date** | decimal.Decimal, int, | decimal.Decimal, | set date to override creation date in the commit (Unix Epoch in seconds) | [optional] value must be a 64 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# metadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/CommitList.md b/clients/python/docs/models/CommitList.md deleted file mode 100644 index a4c1533dfa2..00000000000 --- a/clients/python/docs/models/CommitList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.commit_list.CommitList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Commit**](Commit.md) | [**Commit**](Commit.md) | [**Commit**](Commit.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Credentials.md b/clients/python/docs/models/Credentials.md deleted file mode 100644 index 954e84ad143..00000000000 --- a/clients/python/docs/models/Credentials.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.credentials.Credentials - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**access_key_id** | str, | str, | | -**creation_date** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | value must be a 64 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/CredentialsList.md b/clients/python/docs/models/CredentialsList.md deleted file mode 100644 index 118094a5518..00000000000 --- a/clients/python/docs/models/CredentialsList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.credentials_list.CredentialsList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Credentials**](Credentials.md) | [**Credentials**](Credentials.md) | [**Credentials**](Credentials.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/CredentialsWithSecret.md b/clients/python/docs/models/CredentialsWithSecret.md deleted file mode 100644 index f86d54e6980..00000000000 --- a/clients/python/docs/models/CredentialsWithSecret.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.credentials_with_secret.CredentialsWithSecret - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**access_key_id** | str, | str, | | -**secret_access_key** | str, | str, | | -**creation_date** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | value must be a 64 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/CurrentUser.md b/clients/python/docs/models/CurrentUser.md deleted file mode 100644 index fa456943097..00000000000 --- a/clients/python/docs/models/CurrentUser.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.current_user.CurrentUser - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user** | [**User**](User.md) | [**User**](User.md) | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Diff.md b/clients/python/docs/models/Diff.md deleted file mode 100644 index cb035e9f1e0..00000000000 --- a/clients/python/docs/models/Diff.md +++ /dev/null @@ -1,18 +0,0 @@ -# lakefs_client.model.diff.Diff - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**path** | str, | str, | | -**path_type** | str, | str, | | must be one of ["common_prefix", "object", ] -**type** | str, | str, | | must be one of ["added", "removed", "changed", "conflict", "prefix_changed", ] -**size_bytes** | decimal.Decimal, int, | decimal.Decimal, | represents the size of the added/changed/deleted entry | [optional] value must be a 64 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/DiffList.md b/clients/python/docs/models/DiffList.md deleted file mode 100644 index df4f51a3a5b..00000000000 --- a/clients/python/docs/models/DiffList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.diff_list.DiffList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Diff**](Diff.md) | [**Diff**](Diff.md) | [**Diff**](Diff.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Error.md b/clients/python/docs/models/Error.md deleted file mode 100644 index 623f227b2c2..00000000000 --- a/clients/python/docs/models/Error.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.error.Error - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**message** | str, | str, | short message explaining the error | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/FindMergeBaseResult.md b/clients/python/docs/models/FindMergeBaseResult.md deleted file mode 100644 index 215c519595e..00000000000 --- a/clients/python/docs/models/FindMergeBaseResult.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.find_merge_base_result.FindMergeBaseResult - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**destination_commit_id** | str, | str, | The commit ID of the merge destination | -**base_commit_id** | str, | str, | The commit ID of the merge base | -**source_commit_id** | str, | str, | The commit ID of the merge source | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ForgotPasswordRequest.md b/clients/python/docs/models/ForgotPasswordRequest.md deleted file mode 100644 index c78ba7c6d89..00000000000 --- a/clients/python/docs/models/ForgotPasswordRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.forgot_password_request.ForgotPasswordRequest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**email** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/GarbageCollectionConfig.md b/clients/python/docs/models/GarbageCollectionConfig.md deleted file mode 100644 index 0b10fa302b7..00000000000 --- a/clients/python/docs/models/GarbageCollectionConfig.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.garbage_collection_config.GarbageCollectionConfig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**grace_period** | decimal.Decimal, int, | decimal.Decimal, | Duration in seconds. Objects created in the recent grace_period will not be collected. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/GarbageCollectionPrepareRequest.md b/clients/python/docs/models/GarbageCollectionPrepareRequest.md deleted file mode 100644 index 7a5d67eb199..00000000000 --- a/clients/python/docs/models/GarbageCollectionPrepareRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.garbage_collection_prepare_request.GarbageCollectionPrepareRequest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**previous_run_id** | str, | str, | run id of a previous successful GC job | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/GarbageCollectionPrepareResponse.md b/clients/python/docs/models/GarbageCollectionPrepareResponse.md deleted file mode 100644 index 9a540902f7a..00000000000 --- a/clients/python/docs/models/GarbageCollectionPrepareResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.garbage_collection_prepare_response.GarbageCollectionPrepareResponse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**run_id** | str, | str, | a unique identifier generated for this GC job | -**gc_addresses_location** | str, | str, | location to use for expired addresses parquet table (partitioned by run_id) | -**gc_commits_location** | str, | str, | location of the resulting commits csv table (partitioned by run_id) | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/GarbageCollectionRule.md b/clients/python/docs/models/GarbageCollectionRule.md deleted file mode 100644 index 9bcbb661a82..00000000000 --- a/clients/python/docs/models/GarbageCollectionRule.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.garbage_collection_rule.GarbageCollectionRule - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**branch_id** | str, | str, | | -**retention_days** | decimal.Decimal, int, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/GarbageCollectionRules.md b/clients/python/docs/models/GarbageCollectionRules.md deleted file mode 100644 index f0024c3169d..00000000000 --- a/clients/python/docs/models/GarbageCollectionRules.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.garbage_collection_rules.GarbageCollectionRules - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[branches](#branches)** | list, tuple, | tuple, | | -**default_retention_days** | decimal.Decimal, int, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# branches - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**GarbageCollectionRule**](GarbageCollectionRule.md) | [**GarbageCollectionRule**](GarbageCollectionRule.md) | [**GarbageCollectionRule**](GarbageCollectionRule.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Group.md b/clients/python/docs/models/Group.md deleted file mode 100644 index 05355467a8e..00000000000 --- a/clients/python/docs/models/Group.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.group.Group - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**creation_date** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | value must be a 64 bit integer -**id** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/GroupCreation.md b/clients/python/docs/models/GroupCreation.md deleted file mode 100644 index fff9b3d7b7f..00000000000 --- a/clients/python/docs/models/GroupCreation.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.group_creation.GroupCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/GroupList.md b/clients/python/docs/models/GroupList.md deleted file mode 100644 index 67e63a1bfea..00000000000 --- a/clients/python/docs/models/GroupList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.group_list.GroupList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Group**](Group.md) | [**Group**](Group.md) | [**Group**](Group.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/HookRun.md b/clients/python/docs/models/HookRun.md deleted file mode 100644 index f6b742acf92..00000000000 --- a/clients/python/docs/models/HookRun.md +++ /dev/null @@ -1,20 +0,0 @@ -# lakefs_client.model.hook_run.HookRun - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**start_time** | str, datetime, | str, | | value must conform to RFC-3339 date-time -**hook_id** | str, | str, | | -**action** | str, | str, | | -**hook_run_id** | str, | str, | | -**status** | str, | str, | | must be one of ["failed", "completed", ] -**end_time** | str, datetime, | str, | | [optional] value must conform to RFC-3339 date-time -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/HookRunList.md b/clients/python/docs/models/HookRunList.md deleted file mode 100644 index 62d9735692e..00000000000 --- a/clients/python/docs/models/HookRunList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.hook_run_list.HookRunList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**HookRun**](HookRun.md) | [**HookRun**](HookRun.md) | [**HookRun**](HookRun.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ImportPagination.md b/clients/python/docs/models/ImportPagination.md deleted file mode 100644 index 9bcbeb931ac..00000000000 --- a/clients/python/docs/models/ImportPagination.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.import_pagination.ImportPagination - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**has_more** | bool, | BoolClass, | More keys to be ingested. | -**last_key** | str, | str, | Last object store key that was ingested. | -**continuation_token** | str, | str, | Opaque. Token used to import the next range. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/IngestRangeCreationResponse.md b/clients/python/docs/models/IngestRangeCreationResponse.md deleted file mode 100644 index bd6163c0670..00000000000 --- a/clients/python/docs/models/IngestRangeCreationResponse.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.ingest_range_creation_response.IngestRangeCreationResponse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**range** | [**RangeMetadata**](RangeMetadata.md) | [**RangeMetadata**](RangeMetadata.md) | | [optional] -**pagination** | [**ImportPagination**](ImportPagination.md) | [**ImportPagination**](ImportPagination.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/LoginConfig.md b/clients/python/docs/models/LoginConfig.md deleted file mode 100644 index f137fec6741..00000000000 --- a/clients/python/docs/models/LoginConfig.md +++ /dev/null @@ -1,35 +0,0 @@ -# lakefs_client.model.login_config.LoginConfig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**logout_url** | str, | str, | URL to use for logging out. | -**login_url** | str, | str, | primary URL to use for login. | -**[login_cookie_names](#login_cookie_names)** | list, tuple, | tuple, | cookie names used to store JWT | -**RBAC** | str, | str, | RBAC will remain enabled on GUI if \"external\". That only works with an external auth service. | [optional] must be one of ["simplified", "external", ] -**login_failed_message** | str, | str, | message to display to users who fail to login; a full sentence that is rendered in HTML and may contain a link to a secondary login method | [optional] -**fallback_login_url** | str, | str, | secondary URL to offer users to use for login. | [optional] -**fallback_login_label** | str, | str, | label to place on fallback_login_url. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# login_cookie_names - -cookie names used to store JWT - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | cookie names used to store JWT | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/LoginInformation.md b/clients/python/docs/models/LoginInformation.md deleted file mode 100644 index d18dc0b0b28..00000000000 --- a/clients/python/docs/models/LoginInformation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.login_information.LoginInformation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**access_key_id** | str, | str, | | -**secret_access_key** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Merge.md b/clients/python/docs/models/Merge.md deleted file mode 100644 index 65881d62648..00000000000 --- a/clients/python/docs/models/Merge.md +++ /dev/null @@ -1,29 +0,0 @@ -# lakefs_client.model.merge.Merge - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**message** | str, | str, | | [optional] -**[metadata](#metadata)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**strategy** | str, | str, | In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# metadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/MergeResult.md b/clients/python/docs/models/MergeResult.md deleted file mode 100644 index bf75e1d9fc5..00000000000 --- a/clients/python/docs/models/MergeResult.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.merge_result.MergeResult - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**reference** | str, | str, | | -**summary** | [**MergeResultSummary**](MergeResultSummary.md) | [**MergeResultSummary**](MergeResultSummary.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/MergeResultSummary.md b/clients/python/docs/models/MergeResultSummary.md deleted file mode 100644 index 7bf032ee487..00000000000 --- a/clients/python/docs/models/MergeResultSummary.md +++ /dev/null @@ -1,18 +0,0 @@ -# lakefs_client.model.merge_result_summary.MergeResultSummary - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**added** | decimal.Decimal, int, | decimal.Decimal, | Deprecated: inaccurate and will be removed. | [optional] -**removed** | decimal.Decimal, int, | decimal.Decimal, | Deprecated: inaccurate and will be removed. | [optional] -**changed** | decimal.Decimal, int, | decimal.Decimal, | Deprecated: inaccurate and will be removed. | [optional] -**conflict** | decimal.Decimal, int, | decimal.Decimal, | Deprecated: inaccurate and will be removed. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/MetaRangeCreation.md b/clients/python/docs/models/MetaRangeCreation.md deleted file mode 100644 index 430fb3d2e3e..00000000000 --- a/clients/python/docs/models/MetaRangeCreation.md +++ /dev/null @@ -1,27 +0,0 @@ -# lakefs_client.model.meta_range_creation.MetaRangeCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[ranges](#ranges)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# ranges - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**RangeMetadata**](RangeMetadata.md) | [**RangeMetadata**](RangeMetadata.md) | [**RangeMetadata**](RangeMetadata.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/MetaRangeCreationResponse.md b/clients/python/docs/models/MetaRangeCreationResponse.md deleted file mode 100644 index 519c2c415b6..00000000000 --- a/clients/python/docs/models/MetaRangeCreationResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.meta_range_creation_response.MetaRangeCreationResponse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | The id of the created metarange | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/NextStep.md b/clients/python/docs/models/NextStep.md deleted file mode 100644 index 1faf3d307a9..00000000000 --- a/clients/python/docs/models/NextStep.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.next_step.NextStep - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**nextStep** | str, | str, | the next step in the setup process | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ObjectCopyCreation.md b/clients/python/docs/models/ObjectCopyCreation.md deleted file mode 100644 index bd9fe178059..00000000000 --- a/clients/python/docs/models/ObjectCopyCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.object_copy_creation.ObjectCopyCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**src_path** | str, | str, | path of the copied object relative to the ref | -**src_ref** | str, | str, | a reference, if empty uses the provided branch as ref | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ObjectError.md b/clients/python/docs/models/ObjectError.md deleted file mode 100644 index 73f50e1414b..00000000000 --- a/clients/python/docs/models/ObjectError.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.object_error.ObjectError - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**status_code** | decimal.Decimal, int, | decimal.Decimal, | HTTP status code associated for operation on path | -**message** | str, | str, | short message explaining status_code | -**path** | str, | str, | affected path | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ObjectErrorList.md b/clients/python/docs/models/ObjectErrorList.md deleted file mode 100644 index 71c3afb2b6e..00000000000 --- a/clients/python/docs/models/ObjectErrorList.md +++ /dev/null @@ -1,27 +0,0 @@ -# lakefs_client.model.object_error_list.ObjectErrorList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[errors](#errors)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# errors - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ObjectError**](ObjectError.md) | [**ObjectError**](ObjectError.md) | [**ObjectError**](ObjectError.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ObjectStageCreation.md b/clients/python/docs/models/ObjectStageCreation.md deleted file mode 100644 index 2a1aca8e313..00000000000 --- a/clients/python/docs/models/ObjectStageCreation.md +++ /dev/null @@ -1,20 +0,0 @@ -# lakefs_client.model.object_stage_creation.ObjectStageCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**physical_address** | str, | str, | | -**size_bytes** | decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer -**checksum** | str, | str, | | -**mtime** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | [optional] value must be a 64 bit integer -**metadata** | [**ObjectUserMetadata**](ObjectUserMetadata.md) | [**ObjectUserMetadata**](ObjectUserMetadata.md) | | [optional] -**content_type** | str, | str, | Object media type | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ObjectStats.md b/clients/python/docs/models/ObjectStats.md deleted file mode 100644 index d7eec8f9658..00000000000 --- a/clients/python/docs/models/ObjectStats.md +++ /dev/null @@ -1,22 +0,0 @@ -# lakefs_client.model.object_stats.ObjectStats - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**physical_address** | str, | str, | The location of the object on the underlying object store. Formatted as a native URI with the object store type as scheme (\"s3://...\", \"gs://...\", etc.) Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET | -**path** | str, | str, | | -**checksum** | str, | str, | | -**path_type** | str, | str, | | must be one of ["common_prefix", "object", ] -**mtime** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | value must be a 64 bit integer -**size_bytes** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**metadata** | [**ObjectUserMetadata**](ObjectUserMetadata.md) | [**ObjectUserMetadata**](ObjectUserMetadata.md) | | [optional] -**content_type** | str, | str, | Object media type | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ObjectStatsList.md b/clients/python/docs/models/ObjectStatsList.md deleted file mode 100644 index dd7ac90678b..00000000000 --- a/clients/python/docs/models/ObjectStatsList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.object_stats_list.ObjectStatsList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ObjectStats**](ObjectStats.md) | [**ObjectStats**](ObjectStats.md) | [**ObjectStats**](ObjectStats.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ObjectUserMetadata.md b/clients/python/docs/models/ObjectUserMetadata.md deleted file mode 100644 index e279cf98f27..00000000000 --- a/clients/python/docs/models/ObjectUserMetadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# lakefs_client.model.object_user_metadata.ObjectUserMetadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/OtfDiffEntry.md b/clients/python/docs/models/OtfDiffEntry.md deleted file mode 100644 index df9a6da6ed4..00000000000 --- a/clients/python/docs/models/OtfDiffEntry.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.otf_diff_entry.OtfDiffEntry - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[operation_content](#operation_content)** | dict, frozendict.frozendict, | frozendict.frozendict, | free form content describing the returned operation diff | -**operation_type** | str, | str, | the operation category (CUD) | must be one of ["create", "update", "delete", ] -**id** | str, | str, | | -**operation** | str, | str, | | -**timestamp** | decimal.Decimal, int, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# operation_content - -free form content describing the returned operation diff - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | free form content describing the returned operation diff | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/OtfDiffList.md b/clients/python/docs/models/OtfDiffList.md deleted file mode 100644 index fba9de26dac..00000000000 --- a/clients/python/docs/models/OtfDiffList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.otf_diff_list.OtfDiffList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[results](#results)** | list, tuple, | tuple, | | -**diff_type** | str, | str, | | [optional] must be one of ["created", "dropped", "changed", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OtfDiffEntry**](OtfDiffEntry.md) | [**OtfDiffEntry**](OtfDiffEntry.md) | [**OtfDiffEntry**](OtfDiffEntry.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Pagination.md b/clients/python/docs/models/Pagination.md deleted file mode 100644 index 0506247ca92..00000000000 --- a/clients/python/docs/models/Pagination.md +++ /dev/null @@ -1,18 +0,0 @@ -# lakefs_client.model.pagination.Pagination - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**max_per_page** | decimal.Decimal, int, | decimal.Decimal, | Maximal number of entries per page | -**has_more** | bool, | BoolClass, | Next page is available | -**next_offset** | str, | str, | Token used to retrieve the next page | -**results** | decimal.Decimal, int, | decimal.Decimal, | Number of values found in the results | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/PathList.md b/clients/python/docs/models/PathList.md deleted file mode 100644 index f516a2d38e4..00000000000 --- a/clients/python/docs/models/PathList.md +++ /dev/null @@ -1,27 +0,0 @@ -# lakefs_client.model.path_list.PathList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[paths](#paths)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# paths - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | Object path | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Policy.md b/clients/python/docs/models/Policy.md deleted file mode 100644 index 18116c13268..00000000000 --- a/clients/python/docs/models/Policy.md +++ /dev/null @@ -1,29 +0,0 @@ -# lakefs_client.model.policy.Policy - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[statement](#statement)** | list, tuple, | tuple, | | -**id** | str, | str, | | -**creation_date** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | [optional] value must be a 64 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# statement - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Statement**](Statement.md) | [**Statement**](Statement.md) | [**Statement**](Statement.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/PolicyList.md b/clients/python/docs/models/PolicyList.md deleted file mode 100644 index cd42769a180..00000000000 --- a/clients/python/docs/models/PolicyList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.policy_list.PolicyList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Policy**](Policy.md) | [**Policy**](Policy.md) | [**Policy**](Policy.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/PrepareGCUncommittedRequest.md b/clients/python/docs/models/PrepareGCUncommittedRequest.md deleted file mode 100644 index 07f66437f67..00000000000 --- a/clients/python/docs/models/PrepareGCUncommittedRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.prepare_gc_uncommitted_request.PrepareGCUncommittedRequest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**continuation_token** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/PrepareGCUncommittedResponse.md b/clients/python/docs/models/PrepareGCUncommittedResponse.md deleted file mode 100644 index f05849059dd..00000000000 --- a/clients/python/docs/models/PrepareGCUncommittedResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.prepare_gc_uncommitted_response.PrepareGCUncommittedResponse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**run_id** | str, | str, | | -**gc_uncommitted_location** | str, | str, | location of uncommitted information data | -**continuation_token** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/RangeMetadata.md b/clients/python/docs/models/RangeMetadata.md deleted file mode 100644 index b35b2310854..00000000000 --- a/clients/python/docs/models/RangeMetadata.md +++ /dev/null @@ -1,19 +0,0 @@ -# lakefs_client.model.range_metadata.RangeMetadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**max_key** | str, | str, | Last key in the range. | -**count** | decimal.Decimal, int, | decimal.Decimal, | Number of records in the range. | -**estimated_size** | decimal.Decimal, int, | decimal.Decimal, | Estimated size of the range in bytes | -**id** | str, | str, | ID of the range. | -**min_key** | str, | str, | First key in the range. | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Ref.md b/clients/python/docs/models/Ref.md deleted file mode 100644 index 57046b16c1d..00000000000 --- a/clients/python/docs/models/Ref.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.ref.Ref - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | | -**commit_id** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/RefList.md b/clients/python/docs/models/RefList.md deleted file mode 100644 index 58b81b143fe..00000000000 --- a/clients/python/docs/models/RefList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.ref_list.RefList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Ref**](Ref.md) | [**Ref**](Ref.md) | [**Ref**](Ref.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/RefsDump.md b/clients/python/docs/models/RefsDump.md deleted file mode 100644 index 5109b0491fe..00000000000 --- a/clients/python/docs/models/RefsDump.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.refs_dump.RefsDump - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**branches_meta_range_id** | str, | str, | | -**tags_meta_range_id** | str, | str, | | -**commits_meta_range_id** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Repository.md b/clients/python/docs/models/Repository.md deleted file mode 100644 index 6a02b1afe50..00000000000 --- a/clients/python/docs/models/Repository.md +++ /dev/null @@ -1,18 +0,0 @@ -# lakefs_client.model.repository.Repository - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**default_branch** | str, | str, | | -**creation_date** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | value must be a 64 bit integer -**id** | str, | str, | | -**storage_namespace** | str, | str, | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/RepositoryCreation.md b/clients/python/docs/models/RepositoryCreation.md deleted file mode 100644 index 3668e751f22..00000000000 --- a/clients/python/docs/models/RepositoryCreation.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.repository_creation.RepositoryCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | | -**storage_namespace** | str, | str, | Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") | -**default_branch** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/RepositoryList.md b/clients/python/docs/models/RepositoryList.md deleted file mode 100644 index bdd7e99dee5..00000000000 --- a/clients/python/docs/models/RepositoryList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.repository_list.RepositoryList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Repository**](Repository.md) | [**Repository**](Repository.md) | [**Repository**](Repository.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/ResetCreation.md b/clients/python/docs/models/ResetCreation.md deleted file mode 100644 index ad41802e08b..00000000000 --- a/clients/python/docs/models/ResetCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.reset_creation.ResetCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**type** | str, | str, | | must be one of ["object", "common_prefix", "reset", ] -**path** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/RevertCreation.md b/clients/python/docs/models/RevertCreation.md deleted file mode 100644 index 27de1f68272..00000000000 --- a/clients/python/docs/models/RevertCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.revert_creation.RevertCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**parent_number** | decimal.Decimal, int, | decimal.Decimal, | when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert. | -**ref** | str, | str, | the commit to revert, given by a ref | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Setup.md b/clients/python/docs/models/Setup.md deleted file mode 100644 index b6539023c2a..00000000000 --- a/clients/python/docs/models/Setup.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.setup.Setup - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | str, | str, | an identifier for the user (e.g. jane.doe) | -**key** | [**AccessKeyCredentials**](AccessKeyCredentials.md) | [**AccessKeyCredentials**](AccessKeyCredentials.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/SetupState.md b/clients/python/docs/models/SetupState.md deleted file mode 100644 index 6a2e0ddc075..00000000000 --- a/clients/python/docs/models/SetupState.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.setup_state.SetupState - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**state** | str, | str, | | [optional] must be one of ["initialized", "not_initialized", "comm_prefs_done", ] -**login_config** | [**LoginConfig**](LoginConfig.md) | [**LoginConfig**](LoginConfig.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/StageRangeCreation.md b/clients/python/docs/models/StageRangeCreation.md deleted file mode 100644 index bb6f6c0b6fe..00000000000 --- a/clients/python/docs/models/StageRangeCreation.md +++ /dev/null @@ -1,18 +0,0 @@ -# lakefs_client.model.stage_range_creation.StageRangeCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**fromSourceURI** | str, | str, | The source location of the ingested files. Must match the lakeFS installation blockstore type. | -**prepend** | str, | str, | A prefix to prepend to ingested objects. | -**after** | str, | str, | Only objects after this key would be ingested. | -**continuation_token** | str, | str, | Opaque. Client should pass the continuation_token received from server to continue creation ranges from the same key. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/StagingLocation.md b/clients/python/docs/models/StagingLocation.md deleted file mode 100644 index bde23a424d8..00000000000 --- a/clients/python/docs/models/StagingLocation.md +++ /dev/null @@ -1,19 +0,0 @@ -# lakefs_client.model.staging_location.StagingLocation - -location for placing an object when staging it - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | location for placing an object when staging it | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**token** | str, | str, | opaque staging token to use to link uploaded object | -**physical_address** | str, | str, | | [optional] -**presigned_url** | None, str, | NoneClass, str, | if presign=true is passed in the request, this field will contain a presigned URL to use when uploading | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/StagingMetadata.md b/clients/python/docs/models/StagingMetadata.md deleted file mode 100644 index d432b88af44..00000000000 --- a/clients/python/docs/models/StagingMetadata.md +++ /dev/null @@ -1,33 +0,0 @@ -# lakefs_client.model.staging_metadata.StagingMetadata - -information about uploaded object - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | information about uploaded object | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**size_bytes** | decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer -**checksum** | str, | str, | unique identifier of object content on backing store (typically ETag) | -**staging** | [**StagingLocation**](StagingLocation.md) | [**StagingLocation**](StagingLocation.md) | | -**[user_metadata](#user_metadata)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**content_type** | str, | str, | Object media type | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# user_metadata - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/Statement.md b/clients/python/docs/models/Statement.md deleted file mode 100644 index ca7313e0177..00000000000 --- a/clients/python/docs/models/Statement.md +++ /dev/null @@ -1,29 +0,0 @@ -# lakefs_client.model.statement.Statement - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**resource** | str, | str, | | -**effect** | str, | str, | | must be one of ["allow", "deny", ] -**[action](#action)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# action - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/StatsEvent.md b/clients/python/docs/models/StatsEvent.md deleted file mode 100644 index 4ce4def6cb6..00000000000 --- a/clients/python/docs/models/StatsEvent.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.stats_event.StatsEvent - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**count** | decimal.Decimal, int, | decimal.Decimal, | number of events of the class and name | -**name** | str, | str, | stats event name (e.g. \"put_object\", \"create_repository\", \"<experimental-feature-name>\") | -**class** | str, | str, | stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\") | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/StatsEventsList.md b/clients/python/docs/models/StatsEventsList.md deleted file mode 100644 index cde70e4dc61..00000000000 --- a/clients/python/docs/models/StatsEventsList.md +++ /dev/null @@ -1,27 +0,0 @@ -# lakefs_client.model.stats_events_list.StatsEventsList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[events](#events)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# events - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**StatsEvent**](StatsEvent.md) | [**StatsEvent**](StatsEvent.md) | [**StatsEvent**](StatsEvent.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/StorageConfig.md b/clients/python/docs/models/StorageConfig.md deleted file mode 100644 index 5388c918cb3..00000000000 --- a/clients/python/docs/models/StorageConfig.md +++ /dev/null @@ -1,21 +0,0 @@ -# lakefs_client.model.storage_config.StorageConfig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**blockstore_namespace_ValidityRegex** | str, | str, | | -**blockstore_namespace_example** | str, | str, | | -**blockstore_type** | str, | str, | | -**import_support** | bool, | BoolClass, | | -**pre_sign_support_UI** | bool, | BoolClass, | | -**pre_sign_support** | bool, | BoolClass, | | -**default_namespace_prefix** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/StorageURI.md b/clients/python/docs/models/StorageURI.md deleted file mode 100644 index 47cc78950aa..00000000000 --- a/clients/python/docs/models/StorageURI.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.storage_uri.StorageURI - -URI to a path in a storage provider (e.g. \"s3://bucket1/path/to/object\") - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | URI to a path in a storage provider (e.g. \"s3://bucket1/path/to/object\") | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**location** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/TagCreation.md b/clients/python/docs/models/TagCreation.md deleted file mode 100644 index 05af9bf74da..00000000000 --- a/clients/python/docs/models/TagCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.tag_creation.TagCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**ref** | str, | str, | | -**id** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/UnderlyingObjectProperties.md b/clients/python/docs/models/UnderlyingObjectProperties.md deleted file mode 100644 index 585f9512bae..00000000000 --- a/clients/python/docs/models/UnderlyingObjectProperties.md +++ /dev/null @@ -1,15 +0,0 @@ -# lakefs_client.model.underlying_object_properties.UnderlyingObjectProperties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**storage_class** | None, str, | NoneClass, str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/UpdatePasswordByToken.md b/clients/python/docs/models/UpdatePasswordByToken.md deleted file mode 100644 index 496dc8a0a17..00000000000 --- a/clients/python/docs/models/UpdatePasswordByToken.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.update_password_by_token.UpdatePasswordByToken - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**newPassword** | str, | str, | new password to update | -**token** | str, | str, | token used for authentication | -**email** | str, | str, | optional user email to match the token for verification | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/User.md b/clients/python/docs/models/User.md deleted file mode 100644 index f71a93d849e..00000000000 --- a/clients/python/docs/models/User.md +++ /dev/null @@ -1,18 +0,0 @@ -# lakefs_client.model.user.User - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**creation_date** | decimal.Decimal, int, | decimal.Decimal, | Unix Epoch in seconds | value must be a 64 bit integer -**id** | str, | str, | a unique identifier for the user. In password-based authentication, this is the email. | -**friendly_name** | str, | str, | | [optional] -**email** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/UserCreation.md b/clients/python/docs/models/UserCreation.md deleted file mode 100644 index ac6fd2140a8..00000000000 --- a/clients/python/docs/models/UserCreation.md +++ /dev/null @@ -1,16 +0,0 @@ -# lakefs_client.model.user_creation.UserCreation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | str, | str, | a unique identifier for the user. In password-based authentication, this is the email. | -**invite_user** | bool, | BoolClass, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/UserList.md b/clients/python/docs/models/UserList.md deleted file mode 100644 index 825602d882f..00000000000 --- a/clients/python/docs/models/UserList.md +++ /dev/null @@ -1,28 +0,0 @@ -# lakefs_client.model.user_list.UserList - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pagination** | [**Pagination**](Pagination.md) | [**Pagination**](Pagination.md) | | -**[results](#results)** | list, tuple, | tuple, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# results - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**User**](User.md) | [**User**](User.md) | [**User**](User.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/docs/models/VersionConfig.md b/clients/python/docs/models/VersionConfig.md deleted file mode 100644 index 799922292d9..00000000000 --- a/clients/python/docs/models/VersionConfig.md +++ /dev/null @@ -1,17 +0,0 @@ -# lakefs_client.model.version_config.VersionConfig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**version** | str, | str, | | [optional] -**upgrade_recommended** | bool, | BoolClass, | | [optional] -**upgrade_url** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/clients/python/lakefs_client/__init__.py b/clients/python/lakefs_client/__init__.py index feba3f97bdf..f56dcdf2fda 100644 --- a/clients/python/lakefs_client/__init__.py +++ b/clients/python/lakefs_client/__init__.py @@ -1,5 +1,3 @@ -# coding: utf-8 - # flake8: noqa """ @@ -12,6 +10,7 @@ Generated by: https://openapi-generator.tech """ + __version__ = "0.1.0-SNAPSHOT" # import ApiClient diff --git a/clients/python/lakefs_client/api/__init__.py b/clients/python/lakefs_client/api/__init__.py new file mode 100644 index 00000000000..c0745e4b103 --- /dev/null +++ b/clients/python/lakefs_client/api/__init__.py @@ -0,0 +1,3 @@ +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from lakefs_client.apis import ActionsApi diff --git a/clients/python/lakefs_client/api/actions_api.py b/clients/python/lakefs_client/api/actions_api.py new file mode 100644 index 00000000000..7784054e87d --- /dev/null +++ b/clients/python/lakefs_client/api/actions_api.py @@ -0,0 +1,611 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.action_run import ActionRun +from lakefs_client.model.action_run_list import ActionRunList +from lakefs_client.model.error import Error +from lakefs_client.model.hook_run_list import HookRunList + + +class ActionsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_run_endpoint = _Endpoint( + settings={ + 'response_type': (ActionRun,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/actions/runs/{run_id}', + 'operation_id': 'get_run', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'run_id', + ], + 'required': [ + 'repository', + 'run_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'run_id': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'run_id': 'run_id', + }, + 'location_map': { + 'repository': 'path', + 'run_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_run_hook_output_endpoint = _Endpoint( + settings={ + 'response_type': (file_type,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output', + 'operation_id': 'get_run_hook_output', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'run_id', + 'hook_run_id', + ], + 'required': [ + 'repository', + 'run_id', + 'hook_run_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'run_id': + (str,), + 'hook_run_id': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'run_id': 'run_id', + 'hook_run_id': 'hook_run_id', + }, + 'location_map': { + 'repository': 'path', + 'run_id': 'path', + 'hook_run_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/octet-stream', + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_repository_runs_endpoint = _Endpoint( + settings={ + 'response_type': (ActionRunList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/actions/runs', + 'operation_id': 'list_repository_runs', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'after', + 'amount', + 'branch', + 'commit', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'after': + (str,), + 'amount': + (int,), + 'branch': + (str,), + 'commit': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'after': 'after', + 'amount': 'amount', + 'branch': 'branch', + 'commit': 'commit', + }, + 'location_map': { + 'repository': 'path', + 'after': 'query', + 'amount': 'query', + 'branch': 'query', + 'commit': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_run_hooks_endpoint = _Endpoint( + settings={ + 'response_type': (HookRunList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/actions/runs/{run_id}/hooks', + 'operation_id': 'list_run_hooks', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'run_id', + 'after', + 'amount', + ], + 'required': [ + 'repository', + 'run_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'run_id': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'repository': 'repository', + 'run_id': 'run_id', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'repository': 'path', + 'run_id': 'path', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def get_run( + self, + repository, + run_id, + **kwargs + ): + """get a run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_run(repository, run_id, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + run_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ActionRun + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['run_id'] = \ + run_id + return self.get_run_endpoint.call_with_http_info(**kwargs) + + def get_run_hook_output( + self, + repository, + run_id, + hook_run_id, + **kwargs + ): + """get run hook output # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_run_hook_output(repository, run_id, hook_run_id, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + run_id (str): + hook_run_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['run_id'] = \ + run_id + kwargs['hook_run_id'] = \ + hook_run_id + return self.get_run_hook_output_endpoint.call_with_http_info(**kwargs) + + def list_repository_runs( + self, + repository, + **kwargs + ): + """list runs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_repository_runs(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + branch (str): [optional] + commit (str): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ActionRunList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.list_repository_runs_endpoint.call_with_http_info(**kwargs) + + def list_run_hooks( + self, + repository, + run_id, + **kwargs + ): + """list run hooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_run_hooks(repository, run_id, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + run_id (str): + + Keyword Args: + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + HookRunList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['run_id'] = \ + run_id + return self.list_run_hooks_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/auth_api.py b/clients/python/lakefs_client/api/auth_api.py new file mode 100644 index 00000000000..7cf51833074 --- /dev/null +++ b/clients/python/lakefs_client/api/auth_api.py @@ -0,0 +1,4091 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.auth_capabilities import AuthCapabilities +from lakefs_client.model.authentication_token import AuthenticationToken +from lakefs_client.model.credentials import Credentials +from lakefs_client.model.credentials_list import CredentialsList +from lakefs_client.model.credentials_with_secret import CredentialsWithSecret +from lakefs_client.model.current_user import CurrentUser +from lakefs_client.model.error import Error +from lakefs_client.model.forgot_password_request import ForgotPasswordRequest +from lakefs_client.model.group import Group +from lakefs_client.model.group_creation import GroupCreation +from lakefs_client.model.group_list import GroupList +from lakefs_client.model.login_information import LoginInformation +from lakefs_client.model.policy import Policy +from lakefs_client.model.policy_list import PolicyList +from lakefs_client.model.update_password_by_token import UpdatePasswordByToken +from lakefs_client.model.user import User +from lakefs_client.model.user_creation import UserCreation +from lakefs_client.model.user_list import UserList + + +class AuthApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.add_group_membership_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}/members/{userId}', + 'operation_id': 'add_group_membership', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + 'user_id', + ], + 'required': [ + 'group_id', + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + 'user_id': + (str,), + }, + 'attribute_map': { + 'group_id': 'groupId', + 'user_id': 'userId', + }, + 'location_map': { + 'group_id': 'path', + 'user_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.attach_policy_to_group_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}/policies/{policyId}', + 'operation_id': 'attach_policy_to_group', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + 'policy_id', + ], + 'required': [ + 'group_id', + 'policy_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + 'policy_id': + (str,), + }, + 'attribute_map': { + 'group_id': 'groupId', + 'policy_id': 'policyId', + }, + 'location_map': { + 'group_id': 'path', + 'policy_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.attach_policy_to_user_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/policies/{policyId}', + 'operation_id': 'attach_policy_to_user', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'policy_id', + ], + 'required': [ + 'user_id', + 'policy_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'policy_id': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'policy_id': 'policyId', + }, + 'location_map': { + 'user_id': 'path', + 'policy_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.create_credentials_endpoint = _Endpoint( + settings={ + 'response_type': (CredentialsWithSecret,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/credentials', + 'operation_id': 'create_credentials', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + }, + 'location_map': { + 'user_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.create_group_endpoint = _Endpoint( + settings={ + 'response_type': (Group,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups', + 'operation_id': 'create_group', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_creation', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_creation': + (GroupCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'group_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_policy_endpoint = _Endpoint( + settings={ + 'response_type': (Policy,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/policies', + 'operation_id': 'create_policy', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'policy', + ], + 'required': [ + 'policy', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'policy': + (Policy,), + }, + 'attribute_map': { + }, + 'location_map': { + 'policy': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_user_endpoint = _Endpoint( + settings={ + 'response_type': (User,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users', + 'operation_id': 'create_user', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_creation', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_creation': + (UserCreation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'user_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_credentials_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/credentials/{accessKeyId}', + 'operation_id': 'delete_credentials', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'access_key_id', + ], + 'required': [ + 'user_id', + 'access_key_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'access_key_id': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'access_key_id': 'accessKeyId', + }, + 'location_map': { + 'user_id': 'path', + 'access_key_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_group_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}', + 'operation_id': 'delete_group', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + ], + 'required': [ + 'group_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + }, + 'attribute_map': { + 'group_id': 'groupId', + }, + 'location_map': { + 'group_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_group_membership_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}/members/{userId}', + 'operation_id': 'delete_group_membership', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + 'user_id', + ], + 'required': [ + 'group_id', + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + 'user_id': + (str,), + }, + 'attribute_map': { + 'group_id': 'groupId', + 'user_id': 'userId', + }, + 'location_map': { + 'group_id': 'path', + 'user_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_policy_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/policies/{policyId}', + 'operation_id': 'delete_policy', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'policy_id', + ], + 'required': [ + 'policy_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'policy_id': + (str,), + }, + 'attribute_map': { + 'policy_id': 'policyId', + }, + 'location_map': { + 'policy_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_user_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}', + 'operation_id': 'delete_user', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + }, + 'location_map': { + 'user_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.detach_policy_from_group_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}/policies/{policyId}', + 'operation_id': 'detach_policy_from_group', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + 'policy_id', + ], + 'required': [ + 'group_id', + 'policy_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + 'policy_id': + (str,), + }, + 'attribute_map': { + 'group_id': 'groupId', + 'policy_id': 'policyId', + }, + 'location_map': { + 'group_id': 'path', + 'policy_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.detach_policy_from_user_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/policies/{policyId}', + 'operation_id': 'detach_policy_from_user', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'policy_id', + ], + 'required': [ + 'user_id', + 'policy_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'policy_id': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'policy_id': 'policyId', + }, + 'location_map': { + 'user_id': 'path', + 'policy_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.forgot_password_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/auth/password/forgot', + 'operation_id': 'forgot_password', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'forgot_password_request', + ], + 'required': [ + 'forgot_password_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'forgot_password_request': + (ForgotPasswordRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'forgot_password_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_auth_capabilities_endpoint = _Endpoint( + settings={ + 'response_type': (AuthCapabilities,), + 'auth': [], + 'endpoint_path': '/auth/capabilities', + 'operation_id': 'get_auth_capabilities', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_credentials_endpoint = _Endpoint( + settings={ + 'response_type': (Credentials,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/credentials/{accessKeyId}', + 'operation_id': 'get_credentials', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'access_key_id', + ], + 'required': [ + 'user_id', + 'access_key_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'access_key_id': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'access_key_id': 'accessKeyId', + }, + 'location_map': { + 'user_id': 'path', + 'access_key_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_current_user_endpoint = _Endpoint( + settings={ + 'response_type': (CurrentUser,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/user', + 'operation_id': 'get_current_user', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_group_endpoint = _Endpoint( + settings={ + 'response_type': (Group,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}', + 'operation_id': 'get_group', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + ], + 'required': [ + 'group_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + }, + 'attribute_map': { + 'group_id': 'groupId', + }, + 'location_map': { + 'group_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_policy_endpoint = _Endpoint( + settings={ + 'response_type': (Policy,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/policies/{policyId}', + 'operation_id': 'get_policy', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'policy_id', + ], + 'required': [ + 'policy_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'policy_id': + (str,), + }, + 'attribute_map': { + 'policy_id': 'policyId', + }, + 'location_map': { + 'policy_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_user_endpoint = _Endpoint( + settings={ + 'response_type': (User,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}', + 'operation_id': 'get_user', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + }, + 'location_map': { + 'user_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_group_members_endpoint = _Endpoint( + settings={ + 'response_type': (UserList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}/members', + 'operation_id': 'list_group_members', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + 'prefix', + 'after', + 'amount', + ], + 'required': [ + 'group_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'group_id': 'groupId', + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'group_id': 'path', + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_group_policies_endpoint = _Endpoint( + settings={ + 'response_type': (PolicyList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups/{groupId}/policies', + 'operation_id': 'list_group_policies', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'group_id', + 'prefix', + 'after', + 'amount', + ], + 'required': [ + 'group_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'group_id': + (str,), + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'group_id': 'groupId', + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'group_id': 'path', + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_groups_endpoint = _Endpoint( + settings={ + 'response_type': (GroupList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/groups', + 'operation_id': 'list_groups', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'prefix', + 'after', + 'amount', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_policies_endpoint = _Endpoint( + settings={ + 'response_type': (PolicyList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/policies', + 'operation_id': 'list_policies', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'prefix', + 'after', + 'amount', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_user_credentials_endpoint = _Endpoint( + settings={ + 'response_type': (CredentialsList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/credentials', + 'operation_id': 'list_user_credentials', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'prefix', + 'after', + 'amount', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'user_id': 'path', + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_user_groups_endpoint = _Endpoint( + settings={ + 'response_type': (GroupList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/groups', + 'operation_id': 'list_user_groups', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'prefix', + 'after', + 'amount', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'user_id': 'path', + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_user_policies_endpoint = _Endpoint( + settings={ + 'response_type': (PolicyList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users/{userId}/policies', + 'operation_id': 'list_user_policies', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'prefix', + 'after', + 'amount', + 'effective', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + 'effective': + (bool,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + 'effective': 'effective', + }, + 'location_map': { + 'user_id': 'path', + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + 'effective': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_users_endpoint = _Endpoint( + settings={ + 'response_type': (UserList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/users', + 'operation_id': 'list_users', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'prefix', + 'after', + 'amount', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.login_endpoint = _Endpoint( + settings={ + 'response_type': (AuthenticationToken,), + 'auth': [], + 'endpoint_path': '/auth/login', + 'operation_id': 'login', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'login_information', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'login_information': + (LoginInformation,), + }, + 'attribute_map': { + }, + 'location_map': { + 'login_information': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_password_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'cookie_auth' + ], + 'endpoint_path': '/auth/password', + 'operation_id': 'update_password', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'update_password_by_token', + ], + 'required': [ + 'update_password_by_token', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'update_password_by_token': + (UpdatePasswordByToken,), + }, + 'attribute_map': { + }, + 'location_map': { + 'update_password_by_token': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.update_policy_endpoint = _Endpoint( + settings={ + 'response_type': (Policy,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/auth/policies/{policyId}', + 'operation_id': 'update_policy', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'policy_id', + 'policy', + ], + 'required': [ + 'policy_id', + 'policy', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'policy_id': + (str,), + 'policy': + (Policy,), + }, + 'attribute_map': { + 'policy_id': 'policyId', + }, + 'location_map': { + 'policy_id': 'path', + 'policy': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def add_group_membership( + self, + group_id, + user_id, + **kwargs + ): + """add group membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_group_membership(group_id, user_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + user_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + kwargs['user_id'] = \ + user_id + return self.add_group_membership_endpoint.call_with_http_info(**kwargs) + + def attach_policy_to_group( + self, + group_id, + policy_id, + **kwargs + ): + """attach policy to group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.attach_policy_to_group(group_id, policy_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + policy_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + kwargs['policy_id'] = \ + policy_id + return self.attach_policy_to_group_endpoint.call_with_http_info(**kwargs) + + def attach_policy_to_user( + self, + user_id, + policy_id, + **kwargs + ): + """attach policy to user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.attach_policy_to_user(user_id, policy_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + policy_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + kwargs['policy_id'] = \ + policy_id + return self.attach_policy_to_user_endpoint.call_with_http_info(**kwargs) + + def create_credentials( + self, + user_id, + **kwargs + ): + """create credentials # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_credentials(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CredentialsWithSecret + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + return self.create_credentials_endpoint.call_with_http_info(**kwargs) + + def create_group( + self, + **kwargs + ): + """create group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_group(async_req=True) + >>> result = thread.get() + + + Keyword Args: + group_creation (GroupCreation): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Group + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.create_group_endpoint.call_with_http_info(**kwargs) + + def create_policy( + self, + policy, + **kwargs + ): + """create policy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_policy(policy, async_req=True) + >>> result = thread.get() + + Args: + policy (Policy): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Policy + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['policy'] = \ + policy + return self.create_policy_endpoint.call_with_http_info(**kwargs) + + def create_user( + self, + **kwargs + ): + """create user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_user(async_req=True) + >>> result = thread.get() + + + Keyword Args: + user_creation (UserCreation): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + User + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.create_user_endpoint.call_with_http_info(**kwargs) + + def delete_credentials( + self, + user_id, + access_key_id, + **kwargs + ): + """delete credentials # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_credentials(user_id, access_key_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + access_key_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + kwargs['access_key_id'] = \ + access_key_id + return self.delete_credentials_endpoint.call_with_http_info(**kwargs) + + def delete_group( + self, + group_id, + **kwargs + ): + """delete group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_group(group_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + return self.delete_group_endpoint.call_with_http_info(**kwargs) + + def delete_group_membership( + self, + group_id, + user_id, + **kwargs + ): + """delete group membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_group_membership(group_id, user_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + user_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + kwargs['user_id'] = \ + user_id + return self.delete_group_membership_endpoint.call_with_http_info(**kwargs) + + def delete_policy( + self, + policy_id, + **kwargs + ): + """delete policy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_policy(policy_id, async_req=True) + >>> result = thread.get() + + Args: + policy_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['policy_id'] = \ + policy_id + return self.delete_policy_endpoint.call_with_http_info(**kwargs) + + def delete_user( + self, + user_id, + **kwargs + ): + """delete user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_user(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + return self.delete_user_endpoint.call_with_http_info(**kwargs) + + def detach_policy_from_group( + self, + group_id, + policy_id, + **kwargs + ): + """detach policy from group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.detach_policy_from_group(group_id, policy_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + policy_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + kwargs['policy_id'] = \ + policy_id + return self.detach_policy_from_group_endpoint.call_with_http_info(**kwargs) + + def detach_policy_from_user( + self, + user_id, + policy_id, + **kwargs + ): + """detach policy from user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.detach_policy_from_user(user_id, policy_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + policy_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + kwargs['policy_id'] = \ + policy_id + return self.detach_policy_from_user_endpoint.call_with_http_info(**kwargs) + + def forgot_password( + self, + forgot_password_request, + **kwargs + ): + """forgot password request initiates the password reset process # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.forgot_password(forgot_password_request, async_req=True) + >>> result = thread.get() + + Args: + forgot_password_request (ForgotPasswordRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['forgot_password_request'] = \ + forgot_password_request + return self.forgot_password_endpoint.call_with_http_info(**kwargs) + + def get_auth_capabilities( + self, + **kwargs + ): + """list authentication capabilities supported # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_auth_capabilities(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AuthCapabilities + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_auth_capabilities_endpoint.call_with_http_info(**kwargs) + + def get_credentials( + self, + user_id, + access_key_id, + **kwargs + ): + """get credentials # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_credentials(user_id, access_key_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + access_key_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Credentials + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + kwargs['access_key_id'] = \ + access_key_id + return self.get_credentials_endpoint.call_with_http_info(**kwargs) + + def get_current_user( + self, + **kwargs + ): + """get current user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_current_user(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CurrentUser + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_current_user_endpoint.call_with_http_info(**kwargs) + + def get_group( + self, + group_id, + **kwargs + ): + """get group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_group(group_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Group + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + return self.get_group_endpoint.call_with_http_info(**kwargs) + + def get_policy( + self, + policy_id, + **kwargs + ): + """get policy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_policy(policy_id, async_req=True) + >>> result = thread.get() + + Args: + policy_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Policy + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['policy_id'] = \ + policy_id + return self.get_policy_endpoint.call_with_http_info(**kwargs) + + def get_user( + self, + user_id, + **kwargs + ): + """get user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + User + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + return self.get_user_endpoint.call_with_http_info(**kwargs) + + def list_group_members( + self, + group_id, + **kwargs + ): + """list group members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_group_members(group_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UserList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + return self.list_group_members_endpoint.call_with_http_info(**kwargs) + + def list_group_policies( + self, + group_id, + **kwargs + ): + """list group policies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_group_policies(group_id, async_req=True) + >>> result = thread.get() + + Args: + group_id (str): + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PolicyList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['group_id'] = \ + group_id + return self.list_group_policies_endpoint.call_with_http_info(**kwargs) + + def list_groups( + self, + **kwargs + ): + """list groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_groups(async_req=True) + >>> result = thread.get() + + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GroupList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.list_groups_endpoint.call_with_http_info(**kwargs) + + def list_policies( + self, + **kwargs + ): + """list policies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_policies(async_req=True) + >>> result = thread.get() + + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PolicyList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.list_policies_endpoint.call_with_http_info(**kwargs) + + def list_user_credentials( + self, + user_id, + **kwargs + ): + """list user credentials # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_user_credentials(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CredentialsList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + return self.list_user_credentials_endpoint.call_with_http_info(**kwargs) + + def list_user_groups( + self, + user_id, + **kwargs + ): + """list user groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_user_groups(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GroupList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + return self.list_user_groups_endpoint.call_with_http_info(**kwargs) + + def list_user_policies( + self, + user_id, + **kwargs + ): + """list user policies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_user_policies(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + effective (bool): will return all distinct policies attached to the user or any of its groups. [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PolicyList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + return self.list_user_policies_endpoint.call_with_http_info(**kwargs) + + def list_users( + self, + **kwargs + ): + """list users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_users(async_req=True) + >>> result = thread.get() + + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UserList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.list_users_endpoint.call_with_http_info(**kwargs) + + def login( + self, + **kwargs + ): + """perform a login # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.login(async_req=True) + >>> result = thread.get() + + + Keyword Args: + login_information (LoginInformation): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AuthenticationToken + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.login_endpoint.call_with_http_info(**kwargs) + + def update_password( + self, + update_password_by_token, + **kwargs + ): + """Update user password by reset_password token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_password(update_password_by_token, async_req=True) + >>> result = thread.get() + + Args: + update_password_by_token (UpdatePasswordByToken): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['update_password_by_token'] = \ + update_password_by_token + return self.update_password_endpoint.call_with_http_info(**kwargs) + + def update_policy( + self, + policy_id, + policy, + **kwargs + ): + """update policy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_policy(policy_id, policy, async_req=True) + >>> result = thread.get() + + Args: + policy_id (str): + policy (Policy): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Policy + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['policy_id'] = \ + policy_id + kwargs['policy'] = \ + policy + return self.update_policy_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/branches_api.py b/clients/python/lakefs_client/api/branches_api.py new file mode 100644 index 00000000000..7e69c19e7c9 --- /dev/null +++ b/clients/python/lakefs_client/api/branches_api.py @@ -0,0 +1,1166 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.branch_creation import BranchCreation +from lakefs_client.model.cherry_pick_creation import CherryPickCreation +from lakefs_client.model.commit import Commit +from lakefs_client.model.diff_list import DiffList +from lakefs_client.model.error import Error +from lakefs_client.model.ref import Ref +from lakefs_client.model.ref_list import RefList +from lakefs_client.model.reset_creation import ResetCreation +from lakefs_client.model.revert_creation import RevertCreation + + +class BranchesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.cherry_pick_endpoint = _Endpoint( + settings={ + 'response_type': (Commit,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/cherry-pick', + 'operation_id': 'cherry_pick', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'cherry_pick_creation', + ], + 'required': [ + 'repository', + 'branch', + 'cherry_pick_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'cherry_pick_creation': + (CherryPickCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'cherry_pick_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_branch_endpoint = _Endpoint( + settings={ + 'response_type': (str,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches', + 'operation_id': 'create_branch', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch_creation', + ], + 'required': [ + 'repository', + 'branch_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch_creation': + (BranchCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'branch_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'text/html', + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_branch_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}', + 'operation_id': 'delete_branch', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + ], + 'required': [ + 'repository', + 'branch', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.diff_branch_endpoint = _Endpoint( + settings={ + 'response_type': (DiffList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/diff', + 'operation_id': 'diff_branch', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'after', + 'amount', + 'prefix', + 'delimiter', + ], + 'required': [ + 'repository', + 'branch', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'after': + (str,), + 'amount': + (int,), + 'prefix': + (str,), + 'delimiter': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'after': 'after', + 'amount': 'amount', + 'prefix': 'prefix', + 'delimiter': 'delimiter', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'after': 'query', + 'amount': 'query', + 'prefix': 'query', + 'delimiter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_branch_endpoint = _Endpoint( + settings={ + 'response_type': (Ref,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}', + 'operation_id': 'get_branch', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + ], + 'required': [ + 'repository', + 'branch', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_branches_endpoint = _Endpoint( + settings={ + 'response_type': (RefList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches', + 'operation_id': 'list_branches', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'prefix', + 'after', + 'amount', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'repository': 'repository', + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'repository': 'path', + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.reset_branch_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}', + 'operation_id': 'reset_branch', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'reset_creation', + ], + 'required': [ + 'repository', + 'branch', + 'reset_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'reset_creation': + (ResetCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'reset_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.revert_branch_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/revert', + 'operation_id': 'revert_branch', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'revert_creation', + ], + 'required': [ + 'repository', + 'branch', + 'revert_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'revert_creation': + (RevertCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'revert_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def cherry_pick( + self, + repository, + branch, + cherry_pick_creation, + **kwargs + ): + """Replay the changes from the given commit on the branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.cherry_pick(repository, branch, cherry_pick_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + cherry_pick_creation (CherryPickCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Commit + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['cherry_pick_creation'] = \ + cherry_pick_creation + return self.cherry_pick_endpoint.call_with_http_info(**kwargs) + + def create_branch( + self, + repository, + branch_creation, + **kwargs + ): + """create branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_branch(repository, branch_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch_creation (BranchCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + str + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch_creation'] = \ + branch_creation + return self.create_branch_endpoint.call_with_http_info(**kwargs) + + def delete_branch( + self, + repository, + branch, + **kwargs + ): + """delete branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_branch(repository, branch, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + return self.delete_branch_endpoint.call_with_http_info(**kwargs) + + def diff_branch( + self, + repository, + branch, + **kwargs + ): + """diff branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.diff_branch(repository, branch, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + + Keyword Args: + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + prefix (str): return items prefixed with this value. [optional] + delimiter (str): delimiter used to group common prefixes by. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DiffList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + return self.diff_branch_endpoint.call_with_http_info(**kwargs) + + def get_branch( + self, + repository, + branch, + **kwargs + ): + """get branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_branch(repository, branch, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Ref + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + return self.get_branch_endpoint.call_with_http_info(**kwargs) + + def list_branches( + self, + repository, + **kwargs + ): + """list branches # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_branches(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RefList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.list_branches_endpoint.call_with_http_info(**kwargs) + + def reset_branch( + self, + repository, + branch, + reset_creation, + **kwargs + ): + """reset branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.reset_branch(repository, branch, reset_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + reset_creation (ResetCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['reset_creation'] = \ + reset_creation + return self.reset_branch_endpoint.call_with_http_info(**kwargs) + + def revert_branch( + self, + repository, + branch, + revert_creation, + **kwargs + ): + """revert # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.revert_branch(repository, branch, revert_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + revert_creation (RevertCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['revert_creation'] = \ + revert_creation + return self.revert_branch_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/commits_api.py b/clients/python/lakefs_client/api/commits_api.py new file mode 100644 index 00000000000..6fc21499959 --- /dev/null +++ b/clients/python/lakefs_client/api/commits_api.py @@ -0,0 +1,467 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.commit import Commit +from lakefs_client.model.commit_creation import CommitCreation +from lakefs_client.model.commit_list import CommitList +from lakefs_client.model.error import Error + + +class CommitsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.commit_endpoint = _Endpoint( + settings={ + 'response_type': (Commit,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/commits', + 'operation_id': 'commit', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'commit_creation', + 'source_metarange', + ], + 'required': [ + 'repository', + 'branch', + 'commit_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'commit_creation': + (CommitCreation,), + 'source_metarange': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'source_metarange': 'source_metarange', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'commit_creation': 'body', + 'source_metarange': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_commit_endpoint = _Endpoint( + settings={ + 'response_type': (Commit,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/commits/{commitId}', + 'operation_id': 'get_commit', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'commit_id', + ], + 'required': [ + 'repository', + 'commit_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'commit_id': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'commit_id': 'commitId', + }, + 'location_map': { + 'repository': 'path', + 'commit_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.log_branch_commits_endpoint = _Endpoint( + settings={ + 'response_type': (CommitList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/commits', + 'operation_id': 'log_branch_commits', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'after', + 'amount', + ], + 'required': [ + 'repository', + 'branch', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def commit( + self, + repository, + branch, + commit_creation, + **kwargs + ): + """create commit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.commit(repository, branch, commit_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + commit_creation (CommitCreation): + + Keyword Args: + source_metarange (str): The source metarange to commit. Branch must not have uncommitted changes.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Commit + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['commit_creation'] = \ + commit_creation + return self.commit_endpoint.call_with_http_info(**kwargs) + + def get_commit( + self, + repository, + commit_id, + **kwargs + ): + """get commit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_commit(repository, commit_id, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + commit_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Commit + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['commit_id'] = \ + commit_id + return self.get_commit_endpoint.call_with_http_info(**kwargs) + + def log_branch_commits( + self, + repository, + branch, + **kwargs + ): + """get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.log_branch_commits(repository, branch, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + + Keyword Args: + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CommitList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + return self.log_branch_commits_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/config_api.py b/clients/python/lakefs_client/api/config_api.py new file mode 100644 index 00000000000..7167924e737 --- /dev/null +++ b/clients/python/lakefs_client/api/config_api.py @@ -0,0 +1,706 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.comm_prefs_input import CommPrefsInput +from lakefs_client.model.credentials_with_secret import CredentialsWithSecret +from lakefs_client.model.error import Error +from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig +from lakefs_client.model.next_step import NextStep +from lakefs_client.model.setup import Setup +from lakefs_client.model.setup_state import SetupState +from lakefs_client.model.storage_config import StorageConfig +from lakefs_client.model.version_config import VersionConfig + + +class ConfigApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_garbage_collection_config_endpoint = _Endpoint( + settings={ + 'response_type': (GarbageCollectionConfig,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/config/garbage-collection', + 'operation_id': 'get_garbage_collection_config', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_lake_fs_version_endpoint = _Endpoint( + settings={ + 'response_type': (VersionConfig,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/config/version', + 'operation_id': 'get_lake_fs_version', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_setup_state_endpoint = _Endpoint( + settings={ + 'response_type': (SetupState,), + 'auth': [], + 'endpoint_path': '/setup_lakefs', + 'operation_id': 'get_setup_state', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_storage_config_endpoint = _Endpoint( + settings={ + 'response_type': (StorageConfig,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/config/storage', + 'operation_id': 'get_storage_config', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.setup_endpoint = _Endpoint( + settings={ + 'response_type': (CredentialsWithSecret,), + 'auth': [], + 'endpoint_path': '/setup_lakefs', + 'operation_id': 'setup', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'setup', + ], + 'required': [ + 'setup', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'setup': + (Setup,), + }, + 'attribute_map': { + }, + 'location_map': { + 'setup': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.setup_comm_prefs_endpoint = _Endpoint( + settings={ + 'response_type': (NextStep,), + 'auth': [], + 'endpoint_path': '/setup_comm_prefs', + 'operation_id': 'setup_comm_prefs', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'comm_prefs_input', + ], + 'required': [ + 'comm_prefs_input', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'comm_prefs_input': + (CommPrefsInput,), + }, + 'attribute_map': { + }, + 'location_map': { + 'comm_prefs_input': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def get_garbage_collection_config( + self, + **kwargs + ): + """get_garbage_collection_config # noqa: E501 + + get information of gc settings # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_garbage_collection_config(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GarbageCollectionConfig + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_garbage_collection_config_endpoint.call_with_http_info(**kwargs) + + def get_lake_fs_version( + self, + **kwargs + ): + """get_lake_fs_version # noqa: E501 + + get version of lakeFS server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_lake_fs_version(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + VersionConfig + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_lake_fs_version_endpoint.call_with_http_info(**kwargs) + + def get_setup_state( + self, + **kwargs + ): + """check if the lakeFS installation is already set up # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_setup_state(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + SetupState + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_setup_state_endpoint.call_with_http_info(**kwargs) + + def get_storage_config( + self, + **kwargs + ): + """get_storage_config # noqa: E501 + + retrieve lakeFS storage configuration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_storage_config(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + StorageConfig + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.get_storage_config_endpoint.call_with_http_info(**kwargs) + + def setup( + self, + setup, + **kwargs + ): + """setup lakeFS and create a first user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.setup(setup, async_req=True) + >>> result = thread.get() + + Args: + setup (Setup): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CredentialsWithSecret + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['setup'] = \ + setup + return self.setup_endpoint.call_with_http_info(**kwargs) + + def setup_comm_prefs( + self, + comm_prefs_input, + **kwargs + ): + """setup communications preferences # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.setup_comm_prefs(comm_prefs_input, async_req=True) + >>> result = thread.get() + + Args: + comm_prefs_input (CommPrefsInput): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + NextStep + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['comm_prefs_input'] = \ + comm_prefs_input + return self.setup_comm_prefs_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/experimental_api.py b/clients/python/lakefs_client/api/experimental_api.py new file mode 100644 index 00000000000..5536bc0a1ea --- /dev/null +++ b/clients/python/lakefs_client/api/experimental_api.py @@ -0,0 +1,200 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.otf_diff_list import OtfDiffList + + +class ExperimentalApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.otf_diff_endpoint = _Endpoint( + settings={ + 'response_type': (OtfDiffList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref}', + 'operation_id': 'otf_diff', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'left_ref', + 'right_ref', + 'table_path', + 'type', + ], + 'required': [ + 'repository', + 'left_ref', + 'right_ref', + 'table_path', + 'type', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'left_ref': + (str,), + 'right_ref': + (str,), + 'table_path': + (str,), + 'type': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'left_ref': 'left_ref', + 'right_ref': 'right_ref', + 'table_path': 'table_path', + 'type': 'type', + }, + 'location_map': { + 'repository': 'path', + 'left_ref': 'path', + 'right_ref': 'path', + 'table_path': 'query', + 'type': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def otf_diff( + self, + repository, + left_ref, + right_ref, + table_path, + type, + **kwargs + ): + """perform otf diff # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.otf_diff(repository, left_ref, right_ref, table_path, type, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + left_ref (str): + right_ref (str): + table_path (str): a path to the table location under the specified ref. + type (str): the type of otf + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + OtfDiffList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['left_ref'] = \ + left_ref + kwargs['right_ref'] = \ + right_ref + kwargs['table_path'] = \ + table_path + kwargs['type'] = \ + type + return self.otf_diff_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/health_check_api.py b/clients/python/lakefs_client/api/health_check_api.py new file mode 100644 index 00000000000..77df095bcab --- /dev/null +++ b/clients/python/lakefs_client/api/health_check_api.py @@ -0,0 +1,139 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) + + +class HealthCheckApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.health_check_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/healthcheck', + 'operation_id': 'health_check', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + + def health_check( + self, + **kwargs + ): + """health_check # noqa: E501 + + check that the API server is up and running # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.health_check(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.health_check_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/import_api.py b/clients/python/lakefs_client/api/import_api.py new file mode 100644 index 00000000000..3b804fb4736 --- /dev/null +++ b/clients/python/lakefs_client/api/import_api.py @@ -0,0 +1,305 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse +from lakefs_client.model.meta_range_creation import MetaRangeCreation +from lakefs_client.model.meta_range_creation_response import MetaRangeCreationResponse +from lakefs_client.model.stage_range_creation import StageRangeCreation + + +class ImportApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_meta_range_endpoint = _Endpoint( + settings={ + 'response_type': (MetaRangeCreationResponse,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/metaranges', + 'operation_id': 'create_meta_range', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'meta_range_creation', + ], + 'required': [ + 'repository', + 'meta_range_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'meta_range_creation': + (MetaRangeCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'meta_range_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.ingest_range_endpoint = _Endpoint( + settings={ + 'response_type': (IngestRangeCreationResponse,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/ranges', + 'operation_id': 'ingest_range', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'stage_range_creation', + ], + 'required': [ + 'repository', + 'stage_range_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'stage_range_creation': + (StageRangeCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'stage_range_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def create_meta_range( + self, + repository, + meta_range_creation, + **kwargs + ): + """create a lakeFS metarange file from the given ranges # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_meta_range(repository, meta_range_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + meta_range_creation (MetaRangeCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + MetaRangeCreationResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['meta_range_creation'] = \ + meta_range_creation + return self.create_meta_range_endpoint.call_with_http_info(**kwargs) + + def ingest_range( + self, + repository, + stage_range_creation, + **kwargs + ): + """create a lakeFS range file from the source uri # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ingest_range(repository, stage_range_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + stage_range_creation (StageRangeCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + IngestRangeCreationResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['stage_range_creation'] = \ + stage_range_creation + return self.ingest_range_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/metadata_api.py b/clients/python/lakefs_client/api/metadata_api.py new file mode 100644 index 00000000000..e81d3b25b41 --- /dev/null +++ b/clients/python/lakefs_client/api/metadata_api.py @@ -0,0 +1,436 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.storage_uri import StorageURI + + +class MetadataApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_symlink_file_endpoint = _Endpoint( + settings={ + 'response_type': (StorageURI,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{branch}/symlink', + 'operation_id': 'create_symlink_file', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'location', + ], + 'required': [ + 'repository', + 'branch', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'location': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'location': 'location', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'location': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_meta_range_endpoint = _Endpoint( + settings={ + 'response_type': (StorageURI,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/metadata/meta_range/{meta_range}', + 'operation_id': 'get_meta_range', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'meta_range', + ], + 'required': [ + 'repository', + 'meta_range', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'meta_range': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'meta_range': 'meta_range', + }, + 'location_map': { + 'repository': 'path', + 'meta_range': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_range_endpoint = _Endpoint( + settings={ + 'response_type': (StorageURI,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/metadata/range/{range}', + 'operation_id': 'get_range', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'range', + ], + 'required': [ + 'repository', + 'range', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'range': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'range': 'range', + }, + 'location_map': { + 'repository': 'path', + 'range': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def create_symlink_file( + self, + repository, + branch, + **kwargs + ): + """creates symlink files corresponding to the given directory # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_symlink_file(repository, branch, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + + Keyword Args: + location (str): path to the table data. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + StorageURI + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + return self.create_symlink_file_endpoint.call_with_http_info(**kwargs) + + def get_meta_range( + self, + repository, + meta_range, + **kwargs + ): + """return URI to a meta-range file # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_meta_range(repository, meta_range, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + meta_range (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + StorageURI + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['meta_range'] = \ + meta_range + return self.get_meta_range_endpoint.call_with_http_info(**kwargs) + + def get_range( + self, + repository, + range, + **kwargs + ): + """return URI to a range file # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_range(repository, range, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + range (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + StorageURI + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['range'] = \ + range + return self.get_range_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/objects_api.py b/clients/python/lakefs_client/api/objects_api.py new file mode 100644 index 00000000000..48c73124c65 --- /dev/null +++ b/clients/python/lakefs_client/api/objects_api.py @@ -0,0 +1,1571 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.object_copy_creation import ObjectCopyCreation +from lakefs_client.model.object_error_list import ObjectErrorList +from lakefs_client.model.object_stage_creation import ObjectStageCreation +from lakefs_client.model.object_stats import ObjectStats +from lakefs_client.model.object_stats_list import ObjectStatsList +from lakefs_client.model.path_list import PathList +from lakefs_client.model.underlying_object_properties import UnderlyingObjectProperties + + +class ObjectsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.copy_object_endpoint = _Endpoint( + settings={ + 'response_type': (ObjectStats,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/objects/copy', + 'operation_id': 'copy_object', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'dest_path', + 'object_copy_creation', + ], + 'required': [ + 'repository', + 'branch', + 'dest_path', + 'object_copy_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'dest_path': + (str,), + 'object_copy_creation': + (ObjectCopyCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'dest_path': 'dest_path', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'dest_path': 'query', + 'object_copy_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_object_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/objects', + 'operation_id': 'delete_object', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'path', + ], + 'required': [ + 'repository', + 'branch', + 'path', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'path': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'path': 'path', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'path': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_objects_endpoint = _Endpoint( + settings={ + 'response_type': (ObjectErrorList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/objects/delete', + 'operation_id': 'delete_objects', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'path_list', + ], + 'required': [ + 'repository', + 'branch', + 'path_list', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'path_list': + (PathList,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'path_list': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.get_object_endpoint = _Endpoint( + settings={ + 'response_type': (file_type,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{ref}/objects', + 'operation_id': 'get_object', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'ref', + 'path', + 'range', + 'presign', + ], + 'required': [ + 'repository', + 'ref', + 'path', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'range', + ] + }, + root_map={ + 'validations': { + ('range',): { + + 'regex': { + 'pattern': r'^bytes=((\d*-\d*,? ?)+)$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'ref': + (str,), + 'path': + (str,), + 'range': + (str,), + 'presign': + (bool,), + }, + 'attribute_map': { + 'repository': 'repository', + 'ref': 'ref', + 'path': 'path', + 'range': 'Range', + 'presign': 'presign', + }, + 'location_map': { + 'repository': 'path', + 'ref': 'path', + 'path': 'query', + 'range': 'header', + 'presign': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/octet-stream', + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_underlying_properties_endpoint = _Endpoint( + settings={ + 'response_type': (UnderlyingObjectProperties,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{ref}/objects/underlyingProperties', + 'operation_id': 'get_underlying_properties', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'ref', + 'path', + ], + 'required': [ + 'repository', + 'ref', + 'path', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'ref': + (str,), + 'path': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'ref': 'ref', + 'path': 'path', + }, + 'location_map': { + 'repository': 'path', + 'ref': 'path', + 'path': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.head_object_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{ref}/objects', + 'operation_id': 'head_object', + 'http_method': 'HEAD', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'ref', + 'path', + 'range', + ], + 'required': [ + 'repository', + 'ref', + 'path', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'range', + ] + }, + root_map={ + 'validations': { + ('range',): { + + 'regex': { + 'pattern': r'^bytes=((\d*-\d*,? ?)+)$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'ref': + (str,), + 'path': + (str,), + 'range': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'ref': 'ref', + 'path': 'path', + 'range': 'Range', + }, + 'location_map': { + 'repository': 'path', + 'ref': 'path', + 'path': 'query', + 'range': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.list_objects_endpoint = _Endpoint( + settings={ + 'response_type': (ObjectStatsList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{ref}/objects/ls', + 'operation_id': 'list_objects', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'ref', + 'user_metadata', + 'presign', + 'after', + 'amount', + 'delimiter', + 'prefix', + ], + 'required': [ + 'repository', + 'ref', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'ref': + (str,), + 'user_metadata': + (bool,), + 'presign': + (bool,), + 'after': + (str,), + 'amount': + (int,), + 'delimiter': + (str,), + 'prefix': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'ref': 'ref', + 'user_metadata': 'user_metadata', + 'presign': 'presign', + 'after': 'after', + 'amount': 'amount', + 'delimiter': 'delimiter', + 'prefix': 'prefix', + }, + 'location_map': { + 'repository': 'path', + 'ref': 'path', + 'user_metadata': 'query', + 'presign': 'query', + 'after': 'query', + 'amount': 'query', + 'delimiter': 'query', + 'prefix': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.stage_object_endpoint = _Endpoint( + settings={ + 'response_type': (ObjectStats,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/objects', + 'operation_id': 'stage_object', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'path', + 'object_stage_creation', + ], + 'required': [ + 'repository', + 'branch', + 'path', + 'object_stage_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'path': + (str,), + 'object_stage_creation': + (ObjectStageCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'path': 'path', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'path': 'query', + 'object_stage_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.stat_object_endpoint = _Endpoint( + settings={ + 'response_type': (ObjectStats,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{ref}/objects/stat', + 'operation_id': 'stat_object', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'ref', + 'path', + 'user_metadata', + 'presign', + ], + 'required': [ + 'repository', + 'ref', + 'path', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'ref': + (str,), + 'path': + (str,), + 'user_metadata': + (bool,), + 'presign': + (bool,), + }, + 'attribute_map': { + 'repository': 'repository', + 'ref': 'ref', + 'path': 'path', + 'user_metadata': 'user_metadata', + 'presign': 'presign', + }, + 'location_map': { + 'repository': 'path', + 'ref': 'path', + 'path': 'query', + 'user_metadata': 'query', + 'presign': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.upload_object_endpoint = _Endpoint( + settings={ + 'response_type': (ObjectStats,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/objects', + 'operation_id': 'upload_object', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'path', + 'storage_class', + 'if_none_match', + 'content', + ], + 'required': [ + 'repository', + 'branch', + 'path', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'if_none_match', + ] + }, + root_map={ + 'validations': { + ('if_none_match',): { + + 'regex': { + 'pattern': r'^\*$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'path': + (str,), + 'storage_class': + (str,), + 'if_none_match': + (str,), + 'content': + (file_type,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'path': 'path', + 'storage_class': 'storageClass', + 'if_none_match': 'If-None-Match', + 'content': 'content', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'path': 'query', + 'storage_class': 'query', + 'if_none_match': 'header', + 'content': 'form', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client + ) + + def copy_object( + self, + repository, + branch, + dest_path, + object_copy_creation, + **kwargs + ): + """create a copy of an object # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.copy_object(repository, branch, dest_path, object_copy_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): destination branch for the copy + dest_path (str): destination path relative to the branch + object_copy_creation (ObjectCopyCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ObjectStats + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['dest_path'] = \ + dest_path + kwargs['object_copy_creation'] = \ + object_copy_creation + return self.copy_object_endpoint.call_with_http_info(**kwargs) + + def delete_object( + self, + repository, + branch, + path, + **kwargs + ): + """delete object. Missing objects will not return a NotFound error. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_object(repository, branch, path, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + path (str): relative to the branch + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['path'] = \ + path + return self.delete_object_endpoint.call_with_http_info(**kwargs) + + def delete_objects( + self, + repository, + branch, + path_list, + **kwargs + ): + """delete objects. Missing objects will not return a NotFound error. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_objects(repository, branch, path_list, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + path_list (PathList): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ObjectErrorList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['path_list'] = \ + path_list + return self.delete_objects_endpoint.call_with_http_info(**kwargs) + + def get_object( + self, + repository, + ref, + path, + **kwargs + ): + """get object content # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_object(repository, ref, path, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + ref (str): a reference (could be either a branch or a commit ID) + path (str): relative to the ref + + Keyword Args: + range (str): Byte range to retrieve. [optional] + presign (bool): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['ref'] = \ + ref + kwargs['path'] = \ + path + return self.get_object_endpoint.call_with_http_info(**kwargs) + + def get_underlying_properties( + self, + repository, + ref, + path, + **kwargs + ): + """get object properties on underlying storage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_underlying_properties(repository, ref, path, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + ref (str): a reference (could be either a branch or a commit ID) + path (str): relative to the branch + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UnderlyingObjectProperties + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['ref'] = \ + ref + kwargs['path'] = \ + path + return self.get_underlying_properties_endpoint.call_with_http_info(**kwargs) + + def head_object( + self, + repository, + ref, + path, + **kwargs + ): + """check if object exists # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.head_object(repository, ref, path, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + ref (str): a reference (could be either a branch or a commit ID) + path (str): relative to the ref + + Keyword Args: + range (str): Byte range to retrieve. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['ref'] = \ + ref + kwargs['path'] = \ + path + return self.head_object_endpoint.call_with_http_info(**kwargs) + + def list_objects( + self, + repository, + ref, + **kwargs + ): + """list objects under a given prefix # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_objects(repository, ref, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + ref (str): a reference (could be either a branch or a commit ID) + + Keyword Args: + user_metadata (bool): [optional] if omitted the server will use the default value of True + presign (bool): [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + delimiter (str): delimiter used to group common prefixes by. [optional] + prefix (str): return items prefixed with this value. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ObjectStatsList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['ref'] = \ + ref + return self.list_objects_endpoint.call_with_http_info(**kwargs) + + def stage_object( + self, + repository, + branch, + path, + object_stage_creation, + **kwargs + ): + """stage an object's metadata for the given branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.stage_object(repository, branch, path, object_stage_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + path (str): relative to the branch + object_stage_creation (ObjectStageCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ObjectStats + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['path'] = \ + path + kwargs['object_stage_creation'] = \ + object_stage_creation + return self.stage_object_endpoint.call_with_http_info(**kwargs) + + def stat_object( + self, + repository, + ref, + path, + **kwargs + ): + """get object metadata # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.stat_object(repository, ref, path, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + ref (str): a reference (could be either a branch or a commit ID) + path (str): relative to the branch + + Keyword Args: + user_metadata (bool): [optional] if omitted the server will use the default value of True + presign (bool): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ObjectStats + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['ref'] = \ + ref + kwargs['path'] = \ + path + return self.stat_object_endpoint.call_with_http_info(**kwargs) + + def upload_object( + self, + repository, + branch, + path, + **kwargs + ): + """upload_object # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.upload_object(repository, branch, path, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + path (str): relative to the branch + + Keyword Args: + storage_class (str): [optional] + if_none_match (str): Currently supports only \"*\" to allow uploading an object only if one doesn't exist yet. [optional] + content (file_type): Only a single file per upload which must be named \\\"content\\\".. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ObjectStats + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['path'] = \ + path + return self.upload_object_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/otf_diff_api.py b/clients/python/lakefs_client/api/otf_diff_api.py new file mode 100644 index 00000000000..c872ff68c73 --- /dev/null +++ b/clients/python/lakefs_client/api/otf_diff_api.py @@ -0,0 +1,200 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.otf_diff_list import OtfDiffList + + +class OtfDiffApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.otf_diff_endpoint = _Endpoint( + settings={ + 'response_type': (OtfDiffList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref}', + 'operation_id': 'otf_diff', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'left_ref', + 'right_ref', + 'table_path', + 'type', + ], + 'required': [ + 'repository', + 'left_ref', + 'right_ref', + 'table_path', + 'type', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'left_ref': + (str,), + 'right_ref': + (str,), + 'table_path': + (str,), + 'type': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'left_ref': 'left_ref', + 'right_ref': 'right_ref', + 'table_path': 'table_path', + 'type': 'type', + }, + 'location_map': { + 'repository': 'path', + 'left_ref': 'path', + 'right_ref': 'path', + 'table_path': 'query', + 'type': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def otf_diff( + self, + repository, + left_ref, + right_ref, + table_path, + type, + **kwargs + ): + """perform otf diff # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.otf_diff(repository, left_ref, right_ref, table_path, type, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + left_ref (str): + right_ref (str): + table_path (str): a path to the table location under the specified ref. + type (str): the type of otf + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + OtfDiffList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['left_ref'] = \ + left_ref + kwargs['right_ref'] = \ + right_ref + kwargs['table_path'] = \ + table_path + kwargs['type'] = \ + type + return self.otf_diff_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/refs_api.py b/clients/python/lakefs_client/api/refs_api.py new file mode 100644 index 00000000000..692ab9c4818 --- /dev/null +++ b/clients/python/lakefs_client/api/refs_api.py @@ -0,0 +1,933 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.commit_list import CommitList +from lakefs_client.model.diff_list import DiffList +from lakefs_client.model.error import Error +from lakefs_client.model.find_merge_base_result import FindMergeBaseResult +from lakefs_client.model.merge import Merge +from lakefs_client.model.merge_result import MergeResult +from lakefs_client.model.refs_dump import RefsDump + + +class RefsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.diff_refs_endpoint = _Endpoint( + settings={ + 'response_type': (DiffList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{leftRef}/diff/{rightRef}', + 'operation_id': 'diff_refs', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'left_ref', + 'right_ref', + 'after', + 'amount', + 'prefix', + 'delimiter', + 'type', + ], + 'required': [ + 'repository', + 'left_ref', + 'right_ref', + ], + 'nullable': [ + ], + 'enum': [ + 'type', + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + ('type',): { + + "TWO_DOT": "two_dot", + "THREE_DOT": "three_dot" + }, + }, + 'openapi_types': { + 'repository': + (str,), + 'left_ref': + (str,), + 'right_ref': + (str,), + 'after': + (str,), + 'amount': + (int,), + 'prefix': + (str,), + 'delimiter': + (str,), + 'type': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'left_ref': 'leftRef', + 'right_ref': 'rightRef', + 'after': 'after', + 'amount': 'amount', + 'prefix': 'prefix', + 'delimiter': 'delimiter', + 'type': 'type', + }, + 'location_map': { + 'repository': 'path', + 'left_ref': 'path', + 'right_ref': 'path', + 'after': 'query', + 'amount': 'query', + 'prefix': 'query', + 'delimiter': 'query', + 'type': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.dump_refs_endpoint = _Endpoint( + settings={ + 'response_type': (RefsDump,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/dump', + 'operation_id': 'dump_refs', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.find_merge_base_endpoint = _Endpoint( + settings={ + 'response_type': (FindMergeBaseResult,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}', + 'operation_id': 'find_merge_base', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'source_ref', + 'destination_branch', + ], + 'required': [ + 'repository', + 'source_ref', + 'destination_branch', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'source_ref': + (str,), + 'destination_branch': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'source_ref': 'sourceRef', + 'destination_branch': 'destinationBranch', + }, + 'location_map': { + 'repository': 'path', + 'source_ref': 'path', + 'destination_branch': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.log_commits_endpoint = _Endpoint( + settings={ + 'response_type': (CommitList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{ref}/commits', + 'operation_id': 'log_commits', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'ref', + 'after', + 'amount', + 'objects', + 'prefixes', + 'limit', + ], + 'required': [ + 'repository', + 'ref', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'ref': + (str,), + 'after': + (str,), + 'amount': + (int,), + 'objects': + ([str],), + 'prefixes': + ([str],), + 'limit': + (bool,), + }, + 'attribute_map': { + 'repository': 'repository', + 'ref': 'ref', + 'after': 'after', + 'amount': 'amount', + 'objects': 'objects', + 'prefixes': 'prefixes', + 'limit': 'limit', + }, + 'location_map': { + 'repository': 'path', + 'ref': 'path', + 'after': 'query', + 'amount': 'query', + 'objects': 'query', + 'prefixes': 'query', + 'limit': 'query', + }, + 'collection_format_map': { + 'objects': 'multi', + 'prefixes': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.merge_into_branch_endpoint = _Endpoint( + settings={ + 'response_type': (MergeResult,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}', + 'operation_id': 'merge_into_branch', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'source_ref', + 'destination_branch', + 'merge', + ], + 'required': [ + 'repository', + 'source_ref', + 'destination_branch', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'source_ref': + (str,), + 'destination_branch': + (str,), + 'merge': + (Merge,), + }, + 'attribute_map': { + 'repository': 'repository', + 'source_ref': 'sourceRef', + 'destination_branch': 'destinationBranch', + }, + 'location_map': { + 'repository': 'path', + 'source_ref': 'path', + 'destination_branch': 'path', + 'merge': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.restore_refs_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/refs/restore', + 'operation_id': 'restore_refs', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'refs_dump', + ], + 'required': [ + 'repository', + 'refs_dump', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'refs_dump': + (RefsDump,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'refs_dump': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def diff_refs( + self, + repository, + left_ref, + right_ref, + **kwargs + ): + """diff references # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.diff_refs(repository, left_ref, right_ref, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + left_ref (str): a reference (could be either a branch or a commit ID) + right_ref (str): a reference (could be either a branch or a commit ID) to compare against + + Keyword Args: + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + prefix (str): return items prefixed with this value. [optional] + delimiter (str): delimiter used to group common prefixes by. [optional] + type (str): [optional] if omitted the server will use the default value of "three_dot" + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DiffList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['left_ref'] = \ + left_ref + kwargs['right_ref'] = \ + right_ref + return self.diff_refs_endpoint.call_with_http_info(**kwargs) + + def dump_refs( + self, + repository, + **kwargs + ): + """Dump repository refs (tags, commits, branches) to object store # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.dump_refs(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RefsDump + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.dump_refs_endpoint.call_with_http_info(**kwargs) + + def find_merge_base( + self, + repository, + source_ref, + destination_branch, + **kwargs + ): + """find the merge base for 2 references # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.find_merge_base(repository, source_ref, destination_branch, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + source_ref (str): source ref + destination_branch (str): destination branch name + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + FindMergeBaseResult + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['source_ref'] = \ + source_ref + kwargs['destination_branch'] = \ + destination_branch + return self.find_merge_base_endpoint.call_with_http_info(**kwargs) + + def log_commits( + self, + repository, + ref, + **kwargs + ): + """get commit log from ref. If both objects and prefixes are empty, return all commits. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.log_commits(repository, ref, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + ref (str): + + Keyword Args: + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + objects ([str]): list of paths, each element is a path of a specific object. [optional] + prefixes ([str]): list of paths, each element is a path of a prefix. [optional] + limit (bool): limit the number of items in return to 'amount'. Without further indication on actual number of items.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CommitList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['ref'] = \ + ref + return self.log_commits_endpoint.call_with_http_info(**kwargs) + + def merge_into_branch( + self, + repository, + source_ref, + destination_branch, + **kwargs + ): + """merge references # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.merge_into_branch(repository, source_ref, destination_branch, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + source_ref (str): source ref + destination_branch (str): destination branch name + + Keyword Args: + merge (Merge): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + MergeResult + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['source_ref'] = \ + source_ref + kwargs['destination_branch'] = \ + destination_branch + return self.merge_into_branch_endpoint.call_with_http_info(**kwargs) + + def restore_refs( + self, + repository, + refs_dump, + **kwargs + ): + """Restore repository refs (tags, commits, branches) from object store # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.restore_refs(repository, refs_dump, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + refs_dump (RefsDump): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['refs_dump'] = \ + refs_dump + return self.restore_refs_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/repositories_api.py b/clients/python/lakefs_client/api/repositories_api.py new file mode 100644 index 00000000000..a558e857fae --- /dev/null +++ b/clients/python/lakefs_client/api/repositories_api.py @@ -0,0 +1,925 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.branch_protection_rule import BranchProtectionRule +from lakefs_client.model.error import Error +from lakefs_client.model.inline_object1 import InlineObject1 +from lakefs_client.model.repository import Repository +from lakefs_client.model.repository_creation import RepositoryCreation +from lakefs_client.model.repository_list import RepositoryList + + +class RepositoriesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_branch_protection_rule_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branch_protection', + 'operation_id': 'create_branch_protection_rule', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch_protection_rule', + ], + 'required': [ + 'repository', + 'branch_protection_rule', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch_protection_rule': + (BranchProtectionRule,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'branch_protection_rule': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_repository_endpoint = _Endpoint( + settings={ + 'response_type': (Repository,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories', + 'operation_id': 'create_repository', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository_creation', + 'bare', + ], + 'required': [ + 'repository_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository_creation': + (RepositoryCreation,), + 'bare': + (bool,), + }, + 'attribute_map': { + 'bare': 'bare', + }, + 'location_map': { + 'repository_creation': 'body', + 'bare': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_branch_protection_rule_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branch_protection', + 'operation_id': 'delete_branch_protection_rule', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'inline_object1', + ], + 'required': [ + 'repository', + 'inline_object1', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'inline_object1': + (InlineObject1,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'inline_object1': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_repository_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}', + 'operation_id': 'delete_repository', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_branch_protection_rules_endpoint = _Endpoint( + settings={ + 'response_type': ([BranchProtectionRule],), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branch_protection', + 'operation_id': 'get_branch_protection_rules', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_repository_endpoint = _Endpoint( + settings={ + 'response_type': (Repository,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}', + 'operation_id': 'get_repository', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_repositories_endpoint = _Endpoint( + settings={ + 'response_type': (RepositoryList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories', + 'operation_id': 'list_repositories', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'prefix', + 'after', + 'amount', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def create_branch_protection_rule( + self, + repository, + branch_protection_rule, + **kwargs + ): + """create_branch_protection_rule # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_branch_protection_rule(repository, branch_protection_rule, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch_protection_rule (BranchProtectionRule): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch_protection_rule'] = \ + branch_protection_rule + return self.create_branch_protection_rule_endpoint.call_with_http_info(**kwargs) + + def create_repository( + self, + repository_creation, + **kwargs + ): + """create repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_repository(repository_creation, async_req=True) + >>> result = thread.get() + + Args: + repository_creation (RepositoryCreation): + + Keyword Args: + bare (bool): If true, create a bare repository with no initial commit and branch. [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Repository + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository_creation'] = \ + repository_creation + return self.create_repository_endpoint.call_with_http_info(**kwargs) + + def delete_branch_protection_rule( + self, + repository, + inline_object1, + **kwargs + ): + """delete_branch_protection_rule # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_branch_protection_rule(repository, inline_object1, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + inline_object1 (InlineObject1): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['inline_object1'] = \ + inline_object1 + return self.delete_branch_protection_rule_endpoint.call_with_http_info(**kwargs) + + def delete_repository( + self, + repository, + **kwargs + ): + """delete repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_repository(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.delete_repository_endpoint.call_with_http_info(**kwargs) + + def get_branch_protection_rules( + self, + repository, + **kwargs + ): + """get branch protection rules # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_branch_protection_rules(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + [BranchProtectionRule] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.get_branch_protection_rules_endpoint.call_with_http_info(**kwargs) + + def get_repository( + self, + repository, + **kwargs + ): + """get repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_repository(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Repository + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.get_repository_endpoint.call_with_http_info(**kwargs) + + def list_repositories( + self, + **kwargs + ): + """list repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_repositories(async_req=True) + >>> result = thread.get() + + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RepositoryList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.list_repositories_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/retention_api.py b/clients/python/lakefs_client/api/retention_api.py new file mode 100644 index 00000000000..71015c79c61 --- /dev/null +++ b/clients/python/lakefs_client/api/retention_api.py @@ -0,0 +1,669 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.garbage_collection_prepare_request import GarbageCollectionPrepareRequest +from lakefs_client.model.garbage_collection_prepare_response import GarbageCollectionPrepareResponse +from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules +from lakefs_client.model.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest +from lakefs_client.model.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse + + +class RetentionApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.delete_garbage_collection_rules_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/gc/rules', + 'operation_id': 'delete_garbage_collection_rules', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_garbage_collection_rules_endpoint = _Endpoint( + settings={ + 'response_type': (GarbageCollectionRules,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/gc/rules', + 'operation_id': 'get_garbage_collection_rules', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.prepare_garbage_collection_commits_endpoint = _Endpoint( + settings={ + 'response_type': (GarbageCollectionPrepareResponse,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/gc/prepare_commits', + 'operation_id': 'prepare_garbage_collection_commits', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'garbage_collection_prepare_request', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'garbage_collection_prepare_request': + (GarbageCollectionPrepareRequest,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'garbage_collection_prepare_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.prepare_garbage_collection_uncommitted_endpoint = _Endpoint( + settings={ + 'response_type': (PrepareGCUncommittedResponse,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/gc/prepare_uncommited', + 'operation_id': 'prepare_garbage_collection_uncommitted', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'prepare_gc_uncommitted_request', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'prepare_gc_uncommitted_request': + (PrepareGCUncommittedRequest,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'prepare_gc_uncommitted_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.set_garbage_collection_rules_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/gc/rules', + 'operation_id': 'set_garbage_collection_rules', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'garbage_collection_rules', + ], + 'required': [ + 'repository', + 'garbage_collection_rules', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'garbage_collection_rules': + (GarbageCollectionRules,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'garbage_collection_rules': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def delete_garbage_collection_rules( + self, + repository, + **kwargs + ): + """delete_garbage_collection_rules # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_garbage_collection_rules(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.delete_garbage_collection_rules_endpoint.call_with_http_info(**kwargs) + + def get_garbage_collection_rules( + self, + repository, + **kwargs + ): + """get_garbage_collection_rules # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_garbage_collection_rules(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GarbageCollectionRules + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.get_garbage_collection_rules_endpoint.call_with_http_info(**kwargs) + + def prepare_garbage_collection_commits( + self, + repository, + **kwargs + ): + """save lists of active and expired commits for garbage collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.prepare_garbage_collection_commits(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + garbage_collection_prepare_request (GarbageCollectionPrepareRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GarbageCollectionPrepareResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.prepare_garbage_collection_commits_endpoint.call_with_http_info(**kwargs) + + def prepare_garbage_collection_uncommitted( + self, + repository, + **kwargs + ): + """save repository uncommitted metadata for garbage collection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.prepare_garbage_collection_uncommitted(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + prepare_gc_uncommitted_request (PrepareGCUncommittedRequest): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + PrepareGCUncommittedResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.prepare_garbage_collection_uncommitted_endpoint.call_with_http_info(**kwargs) + + def set_garbage_collection_rules( + self, + repository, + garbage_collection_rules, + **kwargs + ): + """set_garbage_collection_rules # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_garbage_collection_rules(repository, garbage_collection_rules, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + garbage_collection_rules (GarbageCollectionRules): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['garbage_collection_rules'] = \ + garbage_collection_rules + return self.set_garbage_collection_rules_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/staging_api.py b/clients/python/lakefs_client/api/staging_api.py new file mode 100644 index 00000000000..7f2cf181aff --- /dev/null +++ b/clients/python/lakefs_client/api/staging_api.py @@ -0,0 +1,340 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.object_stats import ObjectStats +from lakefs_client.model.staging_location import StagingLocation +from lakefs_client.model.staging_metadata import StagingMetadata + + +class StagingApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.get_physical_address_endpoint = _Endpoint( + settings={ + 'response_type': (StagingLocation,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/staging/backing', + 'operation_id': 'get_physical_address', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'path', + 'presign', + ], + 'required': [ + 'repository', + 'branch', + 'path', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'path': + (str,), + 'presign': + (bool,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'path': 'path', + 'presign': 'presign', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'path': 'query', + 'presign': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.link_physical_address_endpoint = _Endpoint( + settings={ + 'response_type': (ObjectStats,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/staging/backing', + 'operation_id': 'link_physical_address', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'branch', + 'path', + 'staging_metadata', + ], + 'required': [ + 'repository', + 'branch', + 'path', + 'staging_metadata', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'branch': + (str,), + 'path': + (str,), + 'staging_metadata': + (StagingMetadata,), + }, + 'attribute_map': { + 'repository': 'repository', + 'branch': 'branch', + 'path': 'path', + }, + 'location_map': { + 'repository': 'path', + 'branch': 'path', + 'path': 'query', + 'staging_metadata': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def get_physical_address( + self, + repository, + branch, + path, + **kwargs + ): + """get a physical address and a return token to write object to underlying storage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_physical_address(repository, branch, path, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + path (str): relative to the branch + + Keyword Args: + presign (bool): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + StagingLocation + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['path'] = \ + path + return self.get_physical_address_endpoint.call_with_http_info(**kwargs) + + def link_physical_address( + self, + repository, + branch, + path, + staging_metadata, + **kwargs + ): + """associate staging on this physical address with a path # noqa: E501 + + If the supplied token matches the current staging token, associate the object as the physical address with the supplied path. Otherwise, if staging has been committed and the token has expired, return a conflict and hint where to place the object to try again. Caller should copy the object to the new physical address and PUT again with the new staging token. (No need to back off, this is due to losing the race against a concurrent commit operation.) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.link_physical_address(repository, branch, path, staging_metadata, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + branch (str): + path (str): relative to the branch + staging_metadata (StagingMetadata): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ObjectStats + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['branch'] = \ + branch + kwargs['path'] = \ + path + kwargs['staging_metadata'] = \ + staging_metadata + return self.link_physical_address_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/statistics_api.py b/clients/python/lakefs_client/api/statistics_api.py new file mode 100644 index 00000000000..37cf3faf448 --- /dev/null +++ b/clients/python/lakefs_client/api/statistics_api.py @@ -0,0 +1,161 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.stats_events_list import StatsEventsList + + +class StatisticsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.post_stats_events_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/statistics', + 'operation_id': 'post_stats_events', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'stats_events_list', + ], + 'required': [ + 'stats_events_list', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'stats_events_list': + (StatsEventsList,), + }, + 'attribute_map': { + }, + 'location_map': { + 'stats_events_list': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def post_stats_events( + self, + stats_events_list, + **kwargs + ): + """post stats events, this endpoint is meant for internal use only # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.post_stats_events(stats_events_list, async_req=True) + >>> result = thread.get() + + Args: + stats_events_list (StatsEventsList): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['stats_events_list'] = \ + stats_events_list + return self.post_stats_events_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/tags_api.py b/clients/python/lakefs_client/api/tags_api.py new file mode 100644 index 00000000000..ade24d2617a --- /dev/null +++ b/clients/python/lakefs_client/api/tags_api.py @@ -0,0 +1,577 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error +from lakefs_client.model.ref import Ref +from lakefs_client.model.ref_list import RefList +from lakefs_client.model.tag_creation import TagCreation + + +class TagsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_tag_endpoint = _Endpoint( + settings={ + 'response_type': (Ref,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/tags', + 'operation_id': 'create_tag', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'tag_creation', + ], + 'required': [ + 'repository', + 'tag_creation', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'tag_creation': + (TagCreation,), + }, + 'attribute_map': { + 'repository': 'repository', + }, + 'location_map': { + 'repository': 'path', + 'tag_creation': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_tag_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/tags/{tag}', + 'operation_id': 'delete_tag', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'tag', + ], + 'required': [ + 'repository', + 'tag', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'tag': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'tag': 'tag', + }, + 'location_map': { + 'repository': 'path', + 'tag': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_tag_endpoint = _Endpoint( + settings={ + 'response_type': (Ref,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/tags/{tag}', + 'operation_id': 'get_tag', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'tag', + ], + 'required': [ + 'repository', + 'tag', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'tag': + (str,), + }, + 'attribute_map': { + 'repository': 'repository', + 'tag': 'tag', + }, + 'location_map': { + 'repository': 'path', + 'tag': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_tags_endpoint = _Endpoint( + settings={ + 'response_type': (RefList,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/tags', + 'operation_id': 'list_tags', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'repository', + 'prefix', + 'after', + 'amount', + ], + 'required': [ + 'repository', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'amount', + ] + }, + root_map={ + 'validations': { + ('amount',): { + + 'inclusive_maximum': 1000, + 'inclusive_minimum': -1, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'repository': + (str,), + 'prefix': + (str,), + 'after': + (str,), + 'amount': + (int,), + }, + 'attribute_map': { + 'repository': 'repository', + 'prefix': 'prefix', + 'after': 'after', + 'amount': 'amount', + }, + 'location_map': { + 'repository': 'path', + 'prefix': 'query', + 'after': 'query', + 'amount': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def create_tag( + self, + repository, + tag_creation, + **kwargs + ): + """create tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_tag(repository, tag_creation, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + tag_creation (TagCreation): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Ref + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['tag_creation'] = \ + tag_creation + return self.create_tag_endpoint.call_with_http_info(**kwargs) + + def delete_tag( + self, + repository, + tag, + **kwargs + ): + """delete tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_tag(repository, tag, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + tag (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['tag'] = \ + tag + return self.delete_tag_endpoint.call_with_http_info(**kwargs) + + def get_tag( + self, + repository, + tag, + **kwargs + ): + """get tag # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_tag(repository, tag, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + tag (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + Ref + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + kwargs['tag'] = \ + tag + return self.get_tag_endpoint.call_with_http_info(**kwargs) + + def list_tags( + self, + repository, + **kwargs + ): + """list tags # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_tags(repository, async_req=True) + >>> result = thread.get() + + Args: + repository (str): + + Keyword Args: + prefix (str): return items prefixed with this value. [optional] + after (str): return items after this value. [optional] + amount (int): how many items to return. [optional] if omitted the server will use the default value of 100 + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + RefList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['repository'] = \ + repository + return self.list_tags_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api/templates_api.py b/clients/python/lakefs_client/api/templates_api.py new file mode 100644 index 00000000000..e951c85ddbc --- /dev/null +++ b/clients/python/lakefs_client/api/templates_api.py @@ -0,0 +1,167 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint +from lakefs_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from lakefs_client.model.error import Error + + +class TemplatesApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.expand_template_endpoint = _Endpoint( + settings={ + 'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/templates/{template_location}', + 'operation_id': 'expand_template', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'template_location', + 'params', + ], + 'required': [ + 'template_location', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'template_location': + (str,), + 'params': + ({str: (str,)},), + }, + 'attribute_map': { + 'template_location': 'template_location', + 'params': 'params', + }, + 'location_map': { + 'template_location': 'path', + 'params': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*', + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + + def expand_template( + self, + template_location, + **kwargs + ): + """expand_template # noqa: E501 + + fetch and expand template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.expand_template(template_location, async_req=True) + >>> result = thread.get() + + Args: + template_location (str): URL of the template; must be relative (to a URL configured on the server). + + Keyword Args: + params ({str: (str,)}): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + bool, date, datetime, dict, float, int, list, str, none_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['template_location'] = \ + template_location + return self.expand_template_endpoint.call_with_http_info(**kwargs) + diff --git a/clients/python/lakefs_client/api_client.py b/clients/python/lakefs_client/api_client.py index d442aaaa0a2..e8c58c55299 100644 --- a/clients/python/lakefs_client/api_client.py +++ b/clients/python/lakefs_client/api_client.py @@ -1,4 +1,3 @@ -# coding: utf-8 """ lakeFS API @@ -9,959 +8,39 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -from decimal import Decimal -import enum -import email + import json -import os -import io import atexit +import mimetypes from multiprocessing.pool import ThreadPool +import io +import os import re -import tempfile import typing -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict -from urllib.parse import urlparse, quote -from urllib3.fields import RequestField as RequestFieldBase +from urllib.parse import quote +from urllib3.fields import RequestField -import frozendict from lakefs_client import rest from lakefs_client.configuration import Configuration -from lakefs_client.exceptions import ApiTypeError, ApiValueError -from lakefs_client.schemas import ( - NoneClass, - BoolClass, - Schema, - FileIO, - BinarySchema, +from lakefs_client.exceptions import ApiTypeError, ApiValueError, ApiException +from lakefs_client.model_utils import ( + ModelNormal, + ModelSimple, + ModelComposed, + check_allowed_values, + check_validations, date, datetime, + deserialize_file, + file_type, + model_to_dict, none_type, - Unset, - unset, + validate_and_convert_types ) -class RequestField(RequestFieldBase): - def __eq__(self, other): - if not isinstance(other, RequestField): - return False - return self.__dict__ == other.__dict__ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return float(obj) - elif isinstance(obj, int): - return int(obj) - elif isinstance(obj, Decimal): - if obj.as_tuple().exponent >= 0: - return int(obj) - return float(obj) - elif isinstance(obj, NoneClass): - return None - elif isinstance(obj, BoolClass): - return bool(obj) - elif isinstance(obj, (dict, frozendict.frozendict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - - def __init__(self, prefix: str, separator: str): - self.prefix = prefix - self.separator = separator - self.first = True - if separator in {'.', '|', '%20'}: - item_separator = separator - else: - item_separator = ',' - self.item_separator = item_separator - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - return False - - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return quote(str(in_data)) - return str(in_data) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - if style is ParameterStyle.FORM: - return True - return super()._get_default_explode(style) - - def _serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - def _serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -@dataclass -class ParameterBase(JSONDetector): - name: str - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] - - __style_to_in_type = { - ParameterStyle.MATRIX: {ParameterInType.PATH}, - ParameterStyle.LABEL: {ParameterInType.PATH}, - ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, - ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, - ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, - } - __in_type_to_default_style = { - ParameterInType.QUERY: ParameterStyle.FORM, - ParameterInType.PATH: ParameterStyle.SIMPLE, - ParameterInType.HEADER: ParameterStyle.SIMPLE, - ParameterInType.COOKIE: ParameterStyle.FORM, - } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} - _json_encoder = JSONEncoder() - - @classmethod - def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): - if style is None: - return - in_type_set = cls.__style_to_in_type[style] - if in_type not in in_type_set: - raise ValueError( - 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( - style, in_type_set - ) - ) - - def __init__( - self, - name: str, - in_type: ParameterInType, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - if schema is None and content is None: - raise ValueError('Value missing; Pass in either schema or content') - if schema and content: - raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) - self.__verify_style_to_in_type(style, in_type) - if content is None and style is None: - style = self.__in_type_to_default_style[in_type] - if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: - raise ValueError('Invalid content length, content length must equal 1') - self.in_type = in_type - self.name = name - self.required = required - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - self.schema = schema - self.content = content - - def _serialize_json( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=self._json_encoder.compact_separators) - return json.dumps(in_data) - - -class PathParameter(ParameterBase, StyleSimpleSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.PATH, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_label( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_matrix( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = self._serialize_simple( - in_data=in_data, - name=self.name, - explode=self.explode, - percent_encode=True - ) - return self._to_dict(self.name, value) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if self.style: - if self.style is ParameterStyle.SIMPLE: - return self.__serialize_simple(cast_in_data) - elif self.style is ParameterStyle.LABEL: - return self.__serialize_label(cast_in_data) - elif self.style is ParameterStyle.MATRIX: - return self.__serialize_matrix(cast_in_data) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class QueryParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.QUERY, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_space_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_pipe_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._serialize_form( - in_data, - name=self.name, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if self.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif self.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif self.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if self.style: - # TODO update query ones to omit setting values when [] {} or None is input - if self.style is ParameterStyle.FORM: - return self.__serialize_form(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.SPACE_DELIMITED: - return self.__serialize_space_delimited(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.PIPE_DELIMITED: - return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) - # self.content will be length one - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data, eliminate_whitespace=True) - return self._to_dict( - self.name, - next(prefix_separator_iterator) + self.name + '=' + quote(value) - ) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class CookieParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.COOKIE, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if self.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - value = self._serialize_form( - cast_in_data, - explode=self.explode, - name=self.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return self._to_dict(self.name, value) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class HeaderParameter(ParameterBase, StyleSimpleSerializer): - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.HEADER, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> HTTPHeaderDict: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class Encoding: - def __init__( - self, - content_type: str, - headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: bool = False, - ): - self.content_type = content_type - self.headers = headers - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - - -@dataclass -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -@dataclass -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[Unset, Schema] = unset - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - - def __init__( - self, - response: urllib3.HTTPResponse, - body: typing.Union[Unset, Schema] = unset, - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - ): - """ - pycharm needs this to prevent 'Unexpected argument' warnings - """ - self.response = response - self.body = body - self.headers = headers - - -@dataclass -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - - -class OpenApiResponse(JSONDetector): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - - def __init__( - self, - response_cls: typing.Type[ApiResponse] = ApiResponse, - content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, - ): - self.headers = headers - if content is not None and len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - self.response_cls = response_cls - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - def __deserialize_application_octet_stream( - self, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - self.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or self.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as new_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - new_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: - content_type = response.getheader('content-type') - deserialized_body = unset - streamed = response.supports_chunked_reads() - - deserialized_headers = unset - if self.headers is not None: - # TODO add header deserialiation here - pass - - if self.content is not None: - if content_type not in self.content: - raise ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(self.content))} are defined for status_code={str(response.status)}" - ) - body_schema = self.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return self.response_cls( - response=response, - headers=deserialized_headers, - body=unset - ) - - if self._content_type_is_json(content_type): - body_data = self.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = self.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = self.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_oapg( - body_data, _configuration=configuration) - elif streamed: - response.release_conn() - - return self.response_cls( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -class ApiClient: +class ApiClient(object): """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -985,21 +64,15 @@ class ApiClient: _pool = None - def __init__( - self, - configuration: typing.Optional[Configuration] = None, - header_name: typing.Optional[str] = None, - header_value: typing.Optional[str] = None, - cookie: typing.Optional[str] = None, - pool_threads: int = 1 - ): + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): if configuration is None: - configuration = Configuration() + configuration = Configuration.get_default_copy() self.configuration = configuration self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = HTTPHeaderDict() + self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie @@ -1046,86 +119,285 @@ def __call_api( self, resource_path: str, method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, auth_settings: typing.Optional[typing.List[str]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None + ): + + config = self.configuration # header parameters - used_headers = HTTPHeaderDict(self.default_headers) + header_params = header_params or {} + header_params.update(self.default_headers) if self.cookie: - headers['Cookie'] = self.cookie + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + if header_params['Content-Type'].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, + (dict) ) + + # body + if body: + body = self.sanitize_for_serialization(body) # auth setting - self.update_params_for_auth(used_headers, + self.update_params_for_auth(header_params, query_params, auth_settings, resource_path, method, body) - # must happen after cookie setting and auth setting in case user is overriding those - if headers: - used_headers.update(headers) - # request url - if host is None: + if _host is None: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead - url = host + resource_path - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, + url = _host + resource_path + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return (return_data) + return return_data + + # deserialize response data + if response_type: + if response_type != (file_type,): + encoding = "utf-8" + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + if match: + encoding = match.group(1) + response_data.data = response_data.data.decode(encoding) + + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def parameters_to_multipart(self, params, collection_types): + """Get parameters as list of tuples, formatting as json if value is collection_types + + :param params: Parameters as list of two-tuples + :param dict collection_types: Parameter collection types + :return: Parameters as list of tuple or urllib3.fields.RequestField + """ + new_params = [] + if collection_types is None: + collection_types = (dict) + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) + else: + new_params.append((k, v)) + return new_params + + @classmethod + def sanitize_for_serialization(cls, obj): + """Prepares data for transmission before it is sent with the rest client + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + If obj is io.IOBase, return the bytes + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if isinstance(obj, (ModelNormal, ModelComposed)): + return { + key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() + } + elif isinstance(obj, io.IOBase): + return cls.get_file_data_and_close_file(obj) + elif isinstance(obj, (str, int, float, none_type, bool)): + return obj + elif isinstance(obj, (datetime, date)): + return obj.isoformat() + elif isinstance(obj, ModelSimple): + return cls.sanitize_for_serialization(obj.value) + elif isinstance(obj, (list, tuple)): + return [cls.sanitize_for_serialization(item) for item in obj] + if isinstance(obj, dict): + return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + def deserialize(self, response, response_type, _check_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server + :type _check_type: bool + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) + + # fetch data from response object + try: + received_data = json.loads(response.data) + except ValueError: + received_data = response.data + + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration ) - return response + return deserialized_data def call_api( self, resource_path: str, method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, auth_settings: typing.Optional[typing.List[str]] = None, async_req: typing.Optional[bool] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None + ): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. - :param headers: Header parameters to be + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be placed in the request header. :param body: Request body. - :param fields: Request post form parameters, + :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings: Auth Settings names for the request. - :param async_req: execute request asynchronously - :type async_req: bool, optional TODO remove, unused - :param stream: if True, the urllib3.HTTPResponse object will + :param auth_settings list: Auth Settings names for the request. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files: key -> field name, value -> a list of open file + objects for `multipart/form-data`. + :type files: dict + :param async_req bool: execute request asynchronously + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :type collection_formats: dict, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystme file and the BinarySchema - instance will also inherit from FileSchema and FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :param host: api endpoint host + :param _check_type: boolean describing if the data back from the server + should have its type checked. + :type _check_type: bool, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -1133,90 +405,82 @@ def call_api( If parameter async_req is False or missing, then the method will return the response directly. """ - if not async_req: - return self.__call_api( - resource_path, - method, - headers, - body, - fields, - auth_settings, - stream, - timeout, - host, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - headers, - body, - json, - fields, - auth_settings, - stream, - timeout, - host, - ) - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _check_type) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _check_type)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, - stream=stream, - timeout=timeout, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": return self.rest_client.HEAD(url, - stream=stream, - timeout=timeout, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": return self.rest_client.OPTIONS(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "POST": return self.rest_client.POST(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "PUT": return self.rest_client.PUT(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "PATCH": return self.rest_client.PATCH(url, + query_params=query_params, headers=headers, - fields=fields, - stream=stream, - timeout=timeout, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) elif method == "DELETE": return self.rest_client.DELETE(url, + query_params=query_params, headers=headers, - stream=stream, - timeout=timeout, + _preload_content=_preload_content, + _request_timeout=_request_timeout, body=body) else: raise ApiValueError( @@ -1224,11 +488,113 @@ def request( " `POST`, `PATCH`, `PUT` or `DELETE`." ) - def update_params_for_auth(self, headers, auth_settings, + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + @staticmethod + def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: + file_data = file_instance.read() + file_instance.close() + return file_data + + def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None): + """Builds form parameters. + + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data + """ + if files is None: + return [] + + params = [] + for param_name, file_instances in files.items(): + if file_instances is None: + # if the file field is nullable, skip None values + continue + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values + continue + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = self.get_file_data_and_close_file(file_instance) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, queries, auth_settings, resource_path, method, body): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. :param resource_path: A string representation of the HTTP request resource path. :param method: A string representation of the HTTP request method. @@ -1240,261 +606,246 @@ def update_params_for_auth(self, headers, auth_settings, for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) - if not auth_setting: - continue - if auth_setting['in'] == 'cookie': - headers.add('Cookie', auth_setting['value']) - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers.add(auth_setting['key'], auth_setting['value']) - elif auth_setting['in'] == 'query': - """ TODO implement auth in query - need to pass in prefix_separator_iterator - and need to output resource_path with query params added - """ - raise ApiValueError("Auth in query not yet implemented") - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' + if auth_setting: + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + +class Endpoint(object): + def __init__(self, settings=None, params_map=None, root_map=None, + headers_map=None, api_client=None, callable=None): + """Creates an endpoint + + Args: + settings (dict): see below key value pairs + 'response_type' (tuple/None): response type + 'auth' (list): a list of auth type keys + 'endpoint_path' (str): the endpoint path + 'operation_id' (str): endpoint string identifier + 'http_method' (str): POST/PUT/PATCH/GET etc + 'servers' (list): list of str servers that this endpoint is at + params_map (dict): see below key value pairs + 'all' (list): list of str endpoint parameter names + 'required' (list): list of required parameter names + 'nullable' (list): list of nullable parameter names + 'enum' (list): list of parameters with enum values + 'validation' (list): list of parameters with validations + root_map + 'validations' (dict): the dict mapping endpoint parameter tuple + paths to their validation dictionaries + 'allowed_values' (dict): the dict mapping endpoint parameter + tuple paths to their allowed_values (enum) dictionaries + 'openapi_types' (dict): param_name to openapi type + 'attribute_map' (dict): param_name to camelCase name + 'location_map' (dict): param_name to 'body', 'file', 'form', + 'header', 'path', 'query' + collection_format_map (dict): param_name to `csv` etc. + headers_map (dict): see below key value pairs + 'accept' (list): list of Accept header strings + 'content_type' (list): list of Content-Type header strings + api_client (ApiClient) api client instance + callable (function): the function which is invoked when the + Endpoint is called + """ + self.settings = settings + self.params_map = params_map + self.params_map['all'].extend([ + 'async_req', + '_host_index', + '_preload_content', + '_request_timeout', + '_return_http_data_only', + '_check_input_type', + '_check_return_type' + ]) + self.params_map['nullable'].extend(['_request_timeout']) + self.validations = root_map['validations'] + self.allowed_values = root_map['allowed_values'] + self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (none_type, int), + '_preload_content': (bool,), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) + self.attribute_map = root_map['attribute_map'] + self.location_map = root_map['location_map'] + self.collection_format_map = root_map['collection_format_map'] + self.headers_map = headers_map + self.api_client = api_client + self.callable = callable + + def __validate_inputs(self, kwargs): + for param in self.params_map['enum']: + if param in kwargs: + check_allowed_values( + self.allowed_values, + (param,), + kwargs[param] ) + for param in self.params_map['validation']: + if param in kwargs: + check_validations( + self.validations, + (param,), + kwargs[param], + configuration=self.api_client.configuration + ) -class Api: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech + if kwargs['_check_input_type'] is False: + return - Do not edit the class manually. - """ + for key, value in kwargs.items(): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + + def __gather_params(self, kwargs): + params = { + 'body': None, + 'collection_format': {}, + 'file': {}, + 'form': [], + 'header': {}, + 'path': {}, + 'query': [] + } - def __init__(self, api_client: typing.Optional[ApiClient] = None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client + for param_name, param_value in kwargs.items(): + param_location = self.location_map.get(param_name) + if param_location is None: + continue + if param_location: + if param_location == 'body': + params['body'] = param_value + continue + base_name = self.attribute_map[param_name] + if (param_location == 'form' and + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value + elif param_location in {'form', 'query'}: + param_value_full = (base_name, param_value) + params[param_location].append(param_value_full) + if param_location not in {'form', 'query'}: + params[param_location][base_name] = param_value + collection_format = self.collection_format_map.get(param_name) + if collection_format: + params['collection_format'][base_name] = collection_format + + return params + + def __call__(self, *args, **kwargs): + """ This method is invoked when endpoints are called + Example: + + api_instance = ActionsApi() + api_instance.get_run # this is an instance of the class Endpoint + api_instance.get_run() # this invokes api_instance.get_run.__call__() + which then invokes the callable functions stored in that endpoint at + api_instance.get_run.callable or self.callable in this class - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) + return self.callable(self, *args, **kwargs) - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) + def call_with_http_info(self, **kwargs): - def _get_host_oapg( - self, - operation_id: str, - servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), - host_index: typing.Optional[int] = None - ) -> typing.Optional[str]: - configuration = self.api_client.configuration try: - if host_index is None: - index = configuration.server_operation_index.get( - operation_id, configuration.server_index - ) - else: - index = host_index - server_variables = configuration.server_operation_variables.get( - operation_id, configuration.server_variables + index = self.api_client.configuration.server_operation_index.get( + self.settings['operation_id'], self.api_client.configuration.server_index + ) if kwargs['_host_index'] is None else kwargs['_host_index'] + server_variables = self.api_client.configuration.server_operation_variables.get( + self.settings['operation_id'], self.api_client.configuration.server_variables ) - host = configuration.get_host_from_settings( - index, variables=server_variables, servers=servers + _host = self.api_client.configuration.get_host_from_settings( + index, variables=server_variables, servers=self.settings['servers'] ) except IndexError: - if servers: + if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % - len(servers) + len(self.settings['servers']) + ) + _host = None + + for key, value in kwargs.items(): + if key not in self.params_map['all']: + raise ApiTypeError( + "Got an unexpected parameter '%s'" + " to method `%s`" % + (key, self.settings['operation_id']) + ) + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): + raise ApiValueError( + "Value may not be None for non-nullable parameter `%s`" + " when calling `%s`" % + (key, self.settings['operation_id']) ) - host = None - return host - - -class SerializedRequestBody(typing_extensions.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType Schema info - """ - __json_encoder = JSONEncoder() - - def __init__( - self, - content: typing.Dict[str, MediaType], - required: bool = False, - ): - self.required = required - if len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - - def __serialize_json( - self, - in_data: typing.Any - ) -> typing.Dict[str, bytes]: - in_data = self.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return dict(body=json_str) - - @staticmethod - def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: - if isinstance(in_data, frozendict.frozendict): - raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') - elif isinstance(in_data, tuple): - raise ValueError('Unable to serialize type tuple to text/plain') - elif isinstance(in_data, NoneClass): - raise ValueError('Unable to serialize type NoneClass to text/plain') - elif isinstance(in_data, BoolClass): - raise ValueError('Unable to serialize type BoolClass to text/plain') - return dict(body=str(in_data)) - - def __multipart_json_item(self, key: str, value: Schema) -> RequestField: - json_value = self.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - def __multipart_form_item(self, key: str, value: Schema) -> RequestField: - if isinstance(value, str): - request_field = RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') - elif isinstance(value, bytes): - request_field = RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') - elif isinstance(value, FileIO): - # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) - value.close() - else: - request_field = self.__multipart_json_item(key=key, value=value) - return request_field - - def __serialize_multipart_form_data( - self, in_data: Schema - ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: - if not isinstance(in_data, frozendict.frozendict): - raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - for key, value in in_data.items(): - if isinstance(value, tuple): - if value: - # values use explode = True, so the code makes a RequestField for each item with name=key - for item in value: - request_field = self.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = self.__multipart_json_item(key=key, value=value) - fields.append(request_field) - else: - request_field = self.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return dict(fields=tuple(fields)) - - def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: - if isinstance(in_data, bytes): - return dict(body=in_data) - # FileIO type - result = dict(body=in_data.read()) - in_data.close() - return result - - def __serialize_application_x_www_form_data( - self, in_data: typing.Any - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - if not isinstance(in_data, frozendict.frozendict): - raise ValueError( - f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') - cast_in_data = self.__json_encoder.default(in_data) - value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return dict(body=value) - - def serialize( - self, in_data: typing.Any, content_type: str - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of + for key in self.params_map['required']: + if key not in kwargs.keys(): + raise ApiValueError( + "Missing the required parameter `%s` when calling " + "`%s`" % (key, self.settings['operation_id']) + ) - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = self.content[content_type] - if isinstance(in_data, media_type.schema): - cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = media_type.schema(**in_data) - else: - cast_in_data = media_type.schema(in_data) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if self._content_type_is_json(content_type): - return self.__serialize_json(cast_in_data) - elif content_type == 'text/plain': - return self.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - return self.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - return self.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - return self.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file + self.__validate_inputs(kwargs) + + params = self.__gather_params(kwargs) + + accept_headers_list = self.headers_map['accept'] + if accept_headers_list: + params['header']['Accept'] = self.api_client.select_header_accept( + accept_headers_list) + + content_type_headers_list = self.headers_map['content_type'] + if content_type_headers_list: + if params['body'] != "": + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list + + return self.api_client.call_api( + self.settings['endpoint_path'], self.settings['http_method'], + params['path'], + params['query'], + params['header'], + body=params['body'], + post_params=params['form'], + files=params['file'], + response_type=self.settings['response_type'], + auth_settings=self.settings['auth'], + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], + _host=_host, + collection_formats=params['collection_format']) diff --git a/clients/python/lakefs_client/apis/__init__.py b/clients/python/lakefs_client/apis/__init__.py index 7840f7726f6..9c8d3b02fa1 100644 --- a/clients/python/lakefs_client/apis/__init__.py +++ b/clients/python/lakefs_client/apis/__init__.py @@ -1,3 +1,34 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file + +# flake8: noqa + +# Import all APIs into this package. +# If you have many APIs here with many many models used in each API this may +# raise a `RecursionError`. +# In order to avoid this, import only the API that you directly need like: +# +# from .api.actions_api import ActionsApi +# +# or import this package, but before doing it, use: +# +# import sys +# sys.setrecursionlimit(n) + +# Import APIs into API package: +from lakefs_client.api.actions_api import ActionsApi +from lakefs_client.api.auth_api import AuthApi +from lakefs_client.api.branches_api import BranchesApi +from lakefs_client.api.commits_api import CommitsApi +from lakefs_client.api.config_api import ConfigApi +from lakefs_client.api.experimental_api import ExperimentalApi +from lakefs_client.api.health_check_api import HealthCheckApi +from lakefs_client.api.import_api import ImportApi +from lakefs_client.api.metadata_api import MetadataApi +from lakefs_client.api.objects_api import ObjectsApi +from lakefs_client.api.otf_diff_api import OtfDiffApi +from lakefs_client.api.refs_api import RefsApi +from lakefs_client.api.repositories_api import RepositoriesApi +from lakefs_client.api.retention_api import RetentionApi +from lakefs_client.api.staging_api import StagingApi +from lakefs_client.api.statistics_api import StatisticsApi +from lakefs_client.api.tags_api import TagsApi +from lakefs_client.api.templates_api import TemplatesApi diff --git a/clients/python/lakefs_client/apis/path_to_api.py b/clients/python/lakefs_client/apis/path_to_api.py deleted file mode 100644 index bec468d73ef..00000000000 --- a/clients/python/lakefs_client/apis/path_to_api.py +++ /dev/null @@ -1,212 +0,0 @@ -import typing_extensions - -from lakefs_client.paths import PathValues -from lakefs_client.apis.paths.setup_comm_prefs import SetupCommPrefs -from lakefs_client.apis.paths.setup_lakefs import SetupLakefs -from lakefs_client.apis.paths.user import User -from lakefs_client.apis.paths.auth_login import AuthLogin -from lakefs_client.apis.paths.auth_password import AuthPassword -from lakefs_client.apis.paths.auth_password_forgot import AuthPasswordForgot -from lakefs_client.apis.paths.auth_capabilities import AuthCapabilities -from lakefs_client.apis.paths.auth_users import AuthUsers -from lakefs_client.apis.paths.auth_users_user_id import AuthUsersUserId -from lakefs_client.apis.paths.auth_groups import AuthGroups -from lakefs_client.apis.paths.auth_groups_group_id import AuthGroupsGroupId -from lakefs_client.apis.paths.auth_policies import AuthPolicies -from lakefs_client.apis.paths.auth_policies_policy_id import AuthPoliciesPolicyId -from lakefs_client.apis.paths.auth_groups_group_id_members import AuthGroupsGroupIdMembers -from lakefs_client.apis.paths.auth_groups_group_id_members_user_id import AuthGroupsGroupIdMembersUserId -from lakefs_client.apis.paths.auth_users_user_id_credentials import AuthUsersUserIdCredentials -from lakefs_client.apis.paths.auth_users_user_id_credentials_access_key_id import AuthUsersUserIdCredentialsAccessKeyId -from lakefs_client.apis.paths.auth_users_user_id_groups import AuthUsersUserIdGroups -from lakefs_client.apis.paths.auth_users_user_id_policies import AuthUsersUserIdPolicies -from lakefs_client.apis.paths.auth_users_user_id_policies_policy_id import AuthUsersUserIdPoliciesPolicyId -from lakefs_client.apis.paths.auth_groups_group_id_policies import AuthGroupsGroupIdPolicies -from lakefs_client.apis.paths.auth_groups_group_id_policies_policy_id import AuthGroupsGroupIdPoliciesPolicyId -from lakefs_client.apis.paths.repositories import Repositories -from lakefs_client.apis.paths.repositories_repository import RepositoriesRepository -from lakefs_client.apis.paths.repositories_repository_otf_refs_left_ref_diff_right_ref import RepositoriesRepositoryOtfRefsLeftRefDiffRightRef -from lakefs_client.apis.paths.repositories_repository_refs_dump import RepositoriesRepositoryRefsDump -from lakefs_client.apis.paths.repositories_repository_refs_restore import RepositoriesRepositoryRefsRestore -from lakefs_client.apis.paths.repositories_repository_tags import RepositoriesRepositoryTags -from lakefs_client.apis.paths.repositories_repository_tags_tag import RepositoriesRepositoryTagsTag -from lakefs_client.apis.paths.repositories_repository_branches import RepositoriesRepositoryBranches -from lakefs_client.apis.paths.repositories_repository_refs_ref_commits import RepositoriesRepositoryRefsRefCommits -from lakefs_client.apis.paths.repositories_repository_branches_branch_commits import RepositoriesRepositoryBranchesBranchCommits -from lakefs_client.apis.paths.repositories_repository_branches_branch import RepositoriesRepositoryBranchesBranch -from lakefs_client.apis.paths.repositories_repository_branches_branch_revert import RepositoriesRepositoryBranchesBranchRevert -from lakefs_client.apis.paths.repositories_repository_branches_branch_cherry_pick import RepositoriesRepositoryBranchesBranchCherryPick -from lakefs_client.apis.paths.repositories_repository_refs_source_ref_merge_destination_branch import RepositoriesRepositoryRefsSourceRefMergeDestinationBranch -from lakefs_client.apis.paths.repositories_repository_branches_branch_diff import RepositoriesRepositoryBranchesBranchDiff -from lakefs_client.apis.paths.repositories_repository_refs_left_ref_diff_right_ref import RepositoriesRepositoryRefsLeftRefDiffRightRef -from lakefs_client.apis.paths.repositories_repository_commits_commit_id import RepositoriesRepositoryCommitsCommitId -from lakefs_client.apis.paths.repositories_repository_refs_ref_objects import RepositoriesRepositoryRefsRefObjects -from lakefs_client.apis.paths.repositories_repository_branches_branch_staging_backing import RepositoriesRepositoryBranchesBranchStagingBacking -from lakefs_client.apis.paths.repositories_repository_branches_metaranges import RepositoriesRepositoryBranchesMetaranges -from lakefs_client.apis.paths.repositories_repository_branches_ranges import RepositoriesRepositoryBranchesRanges -from lakefs_client.apis.paths.repositories_repository_branches_branch_objects import RepositoriesRepositoryBranchesBranchObjects -from lakefs_client.apis.paths.repositories_repository_branches_branch_objects_delete import RepositoriesRepositoryBranchesBranchObjectsDelete -from lakefs_client.apis.paths.repositories_repository_branches_branch_objects_copy import RepositoriesRepositoryBranchesBranchObjectsCopy -from lakefs_client.apis.paths.repositories_repository_refs_ref_objects_stat import RepositoriesRepositoryRefsRefObjectsStat -from lakefs_client.apis.paths.repositories_repository_refs_ref_objects_underlying_properties import RepositoriesRepositoryRefsRefObjectsUnderlyingProperties -from lakefs_client.apis.paths.repositories_repository_refs_ref_objects_ls import RepositoriesRepositoryRefsRefObjectsLs -from lakefs_client.apis.paths.repositories_repository_refs_branch_symlink import RepositoriesRepositoryRefsBranchSymlink -from lakefs_client.apis.paths.repositories_repository_actions_runs import RepositoriesRepositoryActionsRuns -from lakefs_client.apis.paths.repositories_repository_actions_runs_run_id import RepositoriesRepositoryActionsRunsRunId -from lakefs_client.apis.paths.repositories_repository_actions_runs_run_id_hooks import RepositoriesRepositoryActionsRunsRunIdHooks -from lakefs_client.apis.paths.repositories_repository_actions_runs_run_id_hooks_hook_run_id_output import RepositoriesRepositoryActionsRunsRunIdHooksHookRunIdOutput -from lakefs_client.apis.paths.repositories_repository_metadata_meta_range_meta_range import RepositoriesRepositoryMetadataMetaRangeMetaRange -from lakefs_client.apis.paths.repositories_repository_metadata_range_range import RepositoriesRepositoryMetadataRangeRange -from lakefs_client.apis.paths.repositories_repository_gc_rules import RepositoriesRepositoryGcRules -from lakefs_client.apis.paths.repositories_repository_gc_prepare_commits import RepositoriesRepositoryGcPrepareCommits -from lakefs_client.apis.paths.repositories_repository_gc_prepare_uncommited import RepositoriesRepositoryGcPrepareUncommited -from lakefs_client.apis.paths.repositories_repository_branch_protection import RepositoriesRepositoryBranchProtection -from lakefs_client.apis.paths.healthcheck import Healthcheck -from lakefs_client.apis.paths.config_version import ConfigVersion -from lakefs_client.apis.paths.config_storage import ConfigStorage -from lakefs_client.apis.paths.config_garbage_collection import ConfigGarbageCollection -from lakefs_client.apis.paths.templates_template_location import TemplatesTemplateLocation -from lakefs_client.apis.paths.statistics import Statistics - -PathToApi = typing_extensions.TypedDict( - 'PathToApi', - { - PathValues.SETUP_COMM_PREFS: SetupCommPrefs, - PathValues.SETUP_LAKEFS: SetupLakefs, - PathValues.USER: User, - PathValues.AUTH_LOGIN: AuthLogin, - PathValues.AUTH_PASSWORD: AuthPassword, - PathValues.AUTH_PASSWORD_FORGOT: AuthPasswordForgot, - PathValues.AUTH_CAPABILITIES: AuthCapabilities, - PathValues.AUTH_USERS: AuthUsers, - PathValues.AUTH_USERS_USER_ID: AuthUsersUserId, - PathValues.AUTH_GROUPS: AuthGroups, - PathValues.AUTH_GROUPS_GROUP_ID: AuthGroupsGroupId, - PathValues.AUTH_POLICIES: AuthPolicies, - PathValues.AUTH_POLICIES_POLICY_ID: AuthPoliciesPolicyId, - PathValues.AUTH_GROUPS_GROUP_ID_MEMBERS: AuthGroupsGroupIdMembers, - PathValues.AUTH_GROUPS_GROUP_ID_MEMBERS_USER_ID: AuthGroupsGroupIdMembersUserId, - PathValues.AUTH_USERS_USER_ID_CREDENTIALS: AuthUsersUserIdCredentials, - PathValues.AUTH_USERS_USER_ID_CREDENTIALS_ACCESS_KEY_ID: AuthUsersUserIdCredentialsAccessKeyId, - PathValues.AUTH_USERS_USER_ID_GROUPS: AuthUsersUserIdGroups, - PathValues.AUTH_USERS_USER_ID_POLICIES: AuthUsersUserIdPolicies, - PathValues.AUTH_USERS_USER_ID_POLICIES_POLICY_ID: AuthUsersUserIdPoliciesPolicyId, - PathValues.AUTH_GROUPS_GROUP_ID_POLICIES: AuthGroupsGroupIdPolicies, - PathValues.AUTH_GROUPS_GROUP_ID_POLICIES_POLICY_ID: AuthGroupsGroupIdPoliciesPolicyId, - PathValues.REPOSITORIES: Repositories, - PathValues.REPOSITORIES_REPOSITORY: RepositoriesRepository, - PathValues.REPOSITORIES_REPOSITORY_OTF_REFS_LEFT_REF_DIFF_RIGHT_REF: RepositoriesRepositoryOtfRefsLeftRefDiffRightRef, - PathValues.REPOSITORIES_REPOSITORY_REFS_DUMP: RepositoriesRepositoryRefsDump, - PathValues.REPOSITORIES_REPOSITORY_REFS_RESTORE: RepositoriesRepositoryRefsRestore, - PathValues.REPOSITORIES_REPOSITORY_TAGS: RepositoriesRepositoryTags, - PathValues.REPOSITORIES_REPOSITORY_TAGS_TAG: RepositoriesRepositoryTagsTag, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES: RepositoriesRepositoryBranches, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_COMMITS: RepositoriesRepositoryRefsRefCommits, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_COMMITS: RepositoriesRepositoryBranchesBranchCommits, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH: RepositoriesRepositoryBranchesBranch, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_REVERT: RepositoriesRepositoryBranchesBranchRevert, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_CHERRYPICK: RepositoriesRepositoryBranchesBranchCherryPick, - PathValues.REPOSITORIES_REPOSITORY_REFS_SOURCE_REF_MERGE_DESTINATION_BRANCH: RepositoriesRepositoryRefsSourceRefMergeDestinationBranch, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_DIFF: RepositoriesRepositoryBranchesBranchDiff, - PathValues.REPOSITORIES_REPOSITORY_REFS_LEFT_REF_DIFF_RIGHT_REF: RepositoriesRepositoryRefsLeftRefDiffRightRef, - PathValues.REPOSITORIES_REPOSITORY_COMMITS_COMMIT_ID: RepositoriesRepositoryCommitsCommitId, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS: RepositoriesRepositoryRefsRefObjects, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_STAGING_BACKING: RepositoriesRepositoryBranchesBranchStagingBacking, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_METARANGES: RepositoriesRepositoryBranchesMetaranges, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_RANGES: RepositoriesRepositoryBranchesRanges, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS: RepositoriesRepositoryBranchesBranchObjects, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_DELETE: RepositoriesRepositoryBranchesBranchObjectsDelete, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_COPY: RepositoriesRepositoryBranchesBranchObjectsCopy, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_STAT: RepositoriesRepositoryRefsRefObjectsStat, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_UNDERLYING_PROPERTIES: RepositoriesRepositoryRefsRefObjectsUnderlyingProperties, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_LS: RepositoriesRepositoryRefsRefObjectsLs, - PathValues.REPOSITORIES_REPOSITORY_REFS_BRANCH_SYMLINK: RepositoriesRepositoryRefsBranchSymlink, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS: RepositoriesRepositoryActionsRuns, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID: RepositoriesRepositoryActionsRunsRunId, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS: RepositoriesRepositoryActionsRunsRunIdHooks, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS_HOOK_RUN_ID_OUTPUT: RepositoriesRepositoryActionsRunsRunIdHooksHookRunIdOutput, - PathValues.REPOSITORIES_REPOSITORY_METADATA_META_RANGE_META_RANGE: RepositoriesRepositoryMetadataMetaRangeMetaRange, - PathValues.REPOSITORIES_REPOSITORY_METADATA_RANGE_RANGE: RepositoriesRepositoryMetadataRangeRange, - PathValues.REPOSITORIES_REPOSITORY_GC_RULES: RepositoriesRepositoryGcRules, - PathValues.REPOSITORIES_REPOSITORY_GC_PREPARE_COMMITS: RepositoriesRepositoryGcPrepareCommits, - PathValues.REPOSITORIES_REPOSITORY_GC_PREPARE_UNCOMMITED: RepositoriesRepositoryGcPrepareUncommited, - PathValues.REPOSITORIES_REPOSITORY_BRANCH_PROTECTION: RepositoriesRepositoryBranchProtection, - PathValues.HEALTHCHECK: Healthcheck, - PathValues.CONFIG_VERSION: ConfigVersion, - PathValues.CONFIG_STORAGE: ConfigStorage, - PathValues.CONFIG_GARBAGECOLLECTION: ConfigGarbageCollection, - PathValues.TEMPLATES_TEMPLATE_LOCATION: TemplatesTemplateLocation, - PathValues.STATISTICS: Statistics, - } -) - -path_to_api = PathToApi( - { - PathValues.SETUP_COMM_PREFS: SetupCommPrefs, - PathValues.SETUP_LAKEFS: SetupLakefs, - PathValues.USER: User, - PathValues.AUTH_LOGIN: AuthLogin, - PathValues.AUTH_PASSWORD: AuthPassword, - PathValues.AUTH_PASSWORD_FORGOT: AuthPasswordForgot, - PathValues.AUTH_CAPABILITIES: AuthCapabilities, - PathValues.AUTH_USERS: AuthUsers, - PathValues.AUTH_USERS_USER_ID: AuthUsersUserId, - PathValues.AUTH_GROUPS: AuthGroups, - PathValues.AUTH_GROUPS_GROUP_ID: AuthGroupsGroupId, - PathValues.AUTH_POLICIES: AuthPolicies, - PathValues.AUTH_POLICIES_POLICY_ID: AuthPoliciesPolicyId, - PathValues.AUTH_GROUPS_GROUP_ID_MEMBERS: AuthGroupsGroupIdMembers, - PathValues.AUTH_GROUPS_GROUP_ID_MEMBERS_USER_ID: AuthGroupsGroupIdMembersUserId, - PathValues.AUTH_USERS_USER_ID_CREDENTIALS: AuthUsersUserIdCredentials, - PathValues.AUTH_USERS_USER_ID_CREDENTIALS_ACCESS_KEY_ID: AuthUsersUserIdCredentialsAccessKeyId, - PathValues.AUTH_USERS_USER_ID_GROUPS: AuthUsersUserIdGroups, - PathValues.AUTH_USERS_USER_ID_POLICIES: AuthUsersUserIdPolicies, - PathValues.AUTH_USERS_USER_ID_POLICIES_POLICY_ID: AuthUsersUserIdPoliciesPolicyId, - PathValues.AUTH_GROUPS_GROUP_ID_POLICIES: AuthGroupsGroupIdPolicies, - PathValues.AUTH_GROUPS_GROUP_ID_POLICIES_POLICY_ID: AuthGroupsGroupIdPoliciesPolicyId, - PathValues.REPOSITORIES: Repositories, - PathValues.REPOSITORIES_REPOSITORY: RepositoriesRepository, - PathValues.REPOSITORIES_REPOSITORY_OTF_REFS_LEFT_REF_DIFF_RIGHT_REF: RepositoriesRepositoryOtfRefsLeftRefDiffRightRef, - PathValues.REPOSITORIES_REPOSITORY_REFS_DUMP: RepositoriesRepositoryRefsDump, - PathValues.REPOSITORIES_REPOSITORY_REFS_RESTORE: RepositoriesRepositoryRefsRestore, - PathValues.REPOSITORIES_REPOSITORY_TAGS: RepositoriesRepositoryTags, - PathValues.REPOSITORIES_REPOSITORY_TAGS_TAG: RepositoriesRepositoryTagsTag, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES: RepositoriesRepositoryBranches, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_COMMITS: RepositoriesRepositoryRefsRefCommits, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_COMMITS: RepositoriesRepositoryBranchesBranchCommits, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH: RepositoriesRepositoryBranchesBranch, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_REVERT: RepositoriesRepositoryBranchesBranchRevert, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_CHERRYPICK: RepositoriesRepositoryBranchesBranchCherryPick, - PathValues.REPOSITORIES_REPOSITORY_REFS_SOURCE_REF_MERGE_DESTINATION_BRANCH: RepositoriesRepositoryRefsSourceRefMergeDestinationBranch, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_DIFF: RepositoriesRepositoryBranchesBranchDiff, - PathValues.REPOSITORIES_REPOSITORY_REFS_LEFT_REF_DIFF_RIGHT_REF: RepositoriesRepositoryRefsLeftRefDiffRightRef, - PathValues.REPOSITORIES_REPOSITORY_COMMITS_COMMIT_ID: RepositoriesRepositoryCommitsCommitId, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS: RepositoriesRepositoryRefsRefObjects, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_STAGING_BACKING: RepositoriesRepositoryBranchesBranchStagingBacking, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_METARANGES: RepositoriesRepositoryBranchesMetaranges, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_RANGES: RepositoriesRepositoryBranchesRanges, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS: RepositoriesRepositoryBranchesBranchObjects, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_DELETE: RepositoriesRepositoryBranchesBranchObjectsDelete, - PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_COPY: RepositoriesRepositoryBranchesBranchObjectsCopy, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_STAT: RepositoriesRepositoryRefsRefObjectsStat, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_UNDERLYING_PROPERTIES: RepositoriesRepositoryRefsRefObjectsUnderlyingProperties, - PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_LS: RepositoriesRepositoryRefsRefObjectsLs, - PathValues.REPOSITORIES_REPOSITORY_REFS_BRANCH_SYMLINK: RepositoriesRepositoryRefsBranchSymlink, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS: RepositoriesRepositoryActionsRuns, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID: RepositoriesRepositoryActionsRunsRunId, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS: RepositoriesRepositoryActionsRunsRunIdHooks, - PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS_HOOK_RUN_ID_OUTPUT: RepositoriesRepositoryActionsRunsRunIdHooksHookRunIdOutput, - PathValues.REPOSITORIES_REPOSITORY_METADATA_META_RANGE_META_RANGE: RepositoriesRepositoryMetadataMetaRangeMetaRange, - PathValues.REPOSITORIES_REPOSITORY_METADATA_RANGE_RANGE: RepositoriesRepositoryMetadataRangeRange, - PathValues.REPOSITORIES_REPOSITORY_GC_RULES: RepositoriesRepositoryGcRules, - PathValues.REPOSITORIES_REPOSITORY_GC_PREPARE_COMMITS: RepositoriesRepositoryGcPrepareCommits, - PathValues.REPOSITORIES_REPOSITORY_GC_PREPARE_UNCOMMITED: RepositoriesRepositoryGcPrepareUncommited, - PathValues.REPOSITORIES_REPOSITORY_BRANCH_PROTECTION: RepositoriesRepositoryBranchProtection, - PathValues.HEALTHCHECK: Healthcheck, - PathValues.CONFIG_VERSION: ConfigVersion, - PathValues.CONFIG_STORAGE: ConfigStorage, - PathValues.CONFIG_GARBAGECOLLECTION: ConfigGarbageCollection, - PathValues.TEMPLATES_TEMPLATE_LOCATION: TemplatesTemplateLocation, - PathValues.STATISTICS: Statistics, - } -) diff --git a/clients/python/lakefs_client/apis/paths/__init__.py b/clients/python/lakefs_client/apis/paths/__init__.py deleted file mode 100644 index fbf8be64836..00000000000 --- a/clients/python/lakefs_client/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.apis.path_to_api import path_to_api diff --git a/clients/python/lakefs_client/apis/paths/auth_capabilities.py b/clients/python/lakefs_client/apis/paths/auth_capabilities.py deleted file mode 100644 index c168af18e4b..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_capabilities.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_capabilities.get import ApiForget - - -class AuthCapabilities( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_groups.py b/clients/python/lakefs_client/apis/paths/auth_groups.py deleted file mode 100644 index 313cd3ed618..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_groups.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_groups.get import ApiForget -from lakefs_client.paths.auth_groups.post import ApiForpost - - -class AuthGroups( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_groups_group_id.py b/clients/python/lakefs_client/apis/paths/auth_groups_group_id.py deleted file mode 100644 index dd474d128c0..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_groups_group_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_groups_group_id.get import ApiForget -from lakefs_client.paths.auth_groups_group_id.delete import ApiFordelete - - -class AuthGroupsGroupId( - ApiForget, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_members.py b/clients/python/lakefs_client/apis/paths/auth_groups_group_id_members.py deleted file mode 100644 index a96943e4774..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_members.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_groups_group_id_members.get import ApiForget - - -class AuthGroupsGroupIdMembers( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_members_user_id.py b/clients/python/lakefs_client/apis/paths/auth_groups_group_id_members_user_id.py deleted file mode 100644 index de7347ec648..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_members_user_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_groups_group_id_members_user_id.put import ApiForput -from lakefs_client.paths.auth_groups_group_id_members_user_id.delete import ApiFordelete - - -class AuthGroupsGroupIdMembersUserId( - ApiForput, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies.py b/clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies.py deleted file mode 100644 index a776e5a4d47..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_groups_group_id_policies.get import ApiForget - - -class AuthGroupsGroupIdPolicies( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies_policy_id.py b/clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies_policy_id.py deleted file mode 100644 index 414b47e1649..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_groups_group_id_policies_policy_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_groups_group_id_policies_policy_id.put import ApiForput -from lakefs_client.paths.auth_groups_group_id_policies_policy_id.delete import ApiFordelete - - -class AuthGroupsGroupIdPoliciesPolicyId( - ApiForput, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_login.py b/clients/python/lakefs_client/apis/paths/auth_login.py deleted file mode 100644 index 400d5a79e50..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_login.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_login.post import ApiForpost - - -class AuthLogin( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_password.py b/clients/python/lakefs_client/apis/paths/auth_password.py deleted file mode 100644 index 62810882065..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_password.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_password.post import ApiForpost - - -class AuthPassword( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_password_forgot.py b/clients/python/lakefs_client/apis/paths/auth_password_forgot.py deleted file mode 100644 index 81b536115a8..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_password_forgot.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_password_forgot.post import ApiForpost - - -class AuthPasswordForgot( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_policies.py b/clients/python/lakefs_client/apis/paths/auth_policies.py deleted file mode 100644 index fe031ffd9c5..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_policies.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_policies.get import ApiForget -from lakefs_client.paths.auth_policies.post import ApiForpost - - -class AuthPolicies( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_policies_policy_id.py b/clients/python/lakefs_client/apis/paths/auth_policies_policy_id.py deleted file mode 100644 index 9f7fd411cf4..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_policies_policy_id.py +++ /dev/null @@ -1,11 +0,0 @@ -from lakefs_client.paths.auth_policies_policy_id.get import ApiForget -from lakefs_client.paths.auth_policies_policy_id.put import ApiForput -from lakefs_client.paths.auth_policies_policy_id.delete import ApiFordelete - - -class AuthPoliciesPolicyId( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_users.py b/clients/python/lakefs_client/apis/paths/auth_users.py deleted file mode 100644 index 70c33cb01a5..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_users.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_users.get import ApiForget -from lakefs_client.paths.auth_users.post import ApiForpost - - -class AuthUsers( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_users_user_id.py b/clients/python/lakefs_client/apis/paths/auth_users_user_id.py deleted file mode 100644 index d85a9ad6aa0..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_users_user_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_users_user_id.get import ApiForget -from lakefs_client.paths.auth_users_user_id.delete import ApiFordelete - - -class AuthUsersUserId( - ApiForget, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials.py b/clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials.py deleted file mode 100644 index 79df919565c..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_users_user_id_credentials.get import ApiForget -from lakefs_client.paths.auth_users_user_id_credentials.post import ApiForpost - - -class AuthUsersUserIdCredentials( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials_access_key_id.py b/clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials_access_key_id.py deleted file mode 100644 index aa6a493ddf4..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_users_user_id_credentials_access_key_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_users_user_id_credentials_access_key_id.get import ApiForget -from lakefs_client.paths.auth_users_user_id_credentials_access_key_id.delete import ApiFordelete - - -class AuthUsersUserIdCredentialsAccessKeyId( - ApiForget, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_users_user_id_groups.py b/clients/python/lakefs_client/apis/paths/auth_users_user_id_groups.py deleted file mode 100644 index e48cf681edb..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_users_user_id_groups.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_users_user_id_groups.get import ApiForget - - -class AuthUsersUserIdGroups( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_users_user_id_policies.py b/clients/python/lakefs_client/apis/paths/auth_users_user_id_policies.py deleted file mode 100644 index e30175ef753..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_users_user_id_policies.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.auth_users_user_id_policies.get import ApiForget - - -class AuthUsersUserIdPolicies( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/auth_users_user_id_policies_policy_id.py b/clients/python/lakefs_client/apis/paths/auth_users_user_id_policies_policy_id.py deleted file mode 100644 index 3e4de48240d..00000000000 --- a/clients/python/lakefs_client/apis/paths/auth_users_user_id_policies_policy_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.auth_users_user_id_policies_policy_id.put import ApiForput -from lakefs_client.paths.auth_users_user_id_policies_policy_id.delete import ApiFordelete - - -class AuthUsersUserIdPoliciesPolicyId( - ApiForput, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/config_garbage_collection.py b/clients/python/lakefs_client/apis/paths/config_garbage_collection.py deleted file mode 100644 index 11db1c299a4..00000000000 --- a/clients/python/lakefs_client/apis/paths/config_garbage_collection.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.config_garbage_collection.get import ApiForget - - -class ConfigGarbageCollection( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/config_storage.py b/clients/python/lakefs_client/apis/paths/config_storage.py deleted file mode 100644 index 302846564dc..00000000000 --- a/clients/python/lakefs_client/apis/paths/config_storage.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.config_storage.get import ApiForget - - -class ConfigStorage( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/config_version.py b/clients/python/lakefs_client/apis/paths/config_version.py deleted file mode 100644 index 4f468fde83f..00000000000 --- a/clients/python/lakefs_client/apis/paths/config_version.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.config_version.get import ApiForget - - -class ConfigVersion( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/healthcheck.py b/clients/python/lakefs_client/apis/paths/healthcheck.py deleted file mode 100644 index e93ea8bfdae..00000000000 --- a/clients/python/lakefs_client/apis/paths/healthcheck.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.healthcheck.get import ApiForget - - -class Healthcheck( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories.py b/clients/python/lakefs_client/apis/paths/repositories.py deleted file mode 100644 index 32963cd3c37..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories.get import ApiForget -from lakefs_client.paths.repositories.post import ApiForpost - - -class Repositories( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository.py b/clients/python/lakefs_client/apis/paths/repositories_repository.py deleted file mode 100644 index ebcb5861bf7..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository.get import ApiForget -from lakefs_client.paths.repositories_repository.delete import ApiFordelete - - -class RepositoriesRepository( - ApiForget, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs.py b/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs.py deleted file mode 100644 index 6dc96a34035..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_actions_runs.get import ApiForget - - -class RepositoriesRepositoryActionsRuns( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id.py b/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id.py deleted file mode 100644 index e7ed8cdc838..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_actions_runs_run_id.get import ApiForget - - -class RepositoriesRepositoryActionsRunsRunId( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks.py b/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks.py deleted file mode 100644 index 954b9e2f3f5..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks.get import ApiForget - - -class RepositoriesRepositoryActionsRunsRunIdHooks( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output.py b/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output.py deleted file mode 100644 index 01d238db8fb..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks_hook_run_id_output.get import ApiForget - - -class RepositoriesRepositoryActionsRunsRunIdHooksHookRunIdOutput( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branch_protection.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branch_protection.py deleted file mode 100644 index c7bf8c2935c..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branch_protection.py +++ /dev/null @@ -1,11 +0,0 @@ -from lakefs_client.paths.repositories_repository_branch_protection.get import ApiForget -from lakefs_client.paths.repositories_repository_branch_protection.post import ApiForpost -from lakefs_client.paths.repositories_repository_branch_protection.delete import ApiFordelete - - -class RepositoriesRepositoryBranchProtection( - ApiForget, - ApiForpost, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches.py deleted file mode 100644 index dde861ec683..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches.get import ApiForget -from lakefs_client.paths.repositories_repository_branches.post import ApiForpost - - -class RepositoriesRepositoryBranches( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch.py deleted file mode 100644 index 35485527412..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch.py +++ /dev/null @@ -1,11 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch.get import ApiForget -from lakefs_client.paths.repositories_repository_branches_branch.put import ApiForput -from lakefs_client.paths.repositories_repository_branches_branch.delete import ApiFordelete - - -class RepositoriesRepositoryBranchesBranch( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_cherry_pick.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_cherry_pick.py deleted file mode 100644 index 467da0e20ca..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_cherry_pick.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_cherry_pick.post import ApiForpost - - -class RepositoriesRepositoryBranchesBranchCherryPick( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_commits.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_commits.py deleted file mode 100644 index d333b491e24..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_commits.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_commits.get import ApiForget -from lakefs_client.paths.repositories_repository_branches_branch_commits.post import ApiForpost - - -class RepositoriesRepositoryBranchesBranchCommits( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_diff.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_diff.py deleted file mode 100644 index bb814a334a5..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_diff.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_diff.get import ApiForget - - -class RepositoriesRepositoryBranchesBranchDiff( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects.py deleted file mode 100644 index 5deb7ea8a08..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects.py +++ /dev/null @@ -1,11 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_objects.put import ApiForput -from lakefs_client.paths.repositories_repository_branches_branch_objects.post import ApiForpost -from lakefs_client.paths.repositories_repository_branches_branch_objects.delete import ApiFordelete - - -class RepositoriesRepositoryBranchesBranchObjects( - ApiForput, - ApiForpost, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_copy.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_copy.py deleted file mode 100644 index c49e5b356ef..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_copy.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_objects_copy.post import ApiForpost - - -class RepositoriesRepositoryBranchesBranchObjectsCopy( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_delete.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_delete.py deleted file mode 100644 index 4a2a778ce02..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_objects_delete.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_objects_delete.post import ApiForpost - - -class RepositoriesRepositoryBranchesBranchObjectsDelete( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_revert.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_revert.py deleted file mode 100644 index 2c95a3cbc95..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_revert.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_revert.post import ApiForpost - - -class RepositoriesRepositoryBranchesBranchRevert( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_staging_backing.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_staging_backing.py deleted file mode 100644 index 54f34f0152d..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_branch_staging_backing.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_branch_staging_backing.get import ApiForget -from lakefs_client.paths.repositories_repository_branches_branch_staging_backing.put import ApiForput - - -class RepositoriesRepositoryBranchesBranchStagingBacking( - ApiForget, - ApiForput, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_metaranges.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_metaranges.py deleted file mode 100644 index fef5cc9a865..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_metaranges.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_metaranges.post import ApiForpost - - -class RepositoriesRepositoryBranchesMetaranges( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_ranges.py b/clients/python/lakefs_client/apis/paths/repositories_repository_branches_ranges.py deleted file mode 100644 index 9695abdad45..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_branches_ranges.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_branches_ranges.post import ApiForpost - - -class RepositoriesRepositoryBranchesRanges( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_commits_commit_id.py b/clients/python/lakefs_client/apis/paths/repositories_repository_commits_commit_id.py deleted file mode 100644 index 875c80db448..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_commits_commit_id.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_commits_commit_id.get import ApiForget - - -class RepositoriesRepositoryCommitsCommitId( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_commits.py b/clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_commits.py deleted file mode 100644 index 3b1d17c1665..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_commits.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_gc_prepare_commits.post import ApiForpost - - -class RepositoriesRepositoryGcPrepareCommits( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_uncommited.py b/clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_uncommited.py deleted file mode 100644 index bce7e6316c7..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_gc_prepare_uncommited.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_gc_prepare_uncommited.post import ApiForpost - - -class RepositoriesRepositoryGcPrepareUncommited( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_gc_rules.py b/clients/python/lakefs_client/apis/paths/repositories_repository_gc_rules.py deleted file mode 100644 index 3eca6b6f117..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_gc_rules.py +++ /dev/null @@ -1,11 +0,0 @@ -from lakefs_client.paths.repositories_repository_gc_rules.get import ApiForget -from lakefs_client.paths.repositories_repository_gc_rules.post import ApiForpost -from lakefs_client.paths.repositories_repository_gc_rules.delete import ApiFordelete - - -class RepositoriesRepositoryGcRules( - ApiForget, - ApiForpost, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_metadata_meta_range_meta_range.py b/clients/python/lakefs_client/apis/paths/repositories_repository_metadata_meta_range_meta_range.py deleted file mode 100644 index 34f3e46fc34..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_metadata_meta_range_meta_range.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_metadata_meta_range_meta_range.get import ApiForget - - -class RepositoriesRepositoryMetadataMetaRangeMetaRange( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_metadata_range_range.py b/clients/python/lakefs_client/apis/paths/repositories_repository_metadata_range_range.py deleted file mode 100644 index f7b9f5a558c..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_metadata_range_range.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_metadata_range_range.get import ApiForget - - -class RepositoriesRepositoryMetadataRangeRange( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_otf_refs_left_ref_diff_right_ref.py b/clients/python/lakefs_client/apis/paths/repositories_repository_otf_refs_left_ref_diff_right_ref.py deleted file mode 100644 index 1c6dd9899ab..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_otf_refs_left_ref_diff_right_ref.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_otf_refs_left_ref_diff_right_ref.get import ApiForget - - -class RepositoriesRepositoryOtfRefsLeftRefDiffRightRef( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_branch_symlink.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_branch_symlink.py deleted file mode 100644 index 0d299083673..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_branch_symlink.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_branch_symlink.post import ApiForpost - - -class RepositoriesRepositoryRefsBranchSymlink( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_dump.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_dump.py deleted file mode 100644 index c298ab6ad71..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_dump.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_dump.put import ApiForput - - -class RepositoriesRepositoryRefsDump( - ApiForput, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_left_ref_diff_right_ref.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_left_ref_diff_right_ref.py deleted file mode 100644 index f40d3393af7..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_left_ref_diff_right_ref.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_left_ref_diff_right_ref.get import ApiForget - - -class RepositoriesRepositoryRefsLeftRefDiffRightRef( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_commits.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_commits.py deleted file mode 100644 index 42a46d8e53b..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_commits.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_ref_commits.get import ApiForget - - -class RepositoriesRepositoryRefsRefCommits( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects.py deleted file mode 100644 index 6b1b7caa1b9..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_ref_objects.get import ApiForget -from lakefs_client.paths.repositories_repository_refs_ref_objects.head import ApiForhead - - -class RepositoriesRepositoryRefsRefObjects( - ApiForget, - ApiForhead, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_ls.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_ls.py deleted file mode 100644 index beca220cca0..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_ls.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_ref_objects_ls.get import ApiForget - - -class RepositoriesRepositoryRefsRefObjectsLs( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_stat.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_stat.py deleted file mode 100644 index 74d9ff0e7e6..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_stat.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_ref_objects_stat.get import ApiForget - - -class RepositoriesRepositoryRefsRefObjectsStat( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_underlying_properties.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_underlying_properties.py deleted file mode 100644 index 2f0a262c38d..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_ref_objects_underlying_properties.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_ref_objects_underlying_properties.get import ApiForget - - -class RepositoriesRepositoryRefsRefObjectsUnderlyingProperties( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_restore.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_restore.py deleted file mode 100644 index c1ec5d8d173..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_restore.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_restore.put import ApiForput - - -class RepositoriesRepositoryRefsRestore( - ApiForput, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_source_ref_merge_destination_branch.py b/clients/python/lakefs_client/apis/paths/repositories_repository_refs_source_ref_merge_destination_branch.py deleted file mode 100644 index ff2505edb59..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_refs_source_ref_merge_destination_branch.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository_refs_source_ref_merge_destination_branch.get import ApiForget -from lakefs_client.paths.repositories_repository_refs_source_ref_merge_destination_branch.post import ApiForpost - - -class RepositoriesRepositoryRefsSourceRefMergeDestinationBranch( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_tags.py b/clients/python/lakefs_client/apis/paths/repositories_repository_tags.py deleted file mode 100644 index 71b6b414d9e..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_tags.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository_tags.get import ApiForget -from lakefs_client.paths.repositories_repository_tags.post import ApiForpost - - -class RepositoriesRepositoryTags( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/repositories_repository_tags_tag.py b/clients/python/lakefs_client/apis/paths/repositories_repository_tags_tag.py deleted file mode 100644 index 5419d63d5b3..00000000000 --- a/clients/python/lakefs_client/apis/paths/repositories_repository_tags_tag.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.repositories_repository_tags_tag.get import ApiForget -from lakefs_client.paths.repositories_repository_tags_tag.delete import ApiFordelete - - -class RepositoriesRepositoryTagsTag( - ApiForget, - ApiFordelete, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/setup_comm_prefs.py b/clients/python/lakefs_client/apis/paths/setup_comm_prefs.py deleted file mode 100644 index 2ab15883c79..00000000000 --- a/clients/python/lakefs_client/apis/paths/setup_comm_prefs.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.setup_comm_prefs.post import ApiForpost - - -class SetupCommPrefs( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/setup_lakefs.py b/clients/python/lakefs_client/apis/paths/setup_lakefs.py deleted file mode 100644 index 1338d4c603f..00000000000 --- a/clients/python/lakefs_client/apis/paths/setup_lakefs.py +++ /dev/null @@ -1,9 +0,0 @@ -from lakefs_client.paths.setup_lakefs.get import ApiForget -from lakefs_client.paths.setup_lakefs.post import ApiForpost - - -class SetupLakefs( - ApiForget, - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/statistics.py b/clients/python/lakefs_client/apis/paths/statistics.py deleted file mode 100644 index f719d54825d..00000000000 --- a/clients/python/lakefs_client/apis/paths/statistics.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.statistics.post import ApiForpost - - -class Statistics( - ApiForpost, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/templates_template_location.py b/clients/python/lakefs_client/apis/paths/templates_template_location.py deleted file mode 100644 index 47d90092b8c..00000000000 --- a/clients/python/lakefs_client/apis/paths/templates_template_location.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.templates_template_location.get import ApiForget - - -class TemplatesTemplateLocation( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/paths/user.py b/clients/python/lakefs_client/apis/paths/user.py deleted file mode 100644 index 458a64172a1..00000000000 --- a/clients/python/lakefs_client/apis/paths/user.py +++ /dev/null @@ -1,7 +0,0 @@ -from lakefs_client.paths.user.get import ApiForget - - -class User( - ApiForget, -): - pass diff --git a/clients/python/lakefs_client/apis/tag_to_api.py b/clients/python/lakefs_client/apis/tag_to_api.py deleted file mode 100644 index deba998265c..00000000000 --- a/clients/python/lakefs_client/apis/tag_to_api.py +++ /dev/null @@ -1,68 +0,0 @@ -import typing_extensions - -from lakefs_client.apis.tags import TagValues -from lakefs_client.apis.tags.actions_api import ActionsApi -from lakefs_client.apis.tags.auth_api import AuthApi -from lakefs_client.apis.tags.branches_api import BranchesApi -from lakefs_client.apis.tags.commits_api import CommitsApi -from lakefs_client.apis.tags.config_api import ConfigApi -from lakefs_client.apis.tags.experimental_api import ExperimentalApi -from lakefs_client.apis.tags.otf_diff_api import OtfDiffApi -from lakefs_client.apis.tags.health_check_api import HealthCheckApi -from lakefs_client.apis.tags.model_import_api import ModelImportApi -from lakefs_client.apis.tags.metadata_api import MetadataApi -from lakefs_client.apis.tags.objects_api import ObjectsApi -from lakefs_client.apis.tags.refs_api import RefsApi -from lakefs_client.apis.tags.repositories_api import RepositoriesApi -from lakefs_client.apis.tags.retention_api import RetentionApi -from lakefs_client.apis.tags.staging_api import StagingApi -from lakefs_client.apis.tags.statistics_api import StatisticsApi -from lakefs_client.apis.tags.tags_api import TagsApi -from lakefs_client.apis.tags.templates_api import TemplatesApi - -TagToApi = typing_extensions.TypedDict( - 'TagToApi', - { - TagValues.ACTIONS: ActionsApi, - TagValues.AUTH: AuthApi, - TagValues.BRANCHES: BranchesApi, - TagValues.COMMITS: CommitsApi, - TagValues.CONFIG: ConfigApi, - TagValues.EXPERIMENTAL: ExperimentalApi, - TagValues.OTF_DIFF: OtfDiffApi, - TagValues.HEALTH_CHECK: HealthCheckApi, - TagValues.IMPORT: ModelImportApi, - TagValues.METADATA: MetadataApi, - TagValues.OBJECTS: ObjectsApi, - TagValues.REFS: RefsApi, - TagValues.REPOSITORIES: RepositoriesApi, - TagValues.RETENTION: RetentionApi, - TagValues.STAGING: StagingApi, - TagValues.STATISTICS: StatisticsApi, - TagValues.TAGS: TagsApi, - TagValues.TEMPLATES: TemplatesApi, - } -) - -tag_to_api = TagToApi( - { - TagValues.ACTIONS: ActionsApi, - TagValues.AUTH: AuthApi, - TagValues.BRANCHES: BranchesApi, - TagValues.COMMITS: CommitsApi, - TagValues.CONFIG: ConfigApi, - TagValues.EXPERIMENTAL: ExperimentalApi, - TagValues.OTF_DIFF: OtfDiffApi, - TagValues.HEALTH_CHECK: HealthCheckApi, - TagValues.IMPORT: ModelImportApi, - TagValues.METADATA: MetadataApi, - TagValues.OBJECTS: ObjectsApi, - TagValues.REFS: RefsApi, - TagValues.REPOSITORIES: RepositoriesApi, - TagValues.RETENTION: RetentionApi, - TagValues.STAGING: StagingApi, - TagValues.STATISTICS: StatisticsApi, - TagValues.TAGS: TagsApi, - TagValues.TEMPLATES: TemplatesApi, - } -) diff --git a/clients/python/lakefs_client/apis/tags/__init__.py b/clients/python/lakefs_client/apis/tags/__init__.py deleted file mode 100644 index d8fbc6018d4..00000000000 --- a/clients/python/lakefs_client/apis/tags/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.apis.tag_to_api import tag_to_api - -import enum - - -class TagValues(str, enum.Enum): - ACTIONS = "actions" - AUTH = "auth" - BRANCHES = "branches" - COMMITS = "commits" - CONFIG = "config" - EXPERIMENTAL = "experimental" - OTF_DIFF = "otf diff" - HEALTH_CHECK = "healthCheck" - IMPORT = "import" - METADATA = "metadata" - OBJECTS = "objects" - REFS = "refs" - REPOSITORIES = "repositories" - RETENTION = "retention" - STAGING = "staging" - STATISTICS = "statistics" - TAGS = "tags" - TEMPLATES = "templates" diff --git a/clients/python/lakefs_client/apis/tags/actions_api.py b/clients/python/lakefs_client/apis/tags/actions_api.py deleted file mode 100644 index 2dc8fffdcb0..00000000000 --- a/clients/python/lakefs_client/apis/tags/actions_api.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_actions_runs_run_id.get import GetRun -from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks_hook_run_id_output.get import GetRunHookOutput -from lakefs_client.paths.repositories_repository_actions_runs.get import ListRepositoryRuns -from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks.get import ListRunHooks - - -class ActionsApi( - GetRun, - GetRunHookOutput, - ListRepositoryRuns, - ListRunHooks, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/auth_api.py b/clients/python/lakefs_client/apis/tags/auth_api.py deleted file mode 100644 index 57c62b5b067..00000000000 --- a/clients/python/lakefs_client/apis/tags/auth_api.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.auth_groups_group_id_members_user_id.put import AddGroupMembership -from lakefs_client.paths.auth_groups_group_id_policies_policy_id.put import AttachPolicyToGroup -from lakefs_client.paths.auth_users_user_id_policies_policy_id.put import AttachPolicyToUser -from lakefs_client.paths.auth_users_user_id_credentials.post import CreateCredentials -from lakefs_client.paths.auth_groups.post import CreateGroup -from lakefs_client.paths.auth_policies.post import CreatePolicy -from lakefs_client.paths.auth_users.post import CreateUser -from lakefs_client.paths.auth_users_user_id_credentials_access_key_id.delete import DeleteCredentials -from lakefs_client.paths.auth_groups_group_id.delete import DeleteGroup -from lakefs_client.paths.auth_groups_group_id_members_user_id.delete import DeleteGroupMembership -from lakefs_client.paths.auth_policies_policy_id.delete import DeletePolicy -from lakefs_client.paths.auth_users_user_id.delete import DeleteUser -from lakefs_client.paths.auth_groups_group_id_policies_policy_id.delete import DetachPolicyFromGroup -from lakefs_client.paths.auth_users_user_id_policies_policy_id.delete import DetachPolicyFromUser -from lakefs_client.paths.auth_password_forgot.post import ForgotPassword -from lakefs_client.paths.auth_capabilities.get import GetAuthCapabilities -from lakefs_client.paths.auth_users_user_id_credentials_access_key_id.get import GetCredentials -from lakefs_client.paths.user.get import GetCurrentUser -from lakefs_client.paths.auth_groups_group_id.get import GetGroup -from lakefs_client.paths.auth_policies_policy_id.get import GetPolicy -from lakefs_client.paths.auth_users_user_id.get import GetUser -from lakefs_client.paths.auth_groups_group_id_members.get import ListGroupMembers -from lakefs_client.paths.auth_groups_group_id_policies.get import ListGroupPolicies -from lakefs_client.paths.auth_groups.get import ListGroups -from lakefs_client.paths.auth_policies.get import ListPolicies -from lakefs_client.paths.auth_users_user_id_credentials.get import ListUserCredentials -from lakefs_client.paths.auth_users_user_id_groups.get import ListUserGroups -from lakefs_client.paths.auth_users_user_id_policies.get import ListUserPolicies -from lakefs_client.paths.auth_users.get import ListUsers -from lakefs_client.paths.auth_login.post import Login -from lakefs_client.paths.auth_password.post import UpdatePassword -from lakefs_client.paths.auth_policies_policy_id.put import UpdatePolicy - - -class AuthApi( - AddGroupMembership, - AttachPolicyToGroup, - AttachPolicyToUser, - CreateCredentials, - CreateGroup, - CreatePolicy, - CreateUser, - DeleteCredentials, - DeleteGroup, - DeleteGroupMembership, - DeletePolicy, - DeleteUser, - DetachPolicyFromGroup, - DetachPolicyFromUser, - ForgotPassword, - GetAuthCapabilities, - GetCredentials, - GetCurrentUser, - GetGroup, - GetPolicy, - GetUser, - ListGroupMembers, - ListGroupPolicies, - ListGroups, - ListPolicies, - ListUserCredentials, - ListUserGroups, - ListUserPolicies, - ListUsers, - Login, - UpdatePassword, - UpdatePolicy, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/branches_api.py b/clients/python/lakefs_client/apis/tags/branches_api.py deleted file mode 100644 index 7dd0dc10d27..00000000000 --- a/clients/python/lakefs_client/apis/tags/branches_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_branches_branch_cherry_pick.post import CherryPick -from lakefs_client.paths.repositories_repository_branches.post import CreateBranch -from lakefs_client.paths.repositories_repository_branches_branch.delete import DeleteBranch -from lakefs_client.paths.repositories_repository_branches_branch_diff.get import DiffBranch -from lakefs_client.paths.repositories_repository_branches_branch.get import GetBranch -from lakefs_client.paths.repositories_repository_branches.get import ListBranches -from lakefs_client.paths.repositories_repository_branches_branch.put import ResetBranch -from lakefs_client.paths.repositories_repository_branches_branch_revert.post import RevertBranch - - -class BranchesApi( - CherryPick, - CreateBranch, - DeleteBranch, - DiffBranch, - GetBranch, - ListBranches, - ResetBranch, - RevertBranch, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/commits_api.py b/clients/python/lakefs_client/apis/tags/commits_api.py deleted file mode 100644 index 7c0b179a921..00000000000 --- a/clients/python/lakefs_client/apis/tags/commits_api.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_branches_branch_commits.post import Commit -from lakefs_client.paths.repositories_repository_commits_commit_id.get import GetCommit -from lakefs_client.paths.repositories_repository_branches_branch_commits.get import LogBranchCommits - - -class CommitsApi( - Commit, - GetCommit, - LogBranchCommits, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/config_api.py b/clients/python/lakefs_client/apis/tags/config_api.py deleted file mode 100644 index 76900073132..00000000000 --- a/clients/python/lakefs_client/apis/tags/config_api.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.config_garbage_collection.get import GetGarbageCollectionConfig -from lakefs_client.paths.config_version.get import GetLakeFsVersion -from lakefs_client.paths.setup_lakefs.get import GetSetupState -from lakefs_client.paths.config_storage.get import GetStorageConfig -from lakefs_client.paths.setup_lakefs.post import Setup -from lakefs_client.paths.setup_comm_prefs.post import SetupCommPrefs - - -class ConfigApi( - GetGarbageCollectionConfig, - GetLakeFsVersion, - GetSetupState, - GetStorageConfig, - Setup, - SetupCommPrefs, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/experimental_api.py b/clients/python/lakefs_client/apis/tags/experimental_api.py deleted file mode 100644 index 3a8c9f796a9..00000000000 --- a/clients/python/lakefs_client/apis/tags/experimental_api.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_otf_refs_left_ref_diff_right_ref.get import OtfDiff - - -class ExperimentalApi( - OtfDiff, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/health_check_api.py b/clients/python/lakefs_client/apis/tags/health_check_api.py deleted file mode 100644 index 7491fd68481..00000000000 --- a/clients/python/lakefs_client/apis/tags/health_check_api.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.healthcheck.get import HealthCheck - - -class HealthCheckApi( - HealthCheck, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/metadata_api.py b/clients/python/lakefs_client/apis/tags/metadata_api.py deleted file mode 100644 index 94848767e70..00000000000 --- a/clients/python/lakefs_client/apis/tags/metadata_api.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_refs_branch_symlink.post import CreateSymlinkFile -from lakefs_client.paths.repositories_repository_metadata_meta_range_meta_range.get import GetMetaRange -from lakefs_client.paths.repositories_repository_metadata_range_range.get import GetRange - - -class MetadataApi( - CreateSymlinkFile, - GetMetaRange, - GetRange, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/model_import_api.py b/clients/python/lakefs_client/apis/tags/model_import_api.py deleted file mode 100644 index 20595d6bb04..00000000000 --- a/clients/python/lakefs_client/apis/tags/model_import_api.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_branches_metaranges.post import CreateMetaRange -from lakefs_client.paths.repositories_repository_branches_ranges.post import IngestRange - - -class ModelImportApi( - CreateMetaRange, - IngestRange, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/objects_api.py b/clients/python/lakefs_client/apis/tags/objects_api.py deleted file mode 100644 index 80cef76fdac..00000000000 --- a/clients/python/lakefs_client/apis/tags/objects_api.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_branches_branch_objects_copy.post import CopyObject -from lakefs_client.paths.repositories_repository_branches_branch_objects.delete import DeleteObject -from lakefs_client.paths.repositories_repository_branches_branch_objects_delete.post import DeleteObjects -from lakefs_client.paths.repositories_repository_refs_ref_objects.get import GetObject -from lakefs_client.paths.repositories_repository_refs_ref_objects_underlying_properties.get import GetUnderlyingProperties -from lakefs_client.paths.repositories_repository_refs_ref_objects.head import HeadObject -from lakefs_client.paths.repositories_repository_refs_ref_objects_ls.get import ListObjects -from lakefs_client.paths.repositories_repository_branches_branch_objects.put import StageObject -from lakefs_client.paths.repositories_repository_refs_ref_objects_stat.get import StatObject -from lakefs_client.paths.repositories_repository_branches_branch_objects.post import UploadObject - - -class ObjectsApi( - CopyObject, - DeleteObject, - DeleteObjects, - GetObject, - GetUnderlyingProperties, - HeadObject, - ListObjects, - StageObject, - StatObject, - UploadObject, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/otf_diff_api.py b/clients/python/lakefs_client/apis/tags/otf_diff_api.py deleted file mode 100644 index 72a4a5d6cef..00000000000 --- a/clients/python/lakefs_client/apis/tags/otf_diff_api.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_otf_refs_left_ref_diff_right_ref.get import OtfDiff - - -class OtfDiffApi( - OtfDiff, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/refs_api.py b/clients/python/lakefs_client/apis/tags/refs_api.py deleted file mode 100644 index b9866bc4d42..00000000000 --- a/clients/python/lakefs_client/apis/tags/refs_api.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_refs_left_ref_diff_right_ref.get import DiffRefs -from lakefs_client.paths.repositories_repository_refs_dump.put import DumpRefs -from lakefs_client.paths.repositories_repository_refs_source_ref_merge_destination_branch.get import FindMergeBase -from lakefs_client.paths.repositories_repository_refs_ref_commits.get import LogCommits -from lakefs_client.paths.repositories_repository_refs_source_ref_merge_destination_branch.post import MergeIntoBranch -from lakefs_client.paths.repositories_repository_refs_restore.put import RestoreRefs - - -class RefsApi( - DiffRefs, - DumpRefs, - FindMergeBase, - LogCommits, - MergeIntoBranch, - RestoreRefs, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/repositories_api.py b/clients/python/lakefs_client/apis/tags/repositories_api.py deleted file mode 100644 index 9e9d57718fa..00000000000 --- a/clients/python/lakefs_client/apis/tags/repositories_api.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_branch_protection.post import CreateBranchProtectionRule -from lakefs_client.paths.repositories.post import CreateRepository -from lakefs_client.paths.repositories_repository_branch_protection.delete import DeleteBranchProtectionRule -from lakefs_client.paths.repositories_repository.delete import DeleteRepository -from lakefs_client.paths.repositories_repository_branch_protection.get import GetBranchProtectionRules -from lakefs_client.paths.repositories_repository.get import GetRepository -from lakefs_client.paths.repositories.get import ListRepositories - - -class RepositoriesApi( - CreateBranchProtectionRule, - CreateRepository, - DeleteBranchProtectionRule, - DeleteRepository, - GetBranchProtectionRules, - GetRepository, - ListRepositories, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/retention_api.py b/clients/python/lakefs_client/apis/tags/retention_api.py deleted file mode 100644 index 2d32c754355..00000000000 --- a/clients/python/lakefs_client/apis/tags/retention_api.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_gc_rules.delete import DeleteGarbageCollectionRules -from lakefs_client.paths.repositories_repository_gc_rules.get import GetGarbageCollectionRules -from lakefs_client.paths.repositories_repository_gc_prepare_commits.post import PrepareGarbageCollectionCommits -from lakefs_client.paths.repositories_repository_gc_prepare_uncommited.post import PrepareGarbageCollectionUncommitted -from lakefs_client.paths.repositories_repository_gc_rules.post import SetGarbageCollectionRules - - -class RetentionApi( - DeleteGarbageCollectionRules, - GetGarbageCollectionRules, - PrepareGarbageCollectionCommits, - PrepareGarbageCollectionUncommitted, - SetGarbageCollectionRules, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/staging_api.py b/clients/python/lakefs_client/apis/tags/staging_api.py deleted file mode 100644 index c3b0d474900..00000000000 --- a/clients/python/lakefs_client/apis/tags/staging_api.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_branches_branch_staging_backing.get import GetPhysicalAddress -from lakefs_client.paths.repositories_repository_branches_branch_staging_backing.put import LinkPhysicalAddress - - -class StagingApi( - GetPhysicalAddress, - LinkPhysicalAddress, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/statistics_api.py b/clients/python/lakefs_client/apis/tags/statistics_api.py deleted file mode 100644 index 2c4bc1ac751..00000000000 --- a/clients/python/lakefs_client/apis/tags/statistics_api.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.statistics.post import PostStatsEvents - - -class StatisticsApi( - PostStatsEvents, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/tags_api.py b/clients/python/lakefs_client/apis/tags/tags_api.py deleted file mode 100644 index e056a8a88ac..00000000000 --- a/clients/python/lakefs_client/apis/tags/tags_api.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.repositories_repository_tags.post import CreateTag -from lakefs_client.paths.repositories_repository_tags_tag.delete import DeleteTag -from lakefs_client.paths.repositories_repository_tags_tag.get import GetTag -from lakefs_client.paths.repositories_repository_tags.get import ListTags - - -class TagsApi( - CreateTag, - DeleteTag, - GetTag, - ListTags, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/apis/tags/templates_api.py b/clients/python/lakefs_client/apis/tags/templates_api.py deleted file mode 100644 index fc4f9351639..00000000000 --- a/clients/python/lakefs_client/apis/tags/templates_api.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from lakefs_client.paths.templates_template_location.get import ExpandTemplate - - -class TemplatesApi( - ExpandTemplate, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/clients/python/lakefs_client/configuration.py b/clients/python/lakefs_client/configuration.py index 856efedb752..0424b5b9653 100644 --- a/clients/python/lakefs_client/configuration.py +++ b/clients/python/lakefs_client/configuration.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import copy import logging import multiprocessing @@ -23,8 +22,7 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems', - 'uniqueItems', 'maxProperties', 'minProperties', + 'minLength', 'pattern', 'maxItems', 'minItems' } class Configuration(object): @@ -76,6 +74,8 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: @@ -117,23 +117,19 @@ class Configuration(object): _default = None - def __init__( - self, - host=None, - api_key=None, - api_key_prefix=None, - username=None, - password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - ): + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + access_token=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): """Constructor """ - self._base_path = "/api/v1" if host is None else host + self._base_path = "http://localhost/api/v1" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -148,6 +144,7 @@ def __init__( """Temp file folder for downloading files """ # Authentication Settings + self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -195,7 +192,7 @@ def __init__( Set this to false to skip verifying SSL certificate when calling API from https server. """ - self.ssl_ca_cert = None + self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ self.cert_file = None @@ -413,14 +410,6 @@ def auth_settings(self): 'key': 'Authorization', 'value': self.get_basic_auth_token() } - if self.access_token is not None: - auth['jwt_token'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } if 'cookie_auth' in self.api_key: auth['cookie_auth'] = { 'type': 'api_key', @@ -430,6 +419,14 @@ def auth_settings(self): 'cookie_auth', ), } + if self.access_token is not None: + auth['jwt_token'] = { + 'type': 'bearer', + 'in': 'header', + 'format': 'JWT', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } if 'oidc_auth' in self.api_key: auth['oidc_auth'] = { 'type': 'api_key', diff --git a/clients/python/lakefs_client/exceptions.py b/clients/python/lakefs_client/exceptions.py index dbf8daf9ec6..d76a56f8708 100644 --- a/clients/python/lakefs_client/exceptions.py +++ b/clients/python/lakefs_client/exceptions.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -9,10 +7,7 @@ Contact: services@treeverse.io Generated by: https://openapi-generator.tech """ -import dataclasses -import typing -from urllib3._collections import HTTPHeaderDict class OpenApiException(Exception): @@ -102,26 +97,19 @@ def __init__(self, msg, path_to_item=None): super(ApiKeyError, self).__init__(full_msg) -T = typing.TypeVar("T") - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: str - api_response: typing.Optional[T] = None +class ApiException(OpenApiException): - @property - def body(self) -> typing.Union[str, bytes, None]: - if not self.api_response: - return None - return self.api_response.response.data - - @property - def headers(self) -> typing.Optional[HTTPHeaderDict]: - if not self.api_response: - return None - return self.api_response.response.getheaders() + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None def __str__(self): """Custom error messages for exception""" @@ -137,6 +125,30 @@ def __str__(self): return error_message +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/clients/python/lakefs_client/model/__init__.py b/clients/python/lakefs_client/model/__init__.py index a0f9b67b669..cfe32b78492 100644 --- a/clients/python/lakefs_client/model/__init__.py +++ b/clients/python/lakefs_client/model/__init__.py @@ -2,4 +2,4 @@ # reference which would not work in python2 # do not import all models into this module because that uses a lot of memory and stack frames # if you need the ability to import all models from one package, import them with -# from lakefs_client.models import ModelA, ModelB +# from {{packageName}.models import ModelA, ModelB diff --git a/clients/python/lakefs_client/model/access_key_credentials.py b/clients/python/lakefs_client/model/access_key_credentials.py index ee4e2982964..729cf31d0d7 100644 --- a/clients/python/lakefs_client/model/access_key_credentials.py +++ b/clients/python/lakefs_client/model/access_key_credentials.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,103 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class AccessKeyCredentials( - schemas.DictSchema -): +class AccessKeyCredentials(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('access_key_id',): { + 'min_length': 1, + }, + ('secret_access_key',): { + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "access_key_id", - "secret_access_key", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'access_key_id': (str,), # noqa: E501 + 'secret_access_key': (str,), # noqa: E501 } - - class properties: - - - class access_key_id( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - - class secret_access_key( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - __annotations__ = { - "access_key_id": access_key_id, - "secret_access_key": secret_access_key, - } - - access_key_id: MetaOapg.properties.access_key_id - secret_access_key: MetaOapg.properties.secret_access_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - secret_access_key: typing.Union[MetaOapg.properties.secret_access_key, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AccessKeyCredentials': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - secret_access_key=secret_access_key, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_key_id': 'access_key_id', # noqa: E501 + 'secret_access_key': 'secret_access_key', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501 + """AccessKeyCredentials - a model defined in OpenAPI + + Args: + access_key_id (str): access key ID to set for user for use in integration testing. + secret_access_key (str): secret access key to set for user for use in integration testing. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.secret_access_key = secret_access_key + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501 + """AccessKeyCredentials - a model defined in OpenAPI + + Args: + access_key_id (str): access key ID to set for user for use in integration testing. + secret_access_key (str): secret access key to set for user for use in integration testing. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.secret_access_key = secret_access_key + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/access_key_credentials.pyi b/clients/python/lakefs_client/model/access_key_credentials.pyi deleted file mode 100644 index 57323da4a9d..00000000000 --- a/clients/python/lakefs_client/model/access_key_credentials.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class AccessKeyCredentials( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "access_key_id", - "secret_access_key", - } - - class properties: - - - class access_key_id( - schemas.StrSchema - ): - pass - - - class secret_access_key( - schemas.StrSchema - ): - pass - __annotations__ = { - "access_key_id": access_key_id, - "secret_access_key": secret_access_key, - } - - access_key_id: MetaOapg.properties.access_key_id - secret_access_key: MetaOapg.properties.secret_access_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - secret_access_key: typing.Union[MetaOapg.properties.secret_access_key, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AccessKeyCredentials': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - secret_access_key=secret_access_key, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/action_run.py b/clients/python/lakefs_client/model/action_run.py index 14f41b57685..637ecad0ea1 100644 --- a/clients/python/lakefs_client/model/action_run.py +++ b/clients/python/lakefs_client/model/action_run.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,165 +8,293 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class ActionRun( - schemas.DictSchema -): +class ActionRun(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('status',): { + 'FAILED': "failed", + 'COMPLETED': "completed", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "start_time", - "event_type", - "run_id", - "branch", - "commit_id", - "status", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'run_id': (str,), # noqa: E501 + 'branch': (str,), # noqa: E501 + 'start_time': (datetime,), # noqa: E501 + 'event_type': (str,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'commit_id': (str,), # noqa: E501 + 'end_time': (datetime,), # noqa: E501 } - - class properties: - run_id = schemas.StrSchema - branch = schemas.StrSchema - start_time = schemas.DateTimeSchema - event_type = schemas.StrSchema - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "failed": "FAILED", - "completed": "COMPLETED", - } - - @schemas.classproperty - def FAILED(cls): - return cls("failed") - - @schemas.classproperty - def COMPLETED(cls): - return cls("completed") - commit_id = schemas.StrSchema - end_time = schemas.DateTimeSchema - __annotations__ = { - "run_id": run_id, - "branch": branch, - "start_time": start_time, - "event_type": event_type, - "status": status, - "commit_id": commit_id, - "end_time": end_time, - } - - start_time: MetaOapg.properties.start_time - event_type: MetaOapg.properties.event_type - run_id: MetaOapg.properties.run_id - branch: MetaOapg.properties.branch - commit_id: MetaOapg.properties.commit_id - status: MetaOapg.properties.status - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branch"]) -> MetaOapg.properties.branch: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["event_type"]) -> MetaOapg.properties.event_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["end_time"]) -> MetaOapg.properties.end_time: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["run_id", "branch", "start_time", "event_type", "status", "commit_id", "end_time", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branch"]) -> MetaOapg.properties.branch: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["event_type"]) -> MetaOapg.properties.event_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["end_time"]) -> typing.Union[MetaOapg.properties.end_time, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["run_id", "branch", "start_time", "event_type", "status", "commit_id", "end_time", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - start_time: typing.Union[MetaOapg.properties.start_time, str, datetime, ], - event_type: typing.Union[MetaOapg.properties.event_type, str, ], - run_id: typing.Union[MetaOapg.properties.run_id, str, ], - branch: typing.Union[MetaOapg.properties.branch, str, ], - commit_id: typing.Union[MetaOapg.properties.commit_id, str, ], - status: typing.Union[MetaOapg.properties.status, str, ], - end_time: typing.Union[MetaOapg.properties.end_time, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ActionRun': - return super().__new__( - cls, - *_args, - start_time=start_time, - event_type=event_type, - run_id=run_id, - branch=branch, - commit_id=commit_id, - status=status, - end_time=end_time, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'run_id': 'run_id', # noqa: E501 + 'branch': 'branch', # noqa: E501 + 'start_time': 'start_time', # noqa: E501 + 'event_type': 'event_type', # noqa: E501 + 'status': 'status', # noqa: E501 + 'commit_id': 'commit_id', # noqa: E501 + 'end_time': 'end_time', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, run_id, branch, start_time, event_type, status, commit_id, *args, **kwargs): # noqa: E501 + """ActionRun - a model defined in OpenAPI + + Args: + run_id (str): + branch (str): + start_time (datetime): + event_type (str): + status (str): + commit_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + end_time (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.run_id = run_id + self.branch = branch + self.start_time = start_time + self.event_type = event_type + self.status = status + self.commit_id = commit_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, run_id, branch, start_time, event_type, status, commit_id, *args, **kwargs): # noqa: E501 + """ActionRun - a model defined in OpenAPI + + Args: + run_id (str): + branch (str): + start_time (datetime): + event_type (str): + status (str): + commit_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + end_time (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.run_id = run_id + self.branch = branch + self.start_time = start_time + self.event_type = event_type + self.status = status + self.commit_id = commit_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/action_run.pyi b/clients/python/lakefs_client/model/action_run.pyi deleted file mode 100644 index 6fbc7bd8484..00000000000 --- a/clients/python/lakefs_client/model/action_run.pyi +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ActionRun( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "start_time", - "event_type", - "run_id", - "branch", - "commit_id", - "status", - } - - class properties: - run_id = schemas.StrSchema - branch = schemas.StrSchema - start_time = schemas.DateTimeSchema - event_type = schemas.StrSchema - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def FAILED(cls): - return cls("failed") - - @schemas.classproperty - def COMPLETED(cls): - return cls("completed") - commit_id = schemas.StrSchema - end_time = schemas.DateTimeSchema - __annotations__ = { - "run_id": run_id, - "branch": branch, - "start_time": start_time, - "event_type": event_type, - "status": status, - "commit_id": commit_id, - "end_time": end_time, - } - - start_time: MetaOapg.properties.start_time - event_type: MetaOapg.properties.event_type - run_id: MetaOapg.properties.run_id - branch: MetaOapg.properties.branch - commit_id: MetaOapg.properties.commit_id - status: MetaOapg.properties.status - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branch"]) -> MetaOapg.properties.branch: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["event_type"]) -> MetaOapg.properties.event_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["end_time"]) -> MetaOapg.properties.end_time: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["run_id", "branch", "start_time", "event_type", "status", "commit_id", "end_time", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branch"]) -> MetaOapg.properties.branch: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["event_type"]) -> MetaOapg.properties.event_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["end_time"]) -> typing.Union[MetaOapg.properties.end_time, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["run_id", "branch", "start_time", "event_type", "status", "commit_id", "end_time", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - start_time: typing.Union[MetaOapg.properties.start_time, str, datetime, ], - event_type: typing.Union[MetaOapg.properties.event_type, str, ], - run_id: typing.Union[MetaOapg.properties.run_id, str, ], - branch: typing.Union[MetaOapg.properties.branch, str, ], - commit_id: typing.Union[MetaOapg.properties.commit_id, str, ], - status: typing.Union[MetaOapg.properties.status, str, ], - end_time: typing.Union[MetaOapg.properties.end_time, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ActionRun': - return super().__new__( - cls, - *_args, - start_time=start_time, - event_type=event_type, - run_id=run_id, - branch=branch, - commit_id=commit_id, - status=status, - end_time=end_time, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/action_run_list.py b/clients/python/lakefs_client/model/action_run_list.py index 07e02df4ea3..b7b7aa69243 100644 --- a/clients/python/lakefs_client/model/action_run_list.py +++ b/clients/python/lakefs_client/model/action_run_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.action_run import ActionRun + from lakefs_client.model.pagination import Pagination + globals()['ActionRun'] = ActionRun + globals()['Pagination'] = Pagination -class ActionRunList( - schemas.DictSchema -): + +class ActionRunList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([ActionRun],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ActionRun']: - return ActionRun - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ActionRun'], typing.List['ActionRun']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ActionRun': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ActionRunList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.action_run import ActionRun -from lakefs_client.model.pagination import Pagination + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """ActionRunList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([ActionRun]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """ActionRunList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([ActionRun]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/action_run_list.pyi b/clients/python/lakefs_client/model/action_run_list.pyi deleted file mode 100644 index 07e02df4ea3..00000000000 --- a/clients/python/lakefs_client/model/action_run_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ActionRunList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ActionRun']: - return ActionRun - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ActionRun'], typing.List['ActionRun']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ActionRun': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ActionRunList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.action_run import ActionRun -from lakefs_client.model.pagination import Pagination diff --git a/clients/python/lakefs_client/model/auth_capabilities.py b/clients/python/lakefs_client/model/auth_capabilities.py index 80d505deaa3..aed57522ca0 100644 --- a/clients/python/lakefs_client/model/auth_capabilities.py +++ b/clients/python/lakefs_client/model/auth_capabilities.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,80 +8,253 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class AuthCapabilities( - schemas.DictSchema -): +class AuthCapabilities(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'invite_user': (bool,), # noqa: E501 + 'forgot_password': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'invite_user': 'invite_user', # noqa: E501 + 'forgot_password': 'forgot_password', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AuthCapabilities - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_user (bool): [optional] # noqa: E501 + forgot_password (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """AuthCapabilities - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_user (bool): [optional] # noqa: E501 + forgot_password (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - invite_user = schemas.BoolSchema - forgot_password = schemas.BoolSchema - __annotations__ = { - "invite_user": invite_user, - "forgot_password": forgot_password, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invite_user"]) -> MetaOapg.properties.invite_user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["forgot_password"]) -> MetaOapg.properties.forgot_password: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["invite_user", "forgot_password", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invite_user"]) -> typing.Union[MetaOapg.properties.invite_user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["forgot_password"]) -> typing.Union[MetaOapg.properties.forgot_password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["invite_user", "forgot_password", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - invite_user: typing.Union[MetaOapg.properties.invite_user, bool, schemas.Unset] = schemas.unset, - forgot_password: typing.Union[MetaOapg.properties.forgot_password, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AuthCapabilities': - return super().__new__( - cls, - *_args, - invite_user=invite_user, - forgot_password=forgot_password, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/auth_capabilities.pyi b/clients/python/lakefs_client/model/auth_capabilities.pyi deleted file mode 100644 index 80d505deaa3..00000000000 --- a/clients/python/lakefs_client/model/auth_capabilities.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class AuthCapabilities( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - invite_user = schemas.BoolSchema - forgot_password = schemas.BoolSchema - __annotations__ = { - "invite_user": invite_user, - "forgot_password": forgot_password, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invite_user"]) -> MetaOapg.properties.invite_user: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["forgot_password"]) -> MetaOapg.properties.forgot_password: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["invite_user", "forgot_password", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invite_user"]) -> typing.Union[MetaOapg.properties.invite_user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["forgot_password"]) -> typing.Union[MetaOapg.properties.forgot_password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["invite_user", "forgot_password", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - invite_user: typing.Union[MetaOapg.properties.invite_user, bool, schemas.Unset] = schemas.unset, - forgot_password: typing.Union[MetaOapg.properties.forgot_password, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AuthCapabilities': - return super().__new__( - cls, - *_args, - invite_user=invite_user, - forgot_password=forgot_password, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/authentication_token.py b/clients/python/lakefs_client/model/authentication_token.py index 73acbc12cf3..e5f0c94b1ed 100644 --- a/clients/python/lakefs_client/model/authentication_token.py +++ b/clients/python/lakefs_client/model/authentication_token.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,85 +8,259 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class AuthenticationToken( - schemas.DictSchema -): +class AuthenticationToken(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "token", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'token': (str,), # noqa: E501 + 'token_expiration': (int,), # noqa: E501 } - - class properties: - token = schemas.StrSchema - token_expiration = schemas.Int64Schema - __annotations__ = { - "token": token, - "token_expiration": token_expiration, - } - - token: MetaOapg.properties.token - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token_expiration"]) -> MetaOapg.properties.token_expiration: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "token_expiration", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token_expiration"]) -> typing.Union[MetaOapg.properties.token_expiration, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "token_expiration", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - token: typing.Union[MetaOapg.properties.token, str, ], - token_expiration: typing.Union[MetaOapg.properties.token_expiration, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AuthenticationToken': - return super().__new__( - cls, - *_args, - token=token, - token_expiration=token_expiration, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'token': 'token', # noqa: E501 + 'token_expiration': 'token_expiration', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, token, *args, **kwargs): # noqa: E501 + """AuthenticationToken - a model defined in OpenAPI + + Args: + token (str): a JWT token that could be used to authenticate requests + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token_expiration (int): Unix Epoch in seconds. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.token = token + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, token, *args, **kwargs): # noqa: E501 + """AuthenticationToken - a model defined in OpenAPI + + Args: + token (str): a JWT token that could be used to authenticate requests + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + token_expiration (int): Unix Epoch in seconds. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.token = token + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/authentication_token.pyi b/clients/python/lakefs_client/model/authentication_token.pyi deleted file mode 100644 index 73acbc12cf3..00000000000 --- a/clients/python/lakefs_client/model/authentication_token.pyi +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class AuthenticationToken( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "token", - } - - class properties: - token = schemas.StrSchema - token_expiration = schemas.Int64Schema - __annotations__ = { - "token": token, - "token_expiration": token_expiration, - } - - token: MetaOapg.properties.token - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token_expiration"]) -> MetaOapg.properties.token_expiration: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "token_expiration", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token_expiration"]) -> typing.Union[MetaOapg.properties.token_expiration, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "token_expiration", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - token: typing.Union[MetaOapg.properties.token, str, ], - token_expiration: typing.Union[MetaOapg.properties.token_expiration, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AuthenticationToken': - return super().__new__( - cls, - *_args, - token=token, - token_expiration=token_expiration, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/branch_creation.py b/clients/python/lakefs_client/model/branch_creation.py index 49012472d7c..e1f9084fbad 100644 --- a/clients/python/lakefs_client/model/branch_creation.py +++ b/clients/python/lakefs_client/model/branch_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class BranchCreation( - schemas.DictSchema -): +class BranchCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "name", - "source", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'source': (str,), # noqa: E501 } - - class properties: - name = schemas.StrSchema - source = schemas.StrSchema - __annotations__ = { - "name": name, - "source": source, - } - - name: MetaOapg.properties.name - source: MetaOapg.properties.source - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "source", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "source", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - source: typing.Union[MetaOapg.properties.source, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BranchCreation': - return super().__new__( - cls, - *_args, - name=name, - source=source, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, source, *args, **kwargs): # noqa: E501 + """BranchCreation - a model defined in OpenAPI + + Args: + name (str): + source (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.source = source + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, source, *args, **kwargs): # noqa: E501 + """BranchCreation - a model defined in OpenAPI + + Args: + name (str): + source (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.source = source + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/branch_creation.pyi b/clients/python/lakefs_client/model/branch_creation.pyi deleted file mode 100644 index 49012472d7c..00000000000 --- a/clients/python/lakefs_client/model/branch_creation.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class BranchCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "name", - "source", - } - - class properties: - name = schemas.StrSchema - source = schemas.StrSchema - __annotations__ = { - "name": name, - "source": source, - } - - name: MetaOapg.properties.name - source: MetaOapg.properties.source - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "source", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> MetaOapg.properties.source: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "source", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - source: typing.Union[MetaOapg.properties.source, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BranchCreation': - return super().__new__( - cls, - *_args, - name=name, - source=source, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/branch_protection_rule.py b/clients/python/lakefs_client/model/branch_protection_rule.py index 0352edabb72..496cdf9deb5 100644 --- a/clients/python/lakefs_client/model/branch_protection_rule.py +++ b/clients/python/lakefs_client/model/branch_protection_rule.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,83 +8,258 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class BranchProtectionRule( - schemas.DictSchema -): +class BranchProtectionRule(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('pattern',): { + 'min_length': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pattern", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pattern': (str,), # noqa: E501 } - - class properties: - - - class pattern( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - __annotations__ = { - "pattern": pattern, - } - - pattern: MetaOapg.properties.pattern - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pattern: typing.Union[MetaOapg.properties.pattern, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BranchProtectionRule': - return super().__new__( - cls, - *_args, - pattern=pattern, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pattern': 'pattern', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pattern, *args, **kwargs): # noqa: E501 + """BranchProtectionRule - a model defined in OpenAPI + + Args: + pattern (str): fnmatch pattern for the branch name, supporting * and ? wildcards + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pattern = pattern + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pattern, *args, **kwargs): # noqa: E501 + """BranchProtectionRule - a model defined in OpenAPI + + Args: + pattern (str): fnmatch pattern for the branch name, supporting * and ? wildcards + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pattern = pattern + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/branch_protection_rule.pyi b/clients/python/lakefs_client/model/branch_protection_rule.pyi deleted file mode 100644 index 9040f776f1c..00000000000 --- a/clients/python/lakefs_client/model/branch_protection_rule.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class BranchProtectionRule( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pattern", - } - - class properties: - - - class pattern( - schemas.StrSchema - ): - pass - __annotations__ = { - "pattern": pattern, - } - - pattern: MetaOapg.properties.pattern - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pattern: typing.Union[MetaOapg.properties.pattern, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BranchProtectionRule': - return super().__new__( - cls, - *_args, - pattern=pattern, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/cherry_pick_creation.py b/clients/python/lakefs_client/model/cherry_pick_creation.py index 4c0d342ba18..57e83eb750f 100644 --- a/clients/python/lakefs_client/model/cherry_pick_creation.py +++ b/clients/python/lakefs_client/model/cherry_pick_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,85 +8,259 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class CherryPickCreation( - schemas.DictSchema -): +class CherryPickCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "ref", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'ref': (str,), # noqa: E501 + 'parent_number': (int,), # noqa: E501 } - - class properties: - ref = schemas.StrSchema - parent_number = schemas.IntSchema - __annotations__ = { - "ref": ref, - "parent_number": parent_number, - } - - ref: MetaOapg.properties.ref - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent_number"]) -> MetaOapg.properties.parent_number: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent_number"]) -> typing.Union[MetaOapg.properties.parent_number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ref: typing.Union[MetaOapg.properties.ref, str, ], - parent_number: typing.Union[MetaOapg.properties.parent_number, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CherryPickCreation': - return super().__new__( - cls, - *_args, - ref=ref, - parent_number=parent_number, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ref': 'ref', # noqa: E501 + 'parent_number': 'parent_number', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, ref, *args, **kwargs): # noqa: E501 + """CherryPickCreation - a model defined in OpenAPI + + Args: + ref (str): the commit to cherry-pick, given by a ref + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + parent_number (int): when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. The destination branch is parent 1, which is the default behaviour. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.ref = ref + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, ref, *args, **kwargs): # noqa: E501 + """CherryPickCreation - a model defined in OpenAPI + + Args: + ref (str): the commit to cherry-pick, given by a ref + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + parent_number (int): when cherry-picking a merge commit, the parent number (starting from 1) relative to which to perform the diff. The destination branch is parent 1, which is the default behaviour. . [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.ref = ref + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/cherry_pick_creation.pyi b/clients/python/lakefs_client/model/cherry_pick_creation.pyi deleted file mode 100644 index 4c0d342ba18..00000000000 --- a/clients/python/lakefs_client/model/cherry_pick_creation.pyi +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class CherryPickCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "ref", - } - - class properties: - ref = schemas.StrSchema - parent_number = schemas.IntSchema - __annotations__ = { - "ref": ref, - "parent_number": parent_number, - } - - ref: MetaOapg.properties.ref - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent_number"]) -> MetaOapg.properties.parent_number: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent_number"]) -> typing.Union[MetaOapg.properties.parent_number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ref: typing.Union[MetaOapg.properties.ref, str, ], - parent_number: typing.Union[MetaOapg.properties.parent_number, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CherryPickCreation': - return super().__new__( - cls, - *_args, - ref=ref, - parent_number=parent_number, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/comm_prefs_input.py b/clients/python/lakefs_client/model/comm_prefs_input.py index b1a877b3eca..43e7f337d70 100644 --- a/clients/python/lakefs_client/model/comm_prefs_input.py +++ b/clients/python/lakefs_client/model/comm_prefs_input.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,97 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class CommPrefsInput( - schemas.DictSchema -): +class CommPrefsInput(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "featureUpdates", - "securityUpdates", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'feature_updates': (bool,), # noqa: E501 + 'security_updates': (bool,), # noqa: E501 + 'email': (str,), # noqa: E501 } - - class properties: - featureUpdates = schemas.BoolSchema - securityUpdates = schemas.BoolSchema - email = schemas.StrSchema - __annotations__ = { - "featureUpdates": featureUpdates, - "securityUpdates": securityUpdates, - "email": email, - } - - featureUpdates: MetaOapg.properties.featureUpdates - securityUpdates: MetaOapg.properties.securityUpdates - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["featureUpdates"]) -> MetaOapg.properties.featureUpdates: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["securityUpdates"]) -> MetaOapg.properties.securityUpdates: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["featureUpdates", "securityUpdates", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["featureUpdates"]) -> MetaOapg.properties.featureUpdates: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["securityUpdates"]) -> MetaOapg.properties.securityUpdates: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["featureUpdates", "securityUpdates", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - featureUpdates: typing.Union[MetaOapg.properties.featureUpdates, bool, ], - securityUpdates: typing.Union[MetaOapg.properties.securityUpdates, bool, ], - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CommPrefsInput': - return super().__new__( - cls, - *_args, - featureUpdates=featureUpdates, - securityUpdates=securityUpdates, - email=email, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'feature_updates': 'featureUpdates', # noqa: E501 + 'security_updates': 'securityUpdates', # noqa: E501 + 'email': 'email', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, feature_updates, security_updates, *args, **kwargs): # noqa: E501 + """CommPrefsInput - a model defined in OpenAPI + + Args: + feature_updates (bool): was \"feature updates\" checked + security_updates (bool): was \"security updates\" checked + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): the provided email. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.feature_updates = feature_updates + self.security_updates = security_updates + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, feature_updates, security_updates, *args, **kwargs): # noqa: E501 + """CommPrefsInput - a model defined in OpenAPI + + Args: + feature_updates (bool): was \"feature updates\" checked + security_updates (bool): was \"security updates\" checked + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): the provided email. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.feature_updates = feature_updates + self.security_updates = security_updates + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/comm_prefs_input.pyi b/clients/python/lakefs_client/model/comm_prefs_input.pyi deleted file mode 100644 index b1a877b3eca..00000000000 --- a/clients/python/lakefs_client/model/comm_prefs_input.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class CommPrefsInput( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "featureUpdates", - "securityUpdates", - } - - class properties: - featureUpdates = schemas.BoolSchema - securityUpdates = schemas.BoolSchema - email = schemas.StrSchema - __annotations__ = { - "featureUpdates": featureUpdates, - "securityUpdates": securityUpdates, - "email": email, - } - - featureUpdates: MetaOapg.properties.featureUpdates - securityUpdates: MetaOapg.properties.securityUpdates - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["featureUpdates"]) -> MetaOapg.properties.featureUpdates: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["securityUpdates"]) -> MetaOapg.properties.securityUpdates: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["featureUpdates", "securityUpdates", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["featureUpdates"]) -> MetaOapg.properties.featureUpdates: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["securityUpdates"]) -> MetaOapg.properties.securityUpdates: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["featureUpdates", "securityUpdates", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - featureUpdates: typing.Union[MetaOapg.properties.featureUpdates, bool, ], - securityUpdates: typing.Union[MetaOapg.properties.securityUpdates, bool, ], - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CommPrefsInput': - return super().__new__( - cls, - *_args, - featureUpdates=featureUpdates, - securityUpdates=securityUpdates, - email=email, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/commit.py b/clients/python/lakefs_client/model/commit.py index 93e2653dff3..7d83d6e45b4 100644 --- a/clients/python/lakefs_client/model/commit.py +++ b/clients/python/lakefs_client/model/commit.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,195 +8,289 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Commit( - schemas.DictSchema -): +class Commit(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "committer", - "creation_date", - "id", - "meta_range_id", - "message", - "parents", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'parents': ([str],), # noqa: E501 + 'committer': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'creation_date': (int,), # noqa: E501 + 'meta_range_id': (str,), # noqa: E501 + 'metadata': ({str: (str,)},), # noqa: E501 } - - class properties: - id = schemas.StrSchema - - - class parents( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'parents': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - committer = schemas.StrSchema - message = schemas.StrSchema - creation_date = schemas.Int64Schema - meta_range_id = schemas.StrSchema - - - class metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "id": id, - "parents": parents, - "committer": committer, - "message": message, - "creation_date": creation_date, - "meta_range_id": meta_range_id, - "metadata": metadata, - } - - committer: MetaOapg.properties.committer - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - meta_range_id: MetaOapg.properties.meta_range_id - message: MetaOapg.properties.message - parents: MetaOapg.properties.parents - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parents"]) -> MetaOapg.properties.parents: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["committer"]) -> MetaOapg.properties.committer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["meta_range_id"]) -> MetaOapg.properties.meta_range_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "parents", "committer", "message", "creation_date", "meta_range_id", "metadata", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parents"]) -> MetaOapg.properties.parents: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["committer"]) -> MetaOapg.properties.committer: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["meta_range_id"]) -> MetaOapg.properties.meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "parents", "committer", "message", "creation_date", "meta_range_id", "metadata", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - committer: typing.Union[MetaOapg.properties.committer, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - meta_range_id: typing.Union[MetaOapg.properties.meta_range_id, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - parents: typing.Union[MetaOapg.properties.parents, list, tuple, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Commit': - return super().__new__( - cls, - *_args, - committer=committer, - creation_date=creation_date, - id=id, - meta_range_id=meta_range_id, - message=message, - parents=parents, - metadata=metadata, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'parents': 'parents', # noqa: E501 + 'committer': 'committer', # noqa: E501 + 'message': 'message', # noqa: E501 + 'creation_date': 'creation_date', # noqa: E501 + 'meta_range_id': 'meta_range_id', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, parents, committer, message, creation_date, meta_range_id, *args, **kwargs): # noqa: E501 + """Commit - a model defined in OpenAPI + + Args: + id (str): + parents ([str]): + committer (str): + message (str): + creation_date (int): Unix Epoch in seconds + meta_range_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + metadata ({str: (str,)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.parents = parents + self.committer = committer + self.message = message + self.creation_date = creation_date + self.meta_range_id = meta_range_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, parents, committer, message, creation_date, meta_range_id, *args, **kwargs): # noqa: E501 + """Commit - a model defined in OpenAPI + + Args: + id (str): + parents ([str]): + committer (str): + message (str): + creation_date (int): Unix Epoch in seconds + meta_range_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + metadata ({str: (str,)}): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.parents = parents + self.committer = committer + self.message = message + self.creation_date = creation_date + self.meta_range_id = meta_range_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/commit.pyi b/clients/python/lakefs_client/model/commit.pyi deleted file mode 100644 index 93e2653dff3..00000000000 --- a/clients/python/lakefs_client/model/commit.pyi +++ /dev/null @@ -1,204 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Commit( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "committer", - "creation_date", - "id", - "meta_range_id", - "message", - "parents", - } - - class properties: - id = schemas.StrSchema - - - class parents( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'parents': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - committer = schemas.StrSchema - message = schemas.StrSchema - creation_date = schemas.Int64Schema - meta_range_id = schemas.StrSchema - - - class metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "id": id, - "parents": parents, - "committer": committer, - "message": message, - "creation_date": creation_date, - "meta_range_id": meta_range_id, - "metadata": metadata, - } - - committer: MetaOapg.properties.committer - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - meta_range_id: MetaOapg.properties.meta_range_id - message: MetaOapg.properties.message - parents: MetaOapg.properties.parents - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parents"]) -> MetaOapg.properties.parents: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["committer"]) -> MetaOapg.properties.committer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["meta_range_id"]) -> MetaOapg.properties.meta_range_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "parents", "committer", "message", "creation_date", "meta_range_id", "metadata", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parents"]) -> MetaOapg.properties.parents: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["committer"]) -> MetaOapg.properties.committer: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["meta_range_id"]) -> MetaOapg.properties.meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "parents", "committer", "message", "creation_date", "meta_range_id", "metadata", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - committer: typing.Union[MetaOapg.properties.committer, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - meta_range_id: typing.Union[MetaOapg.properties.meta_range_id, str, ], - message: typing.Union[MetaOapg.properties.message, str, ], - parents: typing.Union[MetaOapg.properties.parents, list, tuple, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Commit': - return super().__new__( - cls, - *_args, - committer=committer, - creation_date=creation_date, - id=id, - meta_range_id=meta_range_id, - message=message, - parents=parents, - metadata=metadata, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/commit_creation.py b/clients/python/lakefs_client/model/commit_creation.py index eca57fc9284..6528bed50a2 100644 --- a/clients/python/lakefs_client/model/commit_creation.py +++ b/clients/python/lakefs_client/model/commit_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,123 +8,263 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class CommitCreation( - schemas.DictSchema -): +class CommitCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "message", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'message': (str,), # noqa: E501 + 'metadata': ({str: (str,)},), # noqa: E501 + 'date': (int,), # noqa: E501 } - - class properties: - message = schemas.StrSchema - - - class metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - date = schemas.Int64Schema - __annotations__ = { - "message": message, - "metadata": metadata, - "date": date, - } - - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - message: typing.Union[MetaOapg.properties.message, str, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CommitCreation': - return super().__new__( - cls, - *_args, - message=message, - metadata=metadata, - date=date, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'message': 'message', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'date': 'date', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 + """CommitCreation - a model defined in OpenAPI + + Args: + message (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + metadata ({str: (str,)}): [optional] # noqa: E501 + date (int): set date to override creation date in the commit (Unix Epoch in seconds). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, message, *args, **kwargs): # noqa: E501 + """CommitCreation - a model defined in OpenAPI + + Args: + message (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + metadata ({str: (str,)}): [optional] # noqa: E501 + date (int): set date to override creation date in the commit (Unix Epoch in seconds). [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/commit_creation.pyi b/clients/python/lakefs_client/model/commit_creation.pyi deleted file mode 100644 index eca57fc9284..00000000000 --- a/clients/python/lakefs_client/model/commit_creation.pyi +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class CommitCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "message", - } - - class properties: - message = schemas.StrSchema - - - class metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - date = schemas.Int64Schema - __annotations__ = { - "message": message, - "metadata": metadata, - "date": date, - } - - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - message: typing.Union[MetaOapg.properties.message, str, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CommitCreation': - return super().__new__( - cls, - *_args, - message=message, - metadata=metadata, - date=date, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/commit_list.py b/clients/python/lakefs_client/model/commit_list.py index dc02916279e..2e00d958950 100644 --- a/clients/python/lakefs_client/model/commit_list.py +++ b/clients/python/lakefs_client/model/commit_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.commit import Commit + from lakefs_client.model.pagination import Pagination + globals()['Commit'] = Commit + globals()['Pagination'] = Pagination -class CommitList( - schemas.DictSchema -): + +class CommitList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([Commit],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Commit']: - return Commit - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Commit'], typing.List['Commit']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Commit': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CommitList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.commit import Commit -from lakefs_client.model.pagination import Pagination + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """CommitList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Commit]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """CommitList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Commit]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/commit_list.pyi b/clients/python/lakefs_client/model/commit_list.pyi deleted file mode 100644 index dc02916279e..00000000000 --- a/clients/python/lakefs_client/model/commit_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class CommitList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Commit']: - return Commit - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Commit'], typing.List['Commit']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Commit': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CommitList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.commit import Commit -from lakefs_client.model.pagination import Pagination diff --git a/clients/python/lakefs_client/model/credentials.py b/clients/python/lakefs_client/model/credentials.py index 8f8c05fa718..8f6f83926e7 100644 --- a/clients/python/lakefs_client/model/credentials.py +++ b/clients/python/lakefs_client/model/credentials.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Credentials( - schemas.DictSchema -): +class Credentials(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "access_key_id", - "creation_date", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'access_key_id': (str,), # noqa: E501 + 'creation_date': (int,), # noqa: E501 } - - class properties: - access_key_id = schemas.StrSchema - creation_date = schemas.Int64Schema - __annotations__ = { - "access_key_id": access_key_id, - "creation_date": creation_date, - } - - access_key_id: MetaOapg.properties.access_key_id - creation_date: MetaOapg.properties.creation_date - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Credentials': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - creation_date=creation_date, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_key_id': 'access_key_id', # noqa: E501 + 'creation_date': 'creation_date', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, access_key_id, creation_date, *args, **kwargs): # noqa: E501 + """Credentials - a model defined in OpenAPI + + Args: + access_key_id (str): + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, access_key_id, creation_date, *args, **kwargs): # noqa: E501 + """Credentials - a model defined in OpenAPI + + Args: + access_key_id (str): + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/credentials.pyi b/clients/python/lakefs_client/model/credentials.pyi deleted file mode 100644 index 8f8c05fa718..00000000000 --- a/clients/python/lakefs_client/model/credentials.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Credentials( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "access_key_id", - "creation_date", - } - - class properties: - access_key_id = schemas.StrSchema - creation_date = schemas.Int64Schema - __annotations__ = { - "access_key_id": access_key_id, - "creation_date": creation_date, - } - - access_key_id: MetaOapg.properties.access_key_id - creation_date: MetaOapg.properties.creation_date - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Credentials': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - creation_date=creation_date, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/credentials_list.py b/clients/python/lakefs_client/model/credentials_list.py index b852f496033..ee8041a82d6 100644 --- a/clients/python/lakefs_client/model/credentials_list.py +++ b/clients/python/lakefs_client/model/credentials_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.credentials import Credentials + from lakefs_client.model.pagination import Pagination + globals()['Credentials'] = Credentials + globals()['Pagination'] = Pagination -class CredentialsList( - schemas.DictSchema -): + +class CredentialsList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([Credentials],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Credentials']: - return Credentials - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Credentials'], typing.List['Credentials']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Credentials': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CredentialsList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.credentials import Credentials -from lakefs_client.model.pagination import Pagination + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """CredentialsList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Credentials]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """CredentialsList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Credentials]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/credentials_list.pyi b/clients/python/lakefs_client/model/credentials_list.pyi deleted file mode 100644 index b852f496033..00000000000 --- a/clients/python/lakefs_client/model/credentials_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class CredentialsList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Credentials']: - return Credentials - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Credentials'], typing.List['Credentials']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Credentials': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CredentialsList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.credentials import Credentials -from lakefs_client.model.pagination import Pagination diff --git a/clients/python/lakefs_client/model/credentials_with_secret.py b/clients/python/lakefs_client/model/credentials_with_secret.py index ae62259d735..9107f585eaa 100644 --- a/clients/python/lakefs_client/model/credentials_with_secret.py +++ b/clients/python/lakefs_client/model/credentials_with_secret.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,99 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class CredentialsWithSecret( - schemas.DictSchema -): +class CredentialsWithSecret(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "access_key_id", - "secret_access_key", - "creation_date", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'access_key_id': (str,), # noqa: E501 + 'secret_access_key': (str,), # noqa: E501 + 'creation_date': (int,), # noqa: E501 } - - class properties: - access_key_id = schemas.StrSchema - secret_access_key = schemas.StrSchema - creation_date = schemas.Int64Schema - __annotations__ = { - "access_key_id": access_key_id, - "secret_access_key": secret_access_key, - "creation_date": creation_date, - } - - access_key_id: MetaOapg.properties.access_key_id - secret_access_key: MetaOapg.properties.secret_access_key - creation_date: MetaOapg.properties.creation_date - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - secret_access_key: typing.Union[MetaOapg.properties.secret_access_key, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CredentialsWithSecret': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - secret_access_key=secret_access_key, - creation_date=creation_date, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_key_id': 'access_key_id', # noqa: E501 + 'secret_access_key': 'secret_access_key', # noqa: E501 + 'creation_date': 'creation_date', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, access_key_id, secret_access_key, creation_date, *args, **kwargs): # noqa: E501 + """CredentialsWithSecret - a model defined in OpenAPI + + Args: + access_key_id (str): + secret_access_key (str): + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.secret_access_key = secret_access_key + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, access_key_id, secret_access_key, creation_date, *args, **kwargs): # noqa: E501 + """CredentialsWithSecret - a model defined in OpenAPI + + Args: + access_key_id (str): + secret_access_key (str): + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.secret_access_key = secret_access_key + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/credentials_with_secret.pyi b/clients/python/lakefs_client/model/credentials_with_secret.pyi deleted file mode 100644 index ae62259d735..00000000000 --- a/clients/python/lakefs_client/model/credentials_with_secret.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class CredentialsWithSecret( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "access_key_id", - "secret_access_key", - "creation_date", - } - - class properties: - access_key_id = schemas.StrSchema - secret_access_key = schemas.StrSchema - creation_date = schemas.Int64Schema - __annotations__ = { - "access_key_id": access_key_id, - "secret_access_key": secret_access_key, - "creation_date": creation_date, - } - - access_key_id: MetaOapg.properties.access_key_id - secret_access_key: MetaOapg.properties.secret_access_key - creation_date: MetaOapg.properties.creation_date - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - secret_access_key: typing.Union[MetaOapg.properties.secret_access_key, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CredentialsWithSecret': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - secret_access_key=secret_access_key, - creation_date=creation_date, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/current_user.py b/clients/python/lakefs_client/model/current_user.py index d274ebfac0a..e7cb0eee2ff 100644 --- a/clients/python/lakefs_client/model/current_user.py +++ b/clients/python/lakefs_client/model/current_user.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,80 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.user import User + globals()['User'] = User -class CurrentUser( - schemas.DictSchema -): + +class CurrentUser(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "user", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'user': (User,), # noqa: E501 } - - class properties: - - @staticmethod - def user() -> typing.Type['User']: - return User - __annotations__ = { - "user": user, - } - - user: 'User' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'User': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["user", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> 'User': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["user", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - user: 'User', - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CurrentUser': - return super().__new__( - cls, - *_args, - user=user, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.user import User + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'user': 'user', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, user, *args, **kwargs): # noqa: E501 + """CurrentUser - a model defined in OpenAPI + + Args: + user (User): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.user = user + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, user, *args, **kwargs): # noqa: E501 + """CurrentUser - a model defined in OpenAPI + + Args: + user (User): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.user = user + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/current_user.pyi b/clients/python/lakefs_client/model/current_user.pyi deleted file mode 100644 index d274ebfac0a..00000000000 --- a/clients/python/lakefs_client/model/current_user.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class CurrentUser( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "user", - } - - class properties: - - @staticmethod - def user() -> typing.Type['User']: - return User - __annotations__ = { - "user": user, - } - - user: 'User' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user"]) -> 'User': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["user", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user"]) -> 'User': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["user", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - user: 'User', - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CurrentUser': - return super().__new__( - cls, - *_args, - user=user, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.user import User diff --git a/clients/python/lakefs_client/model/diff.py b/clients/python/lakefs_client/model/diff.py index 6f4e086ae13..6daaa6b5a53 100644 --- a/clients/python/lakefs_client/model/diff.py +++ b/clients/python/lakefs_client/model/diff.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,164 +8,282 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Diff( - schemas.DictSchema -): +class Diff(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'ADDED': "added", + 'REMOVED': "removed", + 'CHANGED': "changed", + 'CONFLICT': "conflict", + 'PREFIX_CHANGED': "prefix_changed", + }, + ('path_type',): { + 'COMMON_PREFIX': "common_prefix", + 'OBJECT': "object", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "path", - "path_type", - "type", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'path': (str,), # noqa: E501 + 'path_type': (str,), # noqa: E501 + 'size_bytes': (int,), # noqa: E501 } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "added": "ADDED", - "removed": "REMOVED", - "changed": "CHANGED", - "conflict": "CONFLICT", - "prefix_changed": "PREFIX_CHANGED", - } - - @schemas.classproperty - def ADDED(cls): - return cls("added") - - @schemas.classproperty - def REMOVED(cls): - return cls("removed") - - @schemas.classproperty - def CHANGED(cls): - return cls("changed") - - @schemas.classproperty - def CONFLICT(cls): - return cls("conflict") - - @schemas.classproperty - def PREFIX_CHANGED(cls): - return cls("prefix_changed") - path = schemas.StrSchema - - - class path_type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "common_prefix": "COMMON_PREFIX", - "object": "OBJECT", - } - - @schemas.classproperty - def COMMON_PREFIX(cls): - return cls("common_prefix") - - @schemas.classproperty - def OBJECT(cls): - return cls("object") - size_bytes = schemas.Int64Schema - __annotations__ = { - "type": type, - "path": path, - "path_type": path_type, - "size_bytes": size_bytes, - } - - path: MetaOapg.properties.path - path_type: MetaOapg.properties.path_type - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "path", "path_type", "size_bytes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> typing.Union[MetaOapg.properties.size_bytes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "path", "path_type", "size_bytes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - path: typing.Union[MetaOapg.properties.path, str, ], - path_type: typing.Union[MetaOapg.properties.path_type, str, ], - type: typing.Union[MetaOapg.properties.type, str, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Diff': - return super().__new__( - cls, - *_args, - path=path, - path_type=path_type, - type=type, - size_bytes=size_bytes, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'path': 'path', # noqa: E501 + 'path_type': 'path_type', # noqa: E501 + 'size_bytes': 'size_bytes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, path, path_type, *args, **kwargs): # noqa: E501 + """Diff - a model defined in OpenAPI + + Args: + type (str): + path (str): + path_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + size_bytes (int): represents the size of the added/changed/deleted entry. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.path = path + self.path_type = path_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, path, path_type, *args, **kwargs): # noqa: E501 + """Diff - a model defined in OpenAPI + + Args: + type (str): + path (str): + path_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + size_bytes (int): represents the size of the added/changed/deleted entry. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.path = path + self.path_type = path_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/diff.pyi b/clients/python/lakefs_client/model/diff.pyi deleted file mode 100644 index 886af01080e..00000000000 --- a/clients/python/lakefs_client/model/diff.pyi +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Diff( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "path", - "path_type", - "type", - } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def ADDED(cls): - return cls("added") - - @schemas.classproperty - def REMOVED(cls): - return cls("removed") - - @schemas.classproperty - def CHANGED(cls): - return cls("changed") - - @schemas.classproperty - def CONFLICT(cls): - return cls("conflict") - - @schemas.classproperty - def PREFIX_CHANGED(cls): - return cls("prefix_changed") - path = schemas.StrSchema - - - class path_type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def COMMON_PREFIX(cls): - return cls("common_prefix") - - @schemas.classproperty - def OBJECT(cls): - return cls("object") - size_bytes = schemas.Int64Schema - __annotations__ = { - "type": type, - "path": path, - "path_type": path_type, - "size_bytes": size_bytes, - } - - path: MetaOapg.properties.path - path_type: MetaOapg.properties.path_type - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "path", "path_type", "size_bytes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> typing.Union[MetaOapg.properties.size_bytes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "path", "path_type", "size_bytes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - path: typing.Union[MetaOapg.properties.path, str, ], - path_type: typing.Union[MetaOapg.properties.path_type, str, ], - type: typing.Union[MetaOapg.properties.type, str, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Diff': - return super().__new__( - cls, - *_args, - path=path, - path_type=path_type, - type=type, - size_bytes=size_bytes, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/diff_list.py b/clients/python/lakefs_client/model/diff_list.py index ea57ee9830e..f8988c32220 100644 --- a/clients/python/lakefs_client/model/diff_list.py +++ b/clients/python/lakefs_client/model/diff_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.diff import Diff + from lakefs_client.model.pagination import Pagination + globals()['Diff'] = Diff + globals()['Pagination'] = Pagination -class DiffList( - schemas.DictSchema -): + +class DiffList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([Diff],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Diff']: - return Diff - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Diff'], typing.List['Diff']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Diff': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DiffList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.diff import Diff -from lakefs_client.model.pagination import Pagination + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """DiffList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Diff]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """DiffList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Diff]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/diff_list.pyi b/clients/python/lakefs_client/model/diff_list.pyi deleted file mode 100644 index ea57ee9830e..00000000000 --- a/clients/python/lakefs_client/model/diff_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class DiffList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Diff']: - return Diff - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Diff'], typing.List['Diff']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Diff': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DiffList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.diff import Diff -from lakefs_client.model.pagination import Pagination diff --git a/clients/python/lakefs_client/model/error.py b/clients/python/lakefs_client/model/error.py index dd2a2e9aea0..38ac0cb8440 100644 --- a/clients/python/lakefs_client/model/error.py +++ b/clients/python/lakefs_client/model/error.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,75 +8,255 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Error( - schemas.DictSchema -): +class Error(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "message", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'message': (str,), # noqa: E501 } - - class properties: - message = schemas.StrSchema - __annotations__ = { - "message": message, - } - - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Error': - return super().__new__( - cls, - *_args, - message=message, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'message': 'message', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 + """Error - a model defined in OpenAPI + + Args: + message (str): short message explaining the error + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, message, *args, **kwargs): # noqa: E501 + """Error - a model defined in OpenAPI + + Args: + message (str): short message explaining the error + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/error.pyi b/clients/python/lakefs_client/model/error.pyi deleted file mode 100644 index dd2a2e9aea0..00000000000 --- a/clients/python/lakefs_client/model/error.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Error( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "message", - } - - class properties: - message = schemas.StrSchema - __annotations__ = { - "message": message, - } - - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - message: typing.Union[MetaOapg.properties.message, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Error': - return super().__new__( - cls, - *_args, - message=message, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/find_merge_base_result.py b/clients/python/lakefs_client/model/find_merge_base_result.py index 4d70b5dce92..8553e8ecf84 100644 --- a/clients/python/lakefs_client/model/find_merge_base_result.py +++ b/clients/python/lakefs_client/model/find_merge_base_result.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,99 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class FindMergeBaseResult( - schemas.DictSchema -): +class FindMergeBaseResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "destination_commit_id", - "base_commit_id", - "source_commit_id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'source_commit_id': (str,), # noqa: E501 + 'destination_commit_id': (str,), # noqa: E501 + 'base_commit_id': (str,), # noqa: E501 } - - class properties: - source_commit_id = schemas.StrSchema - destination_commit_id = schemas.StrSchema - base_commit_id = schemas.StrSchema - __annotations__ = { - "source_commit_id": source_commit_id, - "destination_commit_id": destination_commit_id, - "base_commit_id": base_commit_id, - } - - destination_commit_id: MetaOapg.properties.destination_commit_id - base_commit_id: MetaOapg.properties.base_commit_id - source_commit_id: MetaOapg.properties.source_commit_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source_commit_id"]) -> MetaOapg.properties.source_commit_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination_commit_id"]) -> MetaOapg.properties.destination_commit_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["base_commit_id"]) -> MetaOapg.properties.base_commit_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["source_commit_id", "destination_commit_id", "base_commit_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source_commit_id"]) -> MetaOapg.properties.source_commit_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination_commit_id"]) -> MetaOapg.properties.destination_commit_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["base_commit_id"]) -> MetaOapg.properties.base_commit_id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["source_commit_id", "destination_commit_id", "base_commit_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destination_commit_id: typing.Union[MetaOapg.properties.destination_commit_id, str, ], - base_commit_id: typing.Union[MetaOapg.properties.base_commit_id, str, ], - source_commit_id: typing.Union[MetaOapg.properties.source_commit_id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FindMergeBaseResult': - return super().__new__( - cls, - *_args, - destination_commit_id=destination_commit_id, - base_commit_id=base_commit_id, - source_commit_id=source_commit_id, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'source_commit_id': 'source_commit_id', # noqa: E501 + 'destination_commit_id': 'destination_commit_id', # noqa: E501 + 'base_commit_id': 'base_commit_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, source_commit_id, destination_commit_id, base_commit_id, *args, **kwargs): # noqa: E501 + """FindMergeBaseResult - a model defined in OpenAPI + + Args: + source_commit_id (str): The commit ID of the merge source + destination_commit_id (str): The commit ID of the merge destination + base_commit_id (str): The commit ID of the merge base + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.source_commit_id = source_commit_id + self.destination_commit_id = destination_commit_id + self.base_commit_id = base_commit_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, source_commit_id, destination_commit_id, base_commit_id, *args, **kwargs): # noqa: E501 + """FindMergeBaseResult - a model defined in OpenAPI + + Args: + source_commit_id (str): The commit ID of the merge source + destination_commit_id (str): The commit ID of the merge destination + base_commit_id (str): The commit ID of the merge base + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.source_commit_id = source_commit_id + self.destination_commit_id = destination_commit_id + self.base_commit_id = base_commit_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/find_merge_base_result.pyi b/clients/python/lakefs_client/model/find_merge_base_result.pyi deleted file mode 100644 index 4d70b5dce92..00000000000 --- a/clients/python/lakefs_client/model/find_merge_base_result.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class FindMergeBaseResult( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "destination_commit_id", - "base_commit_id", - "source_commit_id", - } - - class properties: - source_commit_id = schemas.StrSchema - destination_commit_id = schemas.StrSchema - base_commit_id = schemas.StrSchema - __annotations__ = { - "source_commit_id": source_commit_id, - "destination_commit_id": destination_commit_id, - "base_commit_id": base_commit_id, - } - - destination_commit_id: MetaOapg.properties.destination_commit_id - base_commit_id: MetaOapg.properties.base_commit_id - source_commit_id: MetaOapg.properties.source_commit_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["source_commit_id"]) -> MetaOapg.properties.source_commit_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination_commit_id"]) -> MetaOapg.properties.destination_commit_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["base_commit_id"]) -> MetaOapg.properties.base_commit_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["source_commit_id", "destination_commit_id", "base_commit_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["source_commit_id"]) -> MetaOapg.properties.source_commit_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination_commit_id"]) -> MetaOapg.properties.destination_commit_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["base_commit_id"]) -> MetaOapg.properties.base_commit_id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["source_commit_id", "destination_commit_id", "base_commit_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - destination_commit_id: typing.Union[MetaOapg.properties.destination_commit_id, str, ], - base_commit_id: typing.Union[MetaOapg.properties.base_commit_id, str, ], - source_commit_id: typing.Union[MetaOapg.properties.source_commit_id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FindMergeBaseResult': - return super().__new__( - cls, - *_args, - destination_commit_id=destination_commit_id, - base_commit_id=base_commit_id, - source_commit_id=source_commit_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/forgot_password_request.py b/clients/python/lakefs_client/model/forgot_password_request.py index d79bd6f5e21..318b9fa3d72 100644 --- a/clients/python/lakefs_client/model/forgot_password_request.py +++ b/clients/python/lakefs_client/model/forgot_password_request.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,75 +8,255 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class ForgotPasswordRequest( - schemas.DictSchema -): +class ForgotPasswordRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "email", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'email': (str,), # noqa: E501 } - - class properties: - email = schemas.StrSchema - __annotations__ = { - "email": email, - } - - email: MetaOapg.properties.email - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - email: typing.Union[MetaOapg.properties.email, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ForgotPasswordRequest': - return super().__new__( - cls, - *_args, - email=email, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'email': 'email', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, email, *args, **kwargs): # noqa: E501 + """ForgotPasswordRequest - a model defined in OpenAPI + + Args: + email (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.email = email + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, email, *args, **kwargs): # noqa: E501 + """ForgotPasswordRequest - a model defined in OpenAPI + + Args: + email (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.email = email + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/forgot_password_request.pyi b/clients/python/lakefs_client/model/forgot_password_request.pyi deleted file mode 100644 index d79bd6f5e21..00000000000 --- a/clients/python/lakefs_client/model/forgot_password_request.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ForgotPasswordRequest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "email", - } - - class properties: - email = schemas.StrSchema - __annotations__ = { - "email": email, - } - - email: MetaOapg.properties.email - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - email: typing.Union[MetaOapg.properties.email, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ForgotPasswordRequest': - return super().__new__( - cls, - *_args, - email=email, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/garbage_collection_config.py b/clients/python/lakefs_client/model/garbage_collection_config.py index d68f5069bbd..e301e511408 100644 --- a/clients/python/lakefs_client/model/garbage_collection_config.py +++ b/clients/python/lakefs_client/model/garbage_collection_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,70 +8,249 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class GarbageCollectionConfig( - schemas.DictSchema -): +class GarbageCollectionConfig(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'grace_period': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'grace_period': 'grace_period', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GarbageCollectionConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + grace_period (int): Duration in seconds. Objects created in the recent grace_period will not be collected.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GarbageCollectionConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + grace_period (int): Duration in seconds. Objects created in the recent grace_period will not be collected.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - grace_period = schemas.IntSchema - __annotations__ = { - "grace_period": grace_period, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grace_period"]) -> MetaOapg.properties.grace_period: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["grace_period", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grace_period"]) -> typing.Union[MetaOapg.properties.grace_period, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["grace_period", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - grace_period: typing.Union[MetaOapg.properties.grace_period, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionConfig': - return super().__new__( - cls, - *_args, - grace_period=grace_period, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/garbage_collection_config.pyi b/clients/python/lakefs_client/model/garbage_collection_config.pyi deleted file mode 100644 index d68f5069bbd..00000000000 --- a/clients/python/lakefs_client/model/garbage_collection_config.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class GarbageCollectionConfig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - grace_period = schemas.IntSchema - __annotations__ = { - "grace_period": grace_period, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["grace_period"]) -> MetaOapg.properties.grace_period: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["grace_period", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["grace_period"]) -> typing.Union[MetaOapg.properties.grace_period, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["grace_period", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - grace_period: typing.Union[MetaOapg.properties.grace_period, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionConfig': - return super().__new__( - cls, - *_args, - grace_period=grace_period, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/garbage_collection_prepare_request.py b/clients/python/lakefs_client/model/garbage_collection_prepare_request.py index fff75a5a1c0..bd9d9bc96aa 100644 --- a/clients/python/lakefs_client/model/garbage_collection_prepare_request.py +++ b/clients/python/lakefs_client/model/garbage_collection_prepare_request.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,70 +8,249 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class GarbageCollectionPrepareRequest( - schemas.DictSchema -): +class GarbageCollectionPrepareRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'previous_run_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'previous_run_id': 'previous_run_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """GarbageCollectionPrepareRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + previous_run_id (str): run id of a previous successful GC job. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """GarbageCollectionPrepareRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + previous_run_id (str): run id of a previous successful GC job. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - previous_run_id = schemas.StrSchema - __annotations__ = { - "previous_run_id": previous_run_id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["previous_run_id"]) -> MetaOapg.properties.previous_run_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["previous_run_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["previous_run_id"]) -> typing.Union[MetaOapg.properties.previous_run_id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["previous_run_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - previous_run_id: typing.Union[MetaOapg.properties.previous_run_id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionPrepareRequest': - return super().__new__( - cls, - *_args, - previous_run_id=previous_run_id, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/garbage_collection_prepare_request.pyi b/clients/python/lakefs_client/model/garbage_collection_prepare_request.pyi deleted file mode 100644 index fff75a5a1c0..00000000000 --- a/clients/python/lakefs_client/model/garbage_collection_prepare_request.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class GarbageCollectionPrepareRequest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - previous_run_id = schemas.StrSchema - __annotations__ = { - "previous_run_id": previous_run_id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["previous_run_id"]) -> MetaOapg.properties.previous_run_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["previous_run_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["previous_run_id"]) -> typing.Union[MetaOapg.properties.previous_run_id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["previous_run_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - previous_run_id: typing.Union[MetaOapg.properties.previous_run_id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionPrepareRequest': - return super().__new__( - cls, - *_args, - previous_run_id=previous_run_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/garbage_collection_prepare_response.py b/clients/python/lakefs_client/model/garbage_collection_prepare_response.py index 076ca04718d..9baa0af2a56 100644 --- a/clients/python/lakefs_client/model/garbage_collection_prepare_response.py +++ b/clients/python/lakefs_client/model/garbage_collection_prepare_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,99 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class GarbageCollectionPrepareResponse( - schemas.DictSchema -): +class GarbageCollectionPrepareResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "run_id", - "gc_addresses_location", - "gc_commits_location", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'run_id': (str,), # noqa: E501 + 'gc_commits_location': (str,), # noqa: E501 + 'gc_addresses_location': (str,), # noqa: E501 } - - class properties: - run_id = schemas.StrSchema - gc_commits_location = schemas.StrSchema - gc_addresses_location = schemas.StrSchema - __annotations__ = { - "run_id": run_id, - "gc_commits_location": gc_commits_location, - "gc_addresses_location": gc_addresses_location, - } - - run_id: MetaOapg.properties.run_id - gc_addresses_location: MetaOapg.properties.gc_addresses_location - gc_commits_location: MetaOapg.properties.gc_commits_location - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gc_commits_location"]) -> MetaOapg.properties.gc_commits_location: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gc_addresses_location"]) -> MetaOapg.properties.gc_addresses_location: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_commits_location", "gc_addresses_location", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gc_commits_location"]) -> MetaOapg.properties.gc_commits_location: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gc_addresses_location"]) -> MetaOapg.properties.gc_addresses_location: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_commits_location", "gc_addresses_location", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - run_id: typing.Union[MetaOapg.properties.run_id, str, ], - gc_addresses_location: typing.Union[MetaOapg.properties.gc_addresses_location, str, ], - gc_commits_location: typing.Union[MetaOapg.properties.gc_commits_location, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionPrepareResponse': - return super().__new__( - cls, - *_args, - run_id=run_id, - gc_addresses_location=gc_addresses_location, - gc_commits_location=gc_commits_location, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'run_id': 'run_id', # noqa: E501 + 'gc_commits_location': 'gc_commits_location', # noqa: E501 + 'gc_addresses_location': 'gc_addresses_location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, run_id, gc_commits_location, gc_addresses_location, *args, **kwargs): # noqa: E501 + """GarbageCollectionPrepareResponse - a model defined in OpenAPI + + Args: + run_id (str): a unique identifier generated for this GC job + gc_commits_location (str): location of the resulting commits csv table (partitioned by run_id) + gc_addresses_location (str): location to use for expired addresses parquet table (partitioned by run_id) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.run_id = run_id + self.gc_commits_location = gc_commits_location + self.gc_addresses_location = gc_addresses_location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, run_id, gc_commits_location, gc_addresses_location, *args, **kwargs): # noqa: E501 + """GarbageCollectionPrepareResponse - a model defined in OpenAPI + + Args: + run_id (str): a unique identifier generated for this GC job + gc_commits_location (str): location of the resulting commits csv table (partitioned by run_id) + gc_addresses_location (str): location to use for expired addresses parquet table (partitioned by run_id) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.run_id = run_id + self.gc_commits_location = gc_commits_location + self.gc_addresses_location = gc_addresses_location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/garbage_collection_prepare_response.pyi b/clients/python/lakefs_client/model/garbage_collection_prepare_response.pyi deleted file mode 100644 index 076ca04718d..00000000000 --- a/clients/python/lakefs_client/model/garbage_collection_prepare_response.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class GarbageCollectionPrepareResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "run_id", - "gc_addresses_location", - "gc_commits_location", - } - - class properties: - run_id = schemas.StrSchema - gc_commits_location = schemas.StrSchema - gc_addresses_location = schemas.StrSchema - __annotations__ = { - "run_id": run_id, - "gc_commits_location": gc_commits_location, - "gc_addresses_location": gc_addresses_location, - } - - run_id: MetaOapg.properties.run_id - gc_addresses_location: MetaOapg.properties.gc_addresses_location - gc_commits_location: MetaOapg.properties.gc_commits_location - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gc_commits_location"]) -> MetaOapg.properties.gc_commits_location: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gc_addresses_location"]) -> MetaOapg.properties.gc_addresses_location: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_commits_location", "gc_addresses_location", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gc_commits_location"]) -> MetaOapg.properties.gc_commits_location: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gc_addresses_location"]) -> MetaOapg.properties.gc_addresses_location: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_commits_location", "gc_addresses_location", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - run_id: typing.Union[MetaOapg.properties.run_id, str, ], - gc_addresses_location: typing.Union[MetaOapg.properties.gc_addresses_location, str, ], - gc_commits_location: typing.Union[MetaOapg.properties.gc_commits_location, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionPrepareResponse': - return super().__new__( - cls, - *_args, - run_id=run_id, - gc_addresses_location=gc_addresses_location, - gc_commits_location=gc_commits_location, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/garbage_collection_rule.py b/clients/python/lakefs_client/model/garbage_collection_rule.py index d95c1e4b9da..c11cb6ef39e 100644 --- a/clients/python/lakefs_client/model/garbage_collection_rule.py +++ b/clients/python/lakefs_client/model/garbage_collection_rule.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class GarbageCollectionRule( - schemas.DictSchema -): +class GarbageCollectionRule(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "branch_id", - "retention_days", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'branch_id': (str,), # noqa: E501 + 'retention_days': (int,), # noqa: E501 } - - class properties: - branch_id = schemas.StrSchema - retention_days = schemas.IntSchema - __annotations__ = { - "branch_id": branch_id, - "retention_days": retention_days, - } - - branch_id: MetaOapg.properties.branch_id - retention_days: MetaOapg.properties.retention_days - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branch_id"]) -> MetaOapg.properties.branch_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["retention_days"]) -> MetaOapg.properties.retention_days: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["branch_id", "retention_days", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branch_id"]) -> MetaOapg.properties.branch_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["retention_days"]) -> MetaOapg.properties.retention_days: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["branch_id", "retention_days", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - branch_id: typing.Union[MetaOapg.properties.branch_id, str, ], - retention_days: typing.Union[MetaOapg.properties.retention_days, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionRule': - return super().__new__( - cls, - *_args, - branch_id=branch_id, - retention_days=retention_days, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'branch_id': 'branch_id', # noqa: E501 + 'retention_days': 'retention_days', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, branch_id, retention_days, *args, **kwargs): # noqa: E501 + """GarbageCollectionRule - a model defined in OpenAPI + + Args: + branch_id (str): + retention_days (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.branch_id = branch_id + self.retention_days = retention_days + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, branch_id, retention_days, *args, **kwargs): # noqa: E501 + """GarbageCollectionRule - a model defined in OpenAPI + + Args: + branch_id (str): + retention_days (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.branch_id = branch_id + self.retention_days = retention_days + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/garbage_collection_rule.pyi b/clients/python/lakefs_client/model/garbage_collection_rule.pyi deleted file mode 100644 index d95c1e4b9da..00000000000 --- a/clients/python/lakefs_client/model/garbage_collection_rule.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class GarbageCollectionRule( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "branch_id", - "retention_days", - } - - class properties: - branch_id = schemas.StrSchema - retention_days = schemas.IntSchema - __annotations__ = { - "branch_id": branch_id, - "retention_days": retention_days, - } - - branch_id: MetaOapg.properties.branch_id - retention_days: MetaOapg.properties.retention_days - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branch_id"]) -> MetaOapg.properties.branch_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["retention_days"]) -> MetaOapg.properties.retention_days: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["branch_id", "retention_days", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branch_id"]) -> MetaOapg.properties.branch_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["retention_days"]) -> MetaOapg.properties.retention_days: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["branch_id", "retention_days", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - branch_id: typing.Union[MetaOapg.properties.branch_id, str, ], - retention_days: typing.Union[MetaOapg.properties.retention_days, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionRule': - return super().__new__( - cls, - *_args, - branch_id=branch_id, - retention_days=retention_days, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/garbage_collection_rules.py b/clients/python/lakefs_client/model/garbage_collection_rules.py index d1d33aca130..995855c2e04 100644 --- a/clients/python/lakefs_client/model/garbage_collection_rules.py +++ b/clients/python/lakefs_client/model/garbage_collection_rules.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,114 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.garbage_collection_rule import GarbageCollectionRule + globals()['GarbageCollectionRule'] = GarbageCollectionRule -class GarbageCollectionRules( - schemas.DictSchema -): + +class GarbageCollectionRules(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "branches", - "default_retention_days", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'default_retention_days': (int,), # noqa: E501 + 'branches': ([GarbageCollectionRule],), # noqa: E501 } - - class properties: - default_retention_days = schemas.IntSchema - - - class branches( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['GarbageCollectionRule']: - return GarbageCollectionRule - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['GarbageCollectionRule'], typing.List['GarbageCollectionRule']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'branches': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'GarbageCollectionRule': - return super().__getitem__(i) - __annotations__ = { - "default_retention_days": default_retention_days, - "branches": branches, - } - - branches: MetaOapg.properties.branches - default_retention_days: MetaOapg.properties.default_retention_days - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_retention_days"]) -> MetaOapg.properties.default_retention_days: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branches"]) -> MetaOapg.properties.branches: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["default_retention_days", "branches", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_retention_days"]) -> MetaOapg.properties.default_retention_days: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branches"]) -> MetaOapg.properties.branches: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["default_retention_days", "branches", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - branches: typing.Union[MetaOapg.properties.branches, list, tuple, ], - default_retention_days: typing.Union[MetaOapg.properties.default_retention_days, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionRules': - return super().__new__( - cls, - *_args, - branches=branches, - default_retention_days=default_retention_days, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.garbage_collection_rule import GarbageCollectionRule + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'default_retention_days': 'default_retention_days', # noqa: E501 + 'branches': 'branches', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, default_retention_days, branches, *args, **kwargs): # noqa: E501 + """GarbageCollectionRules - a model defined in OpenAPI + + Args: + default_retention_days (int): + branches ([GarbageCollectionRule]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.default_retention_days = default_retention_days + self.branches = branches + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, default_retention_days, branches, *args, **kwargs): # noqa: E501 + """GarbageCollectionRules - a model defined in OpenAPI + + Args: + default_retention_days (int): + branches ([GarbageCollectionRule]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.default_retention_days = default_retention_days + self.branches = branches + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/garbage_collection_rules.pyi b/clients/python/lakefs_client/model/garbage_collection_rules.pyi deleted file mode 100644 index d1d33aca130..00000000000 --- a/clients/python/lakefs_client/model/garbage_collection_rules.pyi +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class GarbageCollectionRules( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "branches", - "default_retention_days", - } - - class properties: - default_retention_days = schemas.IntSchema - - - class branches( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['GarbageCollectionRule']: - return GarbageCollectionRule - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['GarbageCollectionRule'], typing.List['GarbageCollectionRule']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'branches': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'GarbageCollectionRule': - return super().__getitem__(i) - __annotations__ = { - "default_retention_days": default_retention_days, - "branches": branches, - } - - branches: MetaOapg.properties.branches - default_retention_days: MetaOapg.properties.default_retention_days - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_retention_days"]) -> MetaOapg.properties.default_retention_days: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branches"]) -> MetaOapg.properties.branches: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["default_retention_days", "branches", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_retention_days"]) -> MetaOapg.properties.default_retention_days: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branches"]) -> MetaOapg.properties.branches: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["default_retention_days", "branches", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - branches: typing.Union[MetaOapg.properties.branches, list, tuple, ], - default_retention_days: typing.Union[MetaOapg.properties.default_retention_days, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GarbageCollectionRules': - return super().__new__( - cls, - *_args, - branches=branches, - default_retention_days=default_retention_days, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.garbage_collection_rule import GarbageCollectionRule diff --git a/clients/python/lakefs_client/model/group.py b/clients/python/lakefs_client/model/group.py index 295a9c5f1d0..5db24bec35a 100644 --- a/clients/python/lakefs_client/model/group.py +++ b/clients/python/lakefs_client/model/group.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Group( - schemas.DictSchema -): +class Group(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "creation_date", - "id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'creation_date': (int,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - creation_date = schemas.Int64Schema - __annotations__ = { - "id": id, - "creation_date": creation_date, - } - - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Group': - return super().__new__( - cls, - *_args, - creation_date=creation_date, - id=id, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'creation_date': 'creation_date', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, creation_date, *args, **kwargs): # noqa: E501 + """Group - a model defined in OpenAPI + + Args: + id (str): + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, creation_date, *args, **kwargs): # noqa: E501 + """Group - a model defined in OpenAPI + + Args: + id (str): + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/group.pyi b/clients/python/lakefs_client/model/group.pyi deleted file mode 100644 index 295a9c5f1d0..00000000000 --- a/clients/python/lakefs_client/model/group.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Group( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "creation_date", - "id", - } - - class properties: - id = schemas.StrSchema - creation_date = schemas.Int64Schema - __annotations__ = { - "id": id, - "creation_date": creation_date, - } - - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Group': - return super().__new__( - cls, - *_args, - creation_date=creation_date, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/group_creation.py b/clients/python/lakefs_client/model/group_creation.py index 0db7bee330f..363f2807555 100644 --- a/clients/python/lakefs_client/model/group_creation.py +++ b/clients/python/lakefs_client/model/group_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,75 +8,255 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class GroupCreation( - schemas.DictSchema -): +class GroupCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GroupCreation': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """GroupCreation - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """GroupCreation - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/group_creation.pyi b/clients/python/lakefs_client/model/group_creation.pyi deleted file mode 100644 index 0db7bee330f..00000000000 --- a/clients/python/lakefs_client/model/group_creation.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class GroupCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "id", - } - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GroupCreation': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/group_list.py b/clients/python/lakefs_client/model/group_list.py index ffca8bec0dd..5fc057541c2 100644 --- a/clients/python/lakefs_client/model/group_list.py +++ b/clients/python/lakefs_client/model/group_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.group import Group + from lakefs_client.model.pagination import Pagination + globals()['Group'] = Group + globals()['Pagination'] = Pagination -class GroupList( - schemas.DictSchema -): + +class GroupList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([Group],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Group']: - return Group - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Group'], typing.List['Group']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Group': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GroupList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.group import Group -from lakefs_client.model.pagination import Pagination + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """GroupList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Group]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """GroupList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Group]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/group_list.pyi b/clients/python/lakefs_client/model/group_list.pyi deleted file mode 100644 index ffca8bec0dd..00000000000 --- a/clients/python/lakefs_client/model/group_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class GroupList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Group']: - return Group - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Group'], typing.List['Group']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Group': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GroupList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.group import Group -from lakefs_client.model.pagination import Pagination diff --git a/clients/python/lakefs_client/model/hook_run.py b/clients/python/lakefs_client/model/hook_run.py index a1cb573ea4b..c0224866f72 100644 --- a/clients/python/lakefs_client/model/hook_run.py +++ b/clients/python/lakefs_client/model/hook_run.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,153 +8,287 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class HookRun( - schemas.DictSchema -): +class HookRun(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('status',): { + 'FAILED': "failed", + 'COMPLETED': "completed", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "start_time", - "hook_id", - "action", - "hook_run_id", - "status", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'hook_run_id': (str,), # noqa: E501 + 'action': (str,), # noqa: E501 + 'hook_id': (str,), # noqa: E501 + 'start_time': (datetime,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'end_time': (datetime,), # noqa: E501 } - - class properties: - hook_run_id = schemas.StrSchema - action = schemas.StrSchema - hook_id = schemas.StrSchema - start_time = schemas.DateTimeSchema - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "failed": "FAILED", - "completed": "COMPLETED", - } - - @schemas.classproperty - def FAILED(cls): - return cls("failed") - - @schemas.classproperty - def COMPLETED(cls): - return cls("completed") - end_time = schemas.DateTimeSchema - __annotations__ = { - "hook_run_id": hook_run_id, - "action": action, - "hook_id": hook_id, - "start_time": start_time, - "status": status, - "end_time": end_time, - } - - start_time: MetaOapg.properties.start_time - hook_id: MetaOapg.properties.hook_id - action: MetaOapg.properties.action - hook_run_id: MetaOapg.properties.hook_run_id - status: MetaOapg.properties.status - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hook_run_id"]) -> MetaOapg.properties.hook_run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hook_id"]) -> MetaOapg.properties.hook_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["end_time"]) -> MetaOapg.properties.end_time: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["hook_run_id", "action", "hook_id", "start_time", "status", "end_time", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hook_run_id"]) -> MetaOapg.properties.hook_run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hook_id"]) -> MetaOapg.properties.hook_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["end_time"]) -> typing.Union[MetaOapg.properties.end_time, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["hook_run_id", "action", "hook_id", "start_time", "status", "end_time", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - start_time: typing.Union[MetaOapg.properties.start_time, str, datetime, ], - hook_id: typing.Union[MetaOapg.properties.hook_id, str, ], - action: typing.Union[MetaOapg.properties.action, str, ], - hook_run_id: typing.Union[MetaOapg.properties.hook_run_id, str, ], - status: typing.Union[MetaOapg.properties.status, str, ], - end_time: typing.Union[MetaOapg.properties.end_time, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HookRun': - return super().__new__( - cls, - *_args, - start_time=start_time, - hook_id=hook_id, - action=action, - hook_run_id=hook_run_id, - status=status, - end_time=end_time, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'hook_run_id': 'hook_run_id', # noqa: E501 + 'action': 'action', # noqa: E501 + 'hook_id': 'hook_id', # noqa: E501 + 'start_time': 'start_time', # noqa: E501 + 'status': 'status', # noqa: E501 + 'end_time': 'end_time', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, hook_run_id, action, hook_id, start_time, status, *args, **kwargs): # noqa: E501 + """HookRun - a model defined in OpenAPI + + Args: + hook_run_id (str): + action (str): + hook_id (str): + start_time (datetime): + status (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + end_time (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hook_run_id = hook_run_id + self.action = action + self.hook_id = hook_id + self.start_time = start_time + self.status = status + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, hook_run_id, action, hook_id, start_time, status, *args, **kwargs): # noqa: E501 + """HookRun - a model defined in OpenAPI + + Args: + hook_run_id (str): + action (str): + hook_id (str): + start_time (datetime): + status (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + end_time (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.hook_run_id = hook_run_id + self.action = action + self.hook_id = hook_id + self.start_time = start_time + self.status = status + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/hook_run.pyi b/clients/python/lakefs_client/model/hook_run.pyi deleted file mode 100644 index e395110e802..00000000000 --- a/clients/python/lakefs_client/model/hook_run.pyi +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class HookRun( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "start_time", - "hook_id", - "action", - "hook_run_id", - "status", - } - - class properties: - hook_run_id = schemas.StrSchema - action = schemas.StrSchema - hook_id = schemas.StrSchema - start_time = schemas.DateTimeSchema - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def FAILED(cls): - return cls("failed") - - @schemas.classproperty - def COMPLETED(cls): - return cls("completed") - end_time = schemas.DateTimeSchema - __annotations__ = { - "hook_run_id": hook_run_id, - "action": action, - "hook_id": hook_id, - "start_time": start_time, - "status": status, - "end_time": end_time, - } - - start_time: MetaOapg.properties.start_time - hook_id: MetaOapg.properties.hook_id - action: MetaOapg.properties.action - hook_run_id: MetaOapg.properties.hook_run_id - status: MetaOapg.properties.status - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hook_run_id"]) -> MetaOapg.properties.hook_run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hook_id"]) -> MetaOapg.properties.hook_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["end_time"]) -> MetaOapg.properties.end_time: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["hook_run_id", "action", "hook_id", "start_time", "status", "end_time", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hook_run_id"]) -> MetaOapg.properties.hook_run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hook_id"]) -> MetaOapg.properties.hook_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["start_time"]) -> MetaOapg.properties.start_time: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["end_time"]) -> typing.Union[MetaOapg.properties.end_time, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["hook_run_id", "action", "hook_id", "start_time", "status", "end_time", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - start_time: typing.Union[MetaOapg.properties.start_time, str, datetime, ], - hook_id: typing.Union[MetaOapg.properties.hook_id, str, ], - action: typing.Union[MetaOapg.properties.action, str, ], - hook_run_id: typing.Union[MetaOapg.properties.hook_run_id, str, ], - status: typing.Union[MetaOapg.properties.status, str, ], - end_time: typing.Union[MetaOapg.properties.end_time, str, datetime, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HookRun': - return super().__new__( - cls, - *_args, - start_time=start_time, - hook_id=hook_id, - action=action, - hook_run_id=hook_run_id, - status=status, - end_time=end_time, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/hook_run_list.py b/clients/python/lakefs_client/model/hook_run_list.py index 34bf1f6dc7f..09ee2b34992 100644 --- a/clients/python/lakefs_client/model/hook_run_list.py +++ b/clients/python/lakefs_client/model/hook_run_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.hook_run import HookRun + from lakefs_client.model.pagination import Pagination + globals()['HookRun'] = HookRun + globals()['Pagination'] = Pagination -class HookRunList( - schemas.DictSchema -): + +class HookRunList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([HookRun],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['HookRun']: - return HookRun - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['HookRun'], typing.List['HookRun']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'HookRun': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HookRunList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.hook_run import HookRun -from lakefs_client.model.pagination import Pagination + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """HookRunList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([HookRun]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """HookRunList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([HookRun]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/hook_run_list.pyi b/clients/python/lakefs_client/model/hook_run_list.pyi deleted file mode 100644 index 34bf1f6dc7f..00000000000 --- a/clients/python/lakefs_client/model/hook_run_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class HookRunList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['HookRun']: - return HookRun - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['HookRun'], typing.List['HookRun']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'HookRun': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HookRunList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.hook_run import HookRun -from lakefs_client.model.pagination import Pagination diff --git a/clients/python/lakefs_client/model/import_pagination.py b/clients/python/lakefs_client/model/import_pagination.py index 3e969d39b95..43b6284b347 100644 --- a/clients/python/lakefs_client/model/import_pagination.py +++ b/clients/python/lakefs_client/model/import_pagination.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,97 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class ImportPagination( - schemas.DictSchema -): +class ImportPagination(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "has_more", - "last_key", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'has_more': (bool,), # noqa: E501 + 'last_key': (str,), # noqa: E501 + 'continuation_token': (str,), # noqa: E501 } - - class properties: - has_more = schemas.BoolSchema - last_key = schemas.StrSchema - continuation_token = schemas.StrSchema - __annotations__ = { - "has_more": has_more, - "last_key": last_key, - "continuation_token": continuation_token, - } - - has_more: MetaOapg.properties.has_more - last_key: MetaOapg.properties.last_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["last_key"]) -> MetaOapg.properties.last_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["has_more", "last_key", "continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["last_key"]) -> MetaOapg.properties.last_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["has_more", "last_key", "continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - has_more: typing.Union[MetaOapg.properties.has_more, bool, ], - last_key: typing.Union[MetaOapg.properties.last_key, str, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ImportPagination': - return super().__new__( - cls, - *_args, - has_more=has_more, - last_key=last_key, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'has_more': 'has_more', # noqa: E501 + 'last_key': 'last_key', # noqa: E501 + 'continuation_token': 'continuation_token', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, has_more, last_key, *args, **kwargs): # noqa: E501 + """ImportPagination - a model defined in OpenAPI + + Args: + has_more (bool): More keys to be ingested. + last_key (str): Last object store key that was ingested. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): Opaque. Token used to import the next range.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.has_more = has_more + self.last_key = last_key + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, has_more, last_key, *args, **kwargs): # noqa: E501 + """ImportPagination - a model defined in OpenAPI + + Args: + has_more (bool): More keys to be ingested. + last_key (str): Last object store key that was ingested. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): Opaque. Token used to import the next range.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.has_more = has_more + self.last_key = last_key + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/import_pagination.pyi b/clients/python/lakefs_client/model/import_pagination.pyi deleted file mode 100644 index 3e969d39b95..00000000000 --- a/clients/python/lakefs_client/model/import_pagination.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ImportPagination( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "has_more", - "last_key", - } - - class properties: - has_more = schemas.BoolSchema - last_key = schemas.StrSchema - continuation_token = schemas.StrSchema - __annotations__ = { - "has_more": has_more, - "last_key": last_key, - "continuation_token": continuation_token, - } - - has_more: MetaOapg.properties.has_more - last_key: MetaOapg.properties.last_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["last_key"]) -> MetaOapg.properties.last_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["has_more", "last_key", "continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["last_key"]) -> MetaOapg.properties.last_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["has_more", "last_key", "continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - has_more: typing.Union[MetaOapg.properties.has_more, bool, ], - last_key: typing.Union[MetaOapg.properties.last_key, str, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ImportPagination': - return super().__new__( - cls, - *_args, - has_more=has_more, - last_key=last_key, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/ingest_range_creation_response.py b/clients/python/lakefs_client/model/ingest_range_creation_response.py index 5f1dd5486a3..8bdf19921ec 100644 --- a/clients/python/lakefs_client/model/ingest_range_creation_response.py +++ b/clients/python/lakefs_client/model/ingest_range_creation_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,89 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.import_pagination import ImportPagination + from lakefs_client.model.range_metadata import RangeMetadata + globals()['ImportPagination'] = ImportPagination + globals()['RangeMetadata'] = RangeMetadata -class IngestRangeCreationResponse( - schemas.DictSchema -): + +class IngestRangeCreationResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'range': (RangeMetadata,), # noqa: E501 + 'pagination': (ImportPagination,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'range': 'range', # noqa: E501 + 'pagination': 'pagination', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """IngestRangeCreationResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + range (RangeMetadata): [optional] # noqa: E501 + pagination (ImportPagination): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """IngestRangeCreationResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + range (RangeMetadata): [optional] # noqa: E501 + pagination (ImportPagination): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - - @staticmethod - def range() -> typing.Type['RangeMetadata']: - return RangeMetadata - - @staticmethod - def pagination() -> typing.Type['ImportPagination']: - return ImportPagination - __annotations__ = { - "range": range, - "pagination": pagination, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["range"]) -> 'RangeMetadata': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'ImportPagination': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["range", "pagination", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["range"]) -> typing.Union['RangeMetadata', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> typing.Union['ImportPagination', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["range", "pagination", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - range: typing.Union['RangeMetadata', schemas.Unset] = schemas.unset, - pagination: typing.Union['ImportPagination', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'IngestRangeCreationResponse': - return super().__new__( - cls, - *_args, - range=range, - pagination=pagination, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.import_pagination import ImportPagination -from lakefs_client.model.range_metadata import RangeMetadata + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/ingest_range_creation_response.pyi b/clients/python/lakefs_client/model/ingest_range_creation_response.pyi deleted file mode 100644 index 5f1dd5486a3..00000000000 --- a/clients/python/lakefs_client/model/ingest_range_creation_response.pyi +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class IngestRangeCreationResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def range() -> typing.Type['RangeMetadata']: - return RangeMetadata - - @staticmethod - def pagination() -> typing.Type['ImportPagination']: - return ImportPagination - __annotations__ = { - "range": range, - "pagination": pagination, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["range"]) -> 'RangeMetadata': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'ImportPagination': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["range", "pagination", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["range"]) -> typing.Union['RangeMetadata', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> typing.Union['ImportPagination', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["range", "pagination", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - range: typing.Union['RangeMetadata', schemas.Unset] = schemas.unset, - pagination: typing.Union['ImportPagination', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'IngestRangeCreationResponse': - return super().__new__( - cls, - *_args, - range=range, - pagination=pagination, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.import_pagination import ImportPagination -from lakefs_client.model.range_metadata import RangeMetadata diff --git a/clients/python/lakefs_client/model/inline_object1.py b/clients/python/lakefs_client/model/inline_object1.py new file mode 100644 index 00000000000..11a41bc260e --- /dev/null +++ b/clients/python/lakefs_client/model/inline_object1.py @@ -0,0 +1,262 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError + + + +class InlineObject1(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pattern': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pattern': 'pattern', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pattern, *args, **kwargs): # noqa: E501 + """InlineObject1 - a model defined in OpenAPI + + Args: + pattern (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pattern = pattern + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pattern, *args, **kwargs): # noqa: E501 + """InlineObject1 - a model defined in OpenAPI + + Args: + pattern (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pattern = pattern + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/login_config.py b/clients/python/lakefs_client/model/login_config.py index 8d0d10bbe28..67c412a958c 100644 --- a/clients/python/lakefs_client/model/login_config.py +++ b/clients/python/lakefs_client/model/login_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,181 +8,287 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class LoginConfig( - schemas.DictSchema -): +class LoginConfig(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('rbac',): { + 'SIMPLIFIED': "simplified", + 'EXTERNAL': "external", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "logout_url", - "login_url", - "login_cookie_names", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'login_url': (str,), # noqa: E501 + 'login_cookie_names': ([str],), # noqa: E501 + 'logout_url': (str,), # noqa: E501 + 'rbac': (str,), # noqa: E501 + 'login_failed_message': (str,), # noqa: E501 + 'fallback_login_url': (str,), # noqa: E501 + 'fallback_login_label': (str,), # noqa: E501 } - - class properties: - login_url = schemas.StrSchema - - - class login_cookie_names( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'login_cookie_names': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - logout_url = schemas.StrSchema - - - class RBAC( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "simplified": "SIMPLIFIED", - "external": "EXTERNAL", - } - - @schemas.classproperty - def SIMPLIFIED(cls): - return cls("simplified") - - @schemas.classproperty - def EXTERNAL(cls): - return cls("external") - login_failed_message = schemas.StrSchema - fallback_login_url = schemas.StrSchema - fallback_login_label = schemas.StrSchema - __annotations__ = { - "login_url": login_url, - "login_cookie_names": login_cookie_names, - "logout_url": logout_url, - "RBAC": RBAC, - "login_failed_message": login_failed_message, - "fallback_login_url": fallback_login_url, - "fallback_login_label": fallback_login_label, - } - - logout_url: MetaOapg.properties.logout_url - login_url: MetaOapg.properties.login_url - login_cookie_names: MetaOapg.properties.login_cookie_names - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_url"]) -> MetaOapg.properties.login_url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_cookie_names"]) -> MetaOapg.properties.login_cookie_names: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["logout_url"]) -> MetaOapg.properties.logout_url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["RBAC"]) -> MetaOapg.properties.RBAC: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_failed_message"]) -> MetaOapg.properties.login_failed_message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fallback_login_url"]) -> MetaOapg.properties.fallback_login_url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fallback_login_label"]) -> MetaOapg.properties.fallback_login_label: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["login_url", "login_cookie_names", "logout_url", "RBAC", "login_failed_message", "fallback_login_url", "fallback_login_label", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_url"]) -> MetaOapg.properties.login_url: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_cookie_names"]) -> MetaOapg.properties.login_cookie_names: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["logout_url"]) -> MetaOapg.properties.logout_url: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["RBAC"]) -> typing.Union[MetaOapg.properties.RBAC, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_failed_message"]) -> typing.Union[MetaOapg.properties.login_failed_message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fallback_login_url"]) -> typing.Union[MetaOapg.properties.fallback_login_url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fallback_login_label"]) -> typing.Union[MetaOapg.properties.fallback_login_label, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["login_url", "login_cookie_names", "logout_url", "RBAC", "login_failed_message", "fallback_login_url", "fallback_login_label", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - logout_url: typing.Union[MetaOapg.properties.logout_url, str, ], - login_url: typing.Union[MetaOapg.properties.login_url, str, ], - login_cookie_names: typing.Union[MetaOapg.properties.login_cookie_names, list, tuple, ], - RBAC: typing.Union[MetaOapg.properties.RBAC, str, schemas.Unset] = schemas.unset, - login_failed_message: typing.Union[MetaOapg.properties.login_failed_message, str, schemas.Unset] = schemas.unset, - fallback_login_url: typing.Union[MetaOapg.properties.fallback_login_url, str, schemas.Unset] = schemas.unset, - fallback_login_label: typing.Union[MetaOapg.properties.fallback_login_label, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LoginConfig': - return super().__new__( - cls, - *_args, - logout_url=logout_url, - login_url=login_url, - login_cookie_names=login_cookie_names, - RBAC=RBAC, - login_failed_message=login_failed_message, - fallback_login_url=fallback_login_url, - fallback_login_label=fallback_login_label, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'login_url': 'login_url', # noqa: E501 + 'login_cookie_names': 'login_cookie_names', # noqa: E501 + 'logout_url': 'logout_url', # noqa: E501 + 'rbac': 'RBAC', # noqa: E501 + 'login_failed_message': 'login_failed_message', # noqa: E501 + 'fallback_login_url': 'fallback_login_url', # noqa: E501 + 'fallback_login_label': 'fallback_login_label', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, login_url, login_cookie_names, logout_url, *args, **kwargs): # noqa: E501 + """LoginConfig - a model defined in OpenAPI + + Args: + login_url (str): primary URL to use for login. + login_cookie_names ([str]): cookie names used to store JWT + logout_url (str): URL to use for logging out. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + rbac (str): RBAC will remain enabled on GUI if \"external\". That only works with an external auth service. . [optional] # noqa: E501 + login_failed_message (str): message to display to users who fail to login; a full sentence that is rendered in HTML and may contain a link to a secondary login method . [optional] # noqa: E501 + fallback_login_url (str): secondary URL to offer users to use for login.. [optional] # noqa: E501 + fallback_login_label (str): label to place on fallback_login_url.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.login_url = login_url + self.login_cookie_names = login_cookie_names + self.logout_url = logout_url + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, login_url, login_cookie_names, logout_url, *args, **kwargs): # noqa: E501 + """LoginConfig - a model defined in OpenAPI + + Args: + login_url (str): primary URL to use for login. + login_cookie_names ([str]): cookie names used to store JWT + logout_url (str): URL to use for logging out. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + rbac (str): RBAC will remain enabled on GUI if \"external\". That only works with an external auth service. . [optional] # noqa: E501 + login_failed_message (str): message to display to users who fail to login; a full sentence that is rendered in HTML and may contain a link to a secondary login method . [optional] # noqa: E501 + fallback_login_url (str): secondary URL to offer users to use for login.. [optional] # noqa: E501 + fallback_login_label (str): label to place on fallback_login_url.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.login_url = login_url + self.login_cookie_names = login_cookie_names + self.logout_url = logout_url + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/login_config.pyi b/clients/python/lakefs_client/model/login_config.pyi deleted file mode 100644 index db6dd31d830..00000000000 --- a/clients/python/lakefs_client/model/login_config.pyi +++ /dev/null @@ -1,183 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class LoginConfig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "logout_url", - "login_url", - "login_cookie_names", - } - - class properties: - login_url = schemas.StrSchema - - - class login_cookie_names( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'login_cookie_names': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - logout_url = schemas.StrSchema - - - class RBAC( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def SIMPLIFIED(cls): - return cls("simplified") - - @schemas.classproperty - def EXTERNAL(cls): - return cls("external") - login_failed_message = schemas.StrSchema - fallback_login_url = schemas.StrSchema - fallback_login_label = schemas.StrSchema - __annotations__ = { - "login_url": login_url, - "login_cookie_names": login_cookie_names, - "logout_url": logout_url, - "RBAC": RBAC, - "login_failed_message": login_failed_message, - "fallback_login_url": fallback_login_url, - "fallback_login_label": fallback_login_label, - } - - logout_url: MetaOapg.properties.logout_url - login_url: MetaOapg.properties.login_url - login_cookie_names: MetaOapg.properties.login_cookie_names - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_url"]) -> MetaOapg.properties.login_url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_cookie_names"]) -> MetaOapg.properties.login_cookie_names: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["logout_url"]) -> MetaOapg.properties.logout_url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["RBAC"]) -> MetaOapg.properties.RBAC: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_failed_message"]) -> MetaOapg.properties.login_failed_message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fallback_login_url"]) -> MetaOapg.properties.fallback_login_url: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fallback_login_label"]) -> MetaOapg.properties.fallback_login_label: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["login_url", "login_cookie_names", "logout_url", "RBAC", "login_failed_message", "fallback_login_url", "fallback_login_label", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_url"]) -> MetaOapg.properties.login_url: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_cookie_names"]) -> MetaOapg.properties.login_cookie_names: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["logout_url"]) -> MetaOapg.properties.logout_url: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["RBAC"]) -> typing.Union[MetaOapg.properties.RBAC, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_failed_message"]) -> typing.Union[MetaOapg.properties.login_failed_message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fallback_login_url"]) -> typing.Union[MetaOapg.properties.fallback_login_url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fallback_login_label"]) -> typing.Union[MetaOapg.properties.fallback_login_label, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["login_url", "login_cookie_names", "logout_url", "RBAC", "login_failed_message", "fallback_login_url", "fallback_login_label", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - logout_url: typing.Union[MetaOapg.properties.logout_url, str, ], - login_url: typing.Union[MetaOapg.properties.login_url, str, ], - login_cookie_names: typing.Union[MetaOapg.properties.login_cookie_names, list, tuple, ], - RBAC: typing.Union[MetaOapg.properties.RBAC, str, schemas.Unset] = schemas.unset, - login_failed_message: typing.Union[MetaOapg.properties.login_failed_message, str, schemas.Unset] = schemas.unset, - fallback_login_url: typing.Union[MetaOapg.properties.fallback_login_url, str, schemas.Unset] = schemas.unset, - fallback_login_label: typing.Union[MetaOapg.properties.fallback_login_label, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LoginConfig': - return super().__new__( - cls, - *_args, - logout_url=logout_url, - login_url=login_url, - login_cookie_names=login_cookie_names, - RBAC=RBAC, - login_failed_message=login_failed_message, - fallback_login_url=fallback_login_url, - fallback_login_label=fallback_login_label, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/login_information.py b/clients/python/lakefs_client/model/login_information.py index 8a502a040d4..bd3c897c372 100644 --- a/clients/python/lakefs_client/model/login_information.py +++ b/clients/python/lakefs_client/model/login_information.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class LoginInformation( - schemas.DictSchema -): +class LoginInformation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "access_key_id", - "secret_access_key", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'access_key_id': (str,), # noqa: E501 + 'secret_access_key': (str,), # noqa: E501 } - - class properties: - access_key_id = schemas.StrSchema - secret_access_key = schemas.StrSchema - __annotations__ = { - "access_key_id": access_key_id, - "secret_access_key": secret_access_key, - } - - access_key_id: MetaOapg.properties.access_key_id - secret_access_key: MetaOapg.properties.secret_access_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - secret_access_key: typing.Union[MetaOapg.properties.secret_access_key, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LoginInformation': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - secret_access_key=secret_access_key, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_key_id': 'access_key_id', # noqa: E501 + 'secret_access_key': 'secret_access_key', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501 + """LoginInformation - a model defined in OpenAPI + + Args: + access_key_id (str): + secret_access_key (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.secret_access_key = secret_access_key + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501 + """LoginInformation - a model defined in OpenAPI + + Args: + access_key_id (str): + secret_access_key (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.access_key_id = access_key_id + self.secret_access_key = secret_access_key + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/login_information.pyi b/clients/python/lakefs_client/model/login_information.pyi deleted file mode 100644 index 8a502a040d4..00000000000 --- a/clients/python/lakefs_client/model/login_information.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class LoginInformation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "access_key_id", - "secret_access_key", - } - - class properties: - access_key_id = schemas.StrSchema - secret_access_key = schemas.StrSchema - __annotations__ = { - "access_key_id": access_key_id, - "secret_access_key": secret_access_key, - } - - access_key_id: MetaOapg.properties.access_key_id - secret_access_key: MetaOapg.properties.secret_access_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["access_key_id"]) -> MetaOapg.properties.access_key_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret_access_key"]) -> MetaOapg.properties.secret_access_key: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["access_key_id", "secret_access_key", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - access_key_id: typing.Union[MetaOapg.properties.access_key_id, str, ], - secret_access_key: typing.Union[MetaOapg.properties.secret_access_key, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'LoginInformation': - return super().__new__( - cls, - *_args, - access_key_id=access_key_id, - secret_access_key=secret_access_key, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/merge.py b/clients/python/lakefs_client/model/merge.py index dfceb7aa394..475892e0467 100644 --- a/clients/python/lakefs_client/model/merge.py +++ b/clients/python/lakefs_client/model/merge.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,257 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Merge( - schemas.DictSchema -): +class Merge(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'message': (str,), # noqa: E501 + 'metadata': ({str: (str,)},), # noqa: E501 + 'strategy': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'message': 'message', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'strategy': 'strategy', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Merge - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + message (str): [optional] # noqa: E501 + metadata ({str: (str,)}): [optional] # noqa: E501 + strategy (str): In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """Merge - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + message (str): [optional] # noqa: E501 + metadata ({str: (str,)}): [optional] # noqa: E501 + strategy (str): In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - message = schemas.StrSchema - - - class metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - strategy = schemas.StrSchema - __annotations__ = { - "message": message, - "metadata": metadata, - "strategy": strategy, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["strategy"]) -> MetaOapg.properties.strategy: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "strategy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["strategy"]) -> typing.Union[MetaOapg.properties.strategy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "strategy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - strategy: typing.Union[MetaOapg.properties.strategy, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Merge': - return super().__new__( - cls, - *_args, - message=message, - metadata=metadata, - strategy=strategy, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/merge.pyi b/clients/python/lakefs_client/model/merge.pyi deleted file mode 100644 index dfceb7aa394..00000000000 --- a/clients/python/lakefs_client/model/merge.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Merge( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - message = schemas.StrSchema - - - class metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - strategy = schemas.StrSchema - __annotations__ = { - "message": message, - "metadata": metadata, - "strategy": strategy, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["strategy"]) -> MetaOapg.properties.strategy: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "strategy", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["strategy"]) -> typing.Union[MetaOapg.properties.strategy, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["message", "metadata", "strategy", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - strategy: typing.Union[MetaOapg.properties.strategy, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Merge': - return super().__new__( - cls, - *_args, - message=message, - metadata=metadata, - strategy=strategy, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/merge_result.py b/clients/python/lakefs_client/model/merge_result.py index 2888bae4e11..cec00a4678d 100644 --- a/clients/python/lakefs_client/model/merge_result.py +++ b/clients/python/lakefs_client/model/merge_result.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,90 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.merge_result_summary import MergeResultSummary + globals()['MergeResultSummary'] = MergeResultSummary -class MergeResult( - schemas.DictSchema -): + +class MergeResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "reference", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'reference': (str,), # noqa: E501 + 'summary': (MergeResultSummary,), # noqa: E501 } - - class properties: - reference = schemas.StrSchema - - @staticmethod - def summary() -> typing.Type['MergeResultSummary']: - return MergeResultSummary - __annotations__ = { - "reference": reference, - "summary": summary, - } - - reference: MetaOapg.properties.reference - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["reference"]) -> MetaOapg.properties.reference: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["summary"]) -> 'MergeResultSummary': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["reference", "summary", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["reference"]) -> MetaOapg.properties.reference: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["summary"]) -> typing.Union['MergeResultSummary', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["reference", "summary", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - reference: typing.Union[MetaOapg.properties.reference, str, ], - summary: typing.Union['MergeResultSummary', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MergeResult': - return super().__new__( - cls, - *_args, - reference=reference, - summary=summary, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.merge_result_summary import MergeResultSummary + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'reference': 'reference', # noqa: E501 + 'summary': 'summary', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, reference, *args, **kwargs): # noqa: E501 + """MergeResult - a model defined in OpenAPI + + Args: + reference (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + summary (MergeResultSummary): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.reference = reference + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, reference, *args, **kwargs): # noqa: E501 + """MergeResult - a model defined in OpenAPI + + Args: + reference (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + summary (MergeResultSummary): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.reference = reference + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/merge_result.pyi b/clients/python/lakefs_client/model/merge_result.pyi deleted file mode 100644 index 2888bae4e11..00000000000 --- a/clients/python/lakefs_client/model/merge_result.pyi +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class MergeResult( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "reference", - } - - class properties: - reference = schemas.StrSchema - - @staticmethod - def summary() -> typing.Type['MergeResultSummary']: - return MergeResultSummary - __annotations__ = { - "reference": reference, - "summary": summary, - } - - reference: MetaOapg.properties.reference - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["reference"]) -> MetaOapg.properties.reference: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["summary"]) -> 'MergeResultSummary': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["reference", "summary", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["reference"]) -> MetaOapg.properties.reference: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["summary"]) -> typing.Union['MergeResultSummary', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["reference", "summary", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - reference: typing.Union[MetaOapg.properties.reference, str, ], - summary: typing.Union['MergeResultSummary', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MergeResult': - return super().__new__( - cls, - *_args, - reference=reference, - summary=summary, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.merge_result_summary import MergeResultSummary diff --git a/clients/python/lakefs_client/model/merge_result_summary.py b/clients/python/lakefs_client/model/merge_result_summary.py index c2a763e6333..7b894eb2e0e 100644 --- a/clients/python/lakefs_client/model/merge_result_summary.py +++ b/clients/python/lakefs_client/model/merge_result_summary.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,100 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class MergeResultSummary( - schemas.DictSchema -): +class MergeResultSummary(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'added': (int,), # noqa: E501 + 'removed': (int,), # noqa: E501 + 'changed': (int,), # noqa: E501 + 'conflict': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'added': 'added', # noqa: E501 + 'removed': 'removed', # noqa: E501 + 'changed': 'changed', # noqa: E501 + 'conflict': 'conflict', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """MergeResultSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + added (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + removed (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + changed (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + conflict (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """MergeResultSummary - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + added (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + removed (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + changed (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + conflict (int): Deprecated: inaccurate and will be removed.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - added = schemas.IntSchema - removed = schemas.IntSchema - changed = schemas.IntSchema - conflict = schemas.IntSchema - __annotations__ = { - "added": added, - "removed": removed, - "changed": changed, - "conflict": conflict, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["added"]) -> MetaOapg.properties.added: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["removed"]) -> MetaOapg.properties.removed: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["changed"]) -> MetaOapg.properties.changed: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["conflict"]) -> MetaOapg.properties.conflict: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["added", "removed", "changed", "conflict", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["added"]) -> typing.Union[MetaOapg.properties.added, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["removed"]) -> typing.Union[MetaOapg.properties.removed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["changed"]) -> typing.Union[MetaOapg.properties.changed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["conflict"]) -> typing.Union[MetaOapg.properties.conflict, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["added", "removed", "changed", "conflict", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - added: typing.Union[MetaOapg.properties.added, decimal.Decimal, int, schemas.Unset] = schemas.unset, - removed: typing.Union[MetaOapg.properties.removed, decimal.Decimal, int, schemas.Unset] = schemas.unset, - changed: typing.Union[MetaOapg.properties.changed, decimal.Decimal, int, schemas.Unset] = schemas.unset, - conflict: typing.Union[MetaOapg.properties.conflict, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MergeResultSummary': - return super().__new__( - cls, - *_args, - added=added, - removed=removed, - changed=changed, - conflict=conflict, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/merge_result_summary.pyi b/clients/python/lakefs_client/model/merge_result_summary.pyi deleted file mode 100644 index c2a763e6333..00000000000 --- a/clients/python/lakefs_client/model/merge_result_summary.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class MergeResultSummary( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - added = schemas.IntSchema - removed = schemas.IntSchema - changed = schemas.IntSchema - conflict = schemas.IntSchema - __annotations__ = { - "added": added, - "removed": removed, - "changed": changed, - "conflict": conflict, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["added"]) -> MetaOapg.properties.added: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["removed"]) -> MetaOapg.properties.removed: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["changed"]) -> MetaOapg.properties.changed: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["conflict"]) -> MetaOapg.properties.conflict: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["added", "removed", "changed", "conflict", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["added"]) -> typing.Union[MetaOapg.properties.added, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["removed"]) -> typing.Union[MetaOapg.properties.removed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["changed"]) -> typing.Union[MetaOapg.properties.changed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["conflict"]) -> typing.Union[MetaOapg.properties.conflict, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["added", "removed", "changed", "conflict", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - added: typing.Union[MetaOapg.properties.added, decimal.Decimal, int, schemas.Unset] = schemas.unset, - removed: typing.Union[MetaOapg.properties.removed, decimal.Decimal, int, schemas.Unset] = schemas.unset, - changed: typing.Union[MetaOapg.properties.changed, decimal.Decimal, int, schemas.Unset] = schemas.unset, - conflict: typing.Union[MetaOapg.properties.conflict, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MergeResultSummary': - return super().__new__( - cls, - *_args, - added=added, - removed=removed, - changed=changed, - conflict=conflict, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/meta_range_creation.py b/clients/python/lakefs_client/model/meta_range_creation.py index 25741628875..0dd6825db88 100644 --- a/clients/python/lakefs_client/model/meta_range_creation.py +++ b/clients/python/lakefs_client/model/meta_range_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,103 +8,264 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.range_metadata import RangeMetadata + globals()['RangeMetadata'] = RangeMetadata -class MetaRangeCreation( - schemas.DictSchema -): + +class MetaRangeCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('ranges',): { + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "ranges", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'ranges': ([RangeMetadata],), # noqa: E501 } - - class properties: - - - class ranges( - schemas.ListSchema - ): - - - class MetaOapg: - min_items = 1 - - @staticmethod - def items() -> typing.Type['RangeMetadata']: - return RangeMetadata - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['RangeMetadata'], typing.List['RangeMetadata']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ranges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'RangeMetadata': - return super().__getitem__(i) - __annotations__ = { - "ranges": ranges, - } - - ranges: MetaOapg.properties.ranges - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ranges"]) -> MetaOapg.properties.ranges: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ranges", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ranges"]) -> MetaOapg.properties.ranges: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ranges", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ranges: typing.Union[MetaOapg.properties.ranges, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MetaRangeCreation': - return super().__new__( - cls, - *_args, - ranges=ranges, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.range_metadata import RangeMetadata + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ranges': 'ranges', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, ranges, *args, **kwargs): # noqa: E501 + """MetaRangeCreation - a model defined in OpenAPI + + Args: + ranges ([RangeMetadata]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.ranges = ranges + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, ranges, *args, **kwargs): # noqa: E501 + """MetaRangeCreation - a model defined in OpenAPI + + Args: + ranges ([RangeMetadata]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.ranges = ranges + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/meta_range_creation.pyi b/clients/python/lakefs_client/model/meta_range_creation.pyi deleted file mode 100644 index 5a2e847c4be..00000000000 --- a/clients/python/lakefs_client/model/meta_range_creation.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class MetaRangeCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "ranges", - } - - class properties: - - - class ranges( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['RangeMetadata']: - return RangeMetadata - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['RangeMetadata'], typing.List['RangeMetadata']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ranges': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'RangeMetadata': - return super().__getitem__(i) - __annotations__ = { - "ranges": ranges, - } - - ranges: MetaOapg.properties.ranges - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ranges"]) -> MetaOapg.properties.ranges: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ranges", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ranges"]) -> MetaOapg.properties.ranges: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ranges", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ranges: typing.Union[MetaOapg.properties.ranges, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MetaRangeCreation': - return super().__new__( - cls, - *_args, - ranges=ranges, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.range_metadata import RangeMetadata diff --git a/clients/python/lakefs_client/model/meta_range_creation_response.py b/clients/python/lakefs_client/model/meta_range_creation_response.py index 588c39c0ca7..27897119ed3 100644 --- a/clients/python/lakefs_client/model/meta_range_creation_response.py +++ b/clients/python/lakefs_client/model/meta_range_creation_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,70 +8,249 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class MetaRangeCreationResponse( - schemas.DictSchema -): +class MetaRangeCreationResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """MetaRangeCreationResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The id of the created metarange. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """MetaRangeCreationResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): The id of the created metarange. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MetaRangeCreationResponse': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/meta_range_creation_response.pyi b/clients/python/lakefs_client/model/meta_range_creation_response.pyi deleted file mode 100644 index 588c39c0ca7..00000000000 --- a/clients/python/lakefs_client/model/meta_range_creation_response.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class MetaRangeCreationResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.StrSchema - __annotations__ = { - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MetaRangeCreationResponse': - return super().__new__( - cls, - *_args, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/next_step.py b/clients/python/lakefs_client/model/next_step.py index 608deeedeed..3ad8dc64131 100644 --- a/clients/python/lakefs_client/model/next_step.py +++ b/clients/python/lakefs_client/model/next_step.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,75 +8,255 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class NextStep( - schemas.DictSchema -): +class NextStep(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "nextStep", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'next_step': (str,), # noqa: E501 } - - class properties: - nextStep = schemas.StrSchema - __annotations__ = { - "nextStep": nextStep, - } - - nextStep: MetaOapg.properties.nextStep - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nextStep"]) -> MetaOapg.properties.nextStep: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["nextStep", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nextStep"]) -> MetaOapg.properties.nextStep: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["nextStep", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - nextStep: typing.Union[MetaOapg.properties.nextStep, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NextStep': - return super().__new__( - cls, - *_args, - nextStep=nextStep, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'next_step': 'nextStep', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, next_step, *args, **kwargs): # noqa: E501 + """NextStep - a model defined in OpenAPI + + Args: + next_step (str): the next step in the setup process + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.next_step = next_step + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, next_step, *args, **kwargs): # noqa: E501 + """NextStep - a model defined in OpenAPI + + Args: + next_step (str): the next step in the setup process + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.next_step = next_step + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/next_step.pyi b/clients/python/lakefs_client/model/next_step.pyi deleted file mode 100644 index 608deeedeed..00000000000 --- a/clients/python/lakefs_client/model/next_step.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class NextStep( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "nextStep", - } - - class properties: - nextStep = schemas.StrSchema - __annotations__ = { - "nextStep": nextStep, - } - - nextStep: MetaOapg.properties.nextStep - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nextStep"]) -> MetaOapg.properties.nextStep: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["nextStep", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nextStep"]) -> MetaOapg.properties.nextStep: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["nextStep", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - nextStep: typing.Union[MetaOapg.properties.nextStep, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NextStep': - return super().__new__( - cls, - *_args, - nextStep=nextStep, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/object_copy_creation.py b/clients/python/lakefs_client/model/object_copy_creation.py index ff39e9395ed..1db86d58058 100644 --- a/clients/python/lakefs_client/model/object_copy_creation.py +++ b/clients/python/lakefs_client/model/object_copy_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,85 +8,259 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class ObjectCopyCreation( - schemas.DictSchema -): +class ObjectCopyCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "src_path", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'src_path': (str,), # noqa: E501 + 'src_ref': (str,), # noqa: E501 } - - class properties: - src_path = schemas.StrSchema - src_ref = schemas.StrSchema - __annotations__ = { - "src_path": src_path, - "src_ref": src_ref, - } - - src_path: MetaOapg.properties.src_path - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["src_path"]) -> MetaOapg.properties.src_path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["src_ref"]) -> MetaOapg.properties.src_ref: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["src_path", "src_ref", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["src_path"]) -> MetaOapg.properties.src_path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["src_ref"]) -> typing.Union[MetaOapg.properties.src_ref, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["src_path", "src_ref", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - src_path: typing.Union[MetaOapg.properties.src_path, str, ], - src_ref: typing.Union[MetaOapg.properties.src_ref, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectCopyCreation': - return super().__new__( - cls, - *_args, - src_path=src_path, - src_ref=src_ref, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'src_path': 'src_path', # noqa: E501 + 'src_ref': 'src_ref', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, src_path, *args, **kwargs): # noqa: E501 + """ObjectCopyCreation - a model defined in OpenAPI + + Args: + src_path (str): path of the copied object relative to the ref + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + src_ref (str): a reference, if empty uses the provided branch as ref. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.src_path = src_path + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, src_path, *args, **kwargs): # noqa: E501 + """ObjectCopyCreation - a model defined in OpenAPI + + Args: + src_path (str): path of the copied object relative to the ref + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + src_ref (str): a reference, if empty uses the provided branch as ref. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.src_path = src_path + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/object_copy_creation.pyi b/clients/python/lakefs_client/model/object_copy_creation.pyi deleted file mode 100644 index ff39e9395ed..00000000000 --- a/clients/python/lakefs_client/model/object_copy_creation.pyi +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ObjectCopyCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "src_path", - } - - class properties: - src_path = schemas.StrSchema - src_ref = schemas.StrSchema - __annotations__ = { - "src_path": src_path, - "src_ref": src_ref, - } - - src_path: MetaOapg.properties.src_path - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["src_path"]) -> MetaOapg.properties.src_path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["src_ref"]) -> MetaOapg.properties.src_ref: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["src_path", "src_ref", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["src_path"]) -> MetaOapg.properties.src_path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["src_ref"]) -> typing.Union[MetaOapg.properties.src_ref, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["src_path", "src_ref", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - src_path: typing.Union[MetaOapg.properties.src_path, str, ], - src_ref: typing.Union[MetaOapg.properties.src_ref, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectCopyCreation': - return super().__new__( - cls, - *_args, - src_path=src_path, - src_ref=src_ref, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/object_error.py b/clients/python/lakefs_client/model/object_error.py index a9133296327..afe59ed50eb 100644 --- a/clients/python/lakefs_client/model/object_error.py +++ b/clients/python/lakefs_client/model/object_error.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,97 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class ObjectError( - schemas.DictSchema -): +class ObjectError(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "status_code", - "message", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'status_code': (int,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'path': (str,), # noqa: E501 } - - class properties: - status_code = schemas.IntSchema - message = schemas.StrSchema - path = schemas.StrSchema - __annotations__ = { - "status_code": status_code, - "message": message, - "path": path, - } - - status_code: MetaOapg.properties.status_code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status_code"]) -> MetaOapg.properties.status_code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status_code", "message", "path", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status_code"]) -> MetaOapg.properties.status_code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> typing.Union[MetaOapg.properties.path, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status_code", "message", "path", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - status_code: typing.Union[MetaOapg.properties.status_code, decimal.Decimal, int, ], - message: typing.Union[MetaOapg.properties.message, str, ], - path: typing.Union[MetaOapg.properties.path, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectError': - return super().__new__( - cls, - *_args, - status_code=status_code, - message=message, - path=path, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status_code': 'status_code', # noqa: E501 + 'message': 'message', # noqa: E501 + 'path': 'path', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, status_code, message, *args, **kwargs): # noqa: E501 + """ObjectError - a model defined in OpenAPI + + Args: + status_code (int): HTTP status code associated for operation on path + message (str): short message explaining status_code + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + path (str): affected path. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.status_code = status_code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, status_code, message, *args, **kwargs): # noqa: E501 + """ObjectError - a model defined in OpenAPI + + Args: + status_code (int): HTTP status code associated for operation on path + message (str): short message explaining status_code + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + path (str): affected path. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.status_code = status_code + self.message = message + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/object_error.pyi b/clients/python/lakefs_client/model/object_error.pyi deleted file mode 100644 index a9133296327..00000000000 --- a/clients/python/lakefs_client/model/object_error.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ObjectError( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "status_code", - "message", - } - - class properties: - status_code = schemas.IntSchema - message = schemas.StrSchema - path = schemas.StrSchema - __annotations__ = { - "status_code": status_code, - "message": message, - "path": path, - } - - status_code: MetaOapg.properties.status_code - message: MetaOapg.properties.message - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status_code"]) -> MetaOapg.properties.status_code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status_code", "message", "path", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status_code"]) -> MetaOapg.properties.status_code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> typing.Union[MetaOapg.properties.path, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status_code", "message", "path", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - status_code: typing.Union[MetaOapg.properties.status_code, decimal.Decimal, int, ], - message: typing.Union[MetaOapg.properties.message, str, ], - path: typing.Union[MetaOapg.properties.path, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectError': - return super().__new__( - cls, - *_args, - status_code=status_code, - message=message, - path=path, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/object_error_list.py b/clients/python/lakefs_client/model/object_error_list.py index ae624e62b2d..5aff63d87cf 100644 --- a/clients/python/lakefs_client/model/object_error_list.py +++ b/clients/python/lakefs_client/model/object_error_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,102 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.object_error import ObjectError + globals()['ObjectError'] = ObjectError -class ObjectErrorList( - schemas.DictSchema -): + +class ObjectErrorList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "errors", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'errors': ([ObjectError],), # noqa: E501 } - - class properties: - - - class errors( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ObjectError']: - return ObjectError - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ObjectError'], typing.List['ObjectError']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'errors': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ObjectError': - return super().__getitem__(i) - __annotations__ = { - "errors": errors, - } - - errors: MetaOapg.properties.errors - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["errors"]) -> MetaOapg.properties.errors: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["errors", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["errors"]) -> MetaOapg.properties.errors: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["errors", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - errors: typing.Union[MetaOapg.properties.errors, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectErrorList': - return super().__new__( - cls, - *_args, - errors=errors, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_error import ObjectError + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'errors': 'errors', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, errors, *args, **kwargs): # noqa: E501 + """ObjectErrorList - a model defined in OpenAPI + + Args: + errors ([ObjectError]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.errors = errors + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, errors, *args, **kwargs): # noqa: E501 + """ObjectErrorList - a model defined in OpenAPI + + Args: + errors ([ObjectError]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.errors = errors + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/object_error_list.pyi b/clients/python/lakefs_client/model/object_error_list.pyi deleted file mode 100644 index ae624e62b2d..00000000000 --- a/clients/python/lakefs_client/model/object_error_list.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ObjectErrorList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "errors", - } - - class properties: - - - class errors( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ObjectError']: - return ObjectError - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ObjectError'], typing.List['ObjectError']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'errors': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ObjectError': - return super().__getitem__(i) - __annotations__ = { - "errors": errors, - } - - errors: MetaOapg.properties.errors - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["errors"]) -> MetaOapg.properties.errors: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["errors", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["errors"]) -> MetaOapg.properties.errors: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["errors", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - errors: typing.Union[MetaOapg.properties.errors, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectErrorList': - return super().__new__( - cls, - *_args, - errors=errors, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_error import ObjectError diff --git a/clients/python/lakefs_client/model/object_stage_creation.py b/clients/python/lakefs_client/model/object_stage_creation.py index 61c1ecc120a..9a1dbc138b3 100644 --- a/clients/python/lakefs_client/model/object_stage_creation.py +++ b/clients/python/lakefs_client/model/object_stage_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,134 +8,285 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.object_user_metadata import ObjectUserMetadata + globals()['ObjectUserMetadata'] = ObjectUserMetadata -class ObjectStageCreation( - schemas.DictSchema -): + +class ObjectStageCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "physical_address", - "size_bytes", - "checksum", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'physical_address': (str,), # noqa: E501 + 'checksum': (str,), # noqa: E501 + 'size_bytes': (int,), # noqa: E501 + 'mtime': (int,), # noqa: E501 + 'metadata': (ObjectUserMetadata,), # noqa: E501 + 'content_type': (str,), # noqa: E501 } - - class properties: - physical_address = schemas.StrSchema - checksum = schemas.StrSchema - size_bytes = schemas.Int64Schema - mtime = schemas.Int64Schema - - @staticmethod - def metadata() -> typing.Type['ObjectUserMetadata']: - return ObjectUserMetadata - content_type = schemas.StrSchema - __annotations__ = { - "physical_address": physical_address, - "checksum": checksum, - "size_bytes": size_bytes, - "mtime": mtime, - "metadata": metadata, - "content_type": content_type, - } - - physical_address: MetaOapg.properties.physical_address - size_bytes: MetaOapg.properties.size_bytes - checksum: MetaOapg.properties.checksum - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mtime"]) -> MetaOapg.properties.mtime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> 'ObjectUserMetadata': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content_type"]) -> MetaOapg.properties.content_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["physical_address", "checksum", "size_bytes", "mtime", "metadata", "content_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mtime"]) -> typing.Union[MetaOapg.properties.mtime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union['ObjectUserMetadata', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content_type"]) -> typing.Union[MetaOapg.properties.content_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["physical_address", "checksum", "size_bytes", "mtime", "metadata", "content_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - physical_address: typing.Union[MetaOapg.properties.physical_address, str, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, ], - checksum: typing.Union[MetaOapg.properties.checksum, str, ], - mtime: typing.Union[MetaOapg.properties.mtime, decimal.Decimal, int, schemas.Unset] = schemas.unset, - metadata: typing.Union['ObjectUserMetadata', schemas.Unset] = schemas.unset, - content_type: typing.Union[MetaOapg.properties.content_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectStageCreation': - return super().__new__( - cls, - *_args, - physical_address=physical_address, - size_bytes=size_bytes, - checksum=checksum, - mtime=mtime, - metadata=metadata, - content_type=content_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_user_metadata import ObjectUserMetadata + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'physical_address': 'physical_address', # noqa: E501 + 'checksum': 'checksum', # noqa: E501 + 'size_bytes': 'size_bytes', # noqa: E501 + 'mtime': 'mtime', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'content_type': 'content_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, physical_address, checksum, size_bytes, *args, **kwargs): # noqa: E501 + """ObjectStageCreation - a model defined in OpenAPI + + Args: + physical_address (str): + checksum (str): + size_bytes (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + mtime (int): Unix Epoch in seconds. [optional] # noqa: E501 + metadata (ObjectUserMetadata): [optional] # noqa: E501 + content_type (str): Object media type. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.physical_address = physical_address + self.checksum = checksum + self.size_bytes = size_bytes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, physical_address, checksum, size_bytes, *args, **kwargs): # noqa: E501 + """ObjectStageCreation - a model defined in OpenAPI + + Args: + physical_address (str): + checksum (str): + size_bytes (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + mtime (int): Unix Epoch in seconds. [optional] # noqa: E501 + metadata (ObjectUserMetadata): [optional] # noqa: E501 + content_type (str): Object media type. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.physical_address = physical_address + self.checksum = checksum + self.size_bytes = size_bytes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/object_stage_creation.pyi b/clients/python/lakefs_client/model/object_stage_creation.pyi deleted file mode 100644 index 61c1ecc120a..00000000000 --- a/clients/python/lakefs_client/model/object_stage_creation.pyi +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ObjectStageCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "physical_address", - "size_bytes", - "checksum", - } - - class properties: - physical_address = schemas.StrSchema - checksum = schemas.StrSchema - size_bytes = schemas.Int64Schema - mtime = schemas.Int64Schema - - @staticmethod - def metadata() -> typing.Type['ObjectUserMetadata']: - return ObjectUserMetadata - content_type = schemas.StrSchema - __annotations__ = { - "physical_address": physical_address, - "checksum": checksum, - "size_bytes": size_bytes, - "mtime": mtime, - "metadata": metadata, - "content_type": content_type, - } - - physical_address: MetaOapg.properties.physical_address - size_bytes: MetaOapg.properties.size_bytes - checksum: MetaOapg.properties.checksum - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mtime"]) -> MetaOapg.properties.mtime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> 'ObjectUserMetadata': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content_type"]) -> MetaOapg.properties.content_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["physical_address", "checksum", "size_bytes", "mtime", "metadata", "content_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mtime"]) -> typing.Union[MetaOapg.properties.mtime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union['ObjectUserMetadata', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content_type"]) -> typing.Union[MetaOapg.properties.content_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["physical_address", "checksum", "size_bytes", "mtime", "metadata", "content_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - physical_address: typing.Union[MetaOapg.properties.physical_address, str, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, ], - checksum: typing.Union[MetaOapg.properties.checksum, str, ], - mtime: typing.Union[MetaOapg.properties.mtime, decimal.Decimal, int, schemas.Unset] = schemas.unset, - metadata: typing.Union['ObjectUserMetadata', schemas.Unset] = schemas.unset, - content_type: typing.Union[MetaOapg.properties.content_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectStageCreation': - return super().__new__( - cls, - *_args, - physical_address=physical_address, - size_bytes=size_bytes, - checksum=checksum, - mtime=mtime, - metadata=metadata, - content_type=content_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_user_metadata import ObjectUserMetadata diff --git a/clients/python/lakefs_client/model/object_stats.py b/clients/python/lakefs_client/model/object_stats.py index f01b4bfd78c..3ee74da0473 100644 --- a/clients/python/lakefs_client/model/object_stats.py +++ b/clients/python/lakefs_client/model/object_stats.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,178 +8,301 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.object_user_metadata import ObjectUserMetadata + globals()['ObjectUserMetadata'] = ObjectUserMetadata -class ObjectStats( - schemas.DictSchema -): + +class ObjectStats(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('path_type',): { + 'COMMON_PREFIX': "common_prefix", + 'OBJECT': "object", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "physical_address", - "path", - "checksum", - "path_type", - "mtime", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'path': (str,), # noqa: E501 + 'path_type': (str,), # noqa: E501 + 'physical_address': (str,), # noqa: E501 + 'checksum': (str,), # noqa: E501 + 'mtime': (int,), # noqa: E501 + 'size_bytes': (int,), # noqa: E501 + 'metadata': (ObjectUserMetadata,), # noqa: E501 + 'content_type': (str,), # noqa: E501 } - - class properties: - path = schemas.StrSchema - - - class path_type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "common_prefix": "COMMON_PREFIX", - "object": "OBJECT", - } - - @schemas.classproperty - def COMMON_PREFIX(cls): - return cls("common_prefix") - - @schemas.classproperty - def OBJECT(cls): - return cls("object") - physical_address = schemas.StrSchema - checksum = schemas.StrSchema - mtime = schemas.Int64Schema - size_bytes = schemas.Int64Schema - - @staticmethod - def metadata() -> typing.Type['ObjectUserMetadata']: - return ObjectUserMetadata - content_type = schemas.StrSchema - __annotations__ = { - "path": path, - "path_type": path_type, - "physical_address": physical_address, - "checksum": checksum, - "mtime": mtime, - "size_bytes": size_bytes, - "metadata": metadata, - "content_type": content_type, - } - - physical_address: MetaOapg.properties.physical_address - path: MetaOapg.properties.path - checksum: MetaOapg.properties.checksum - path_type: MetaOapg.properties.path_type - mtime: MetaOapg.properties.mtime - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mtime"]) -> MetaOapg.properties.mtime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> 'ObjectUserMetadata': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content_type"]) -> MetaOapg.properties.content_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["path", "path_type", "physical_address", "checksum", "mtime", "size_bytes", "metadata", "content_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mtime"]) -> MetaOapg.properties.mtime: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> typing.Union[MetaOapg.properties.size_bytes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union['ObjectUserMetadata', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content_type"]) -> typing.Union[MetaOapg.properties.content_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["path", "path_type", "physical_address", "checksum", "mtime", "size_bytes", "metadata", "content_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - physical_address: typing.Union[MetaOapg.properties.physical_address, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - checksum: typing.Union[MetaOapg.properties.checksum, str, ], - path_type: typing.Union[MetaOapg.properties.path_type, str, ], - mtime: typing.Union[MetaOapg.properties.mtime, decimal.Decimal, int, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, schemas.Unset] = schemas.unset, - metadata: typing.Union['ObjectUserMetadata', schemas.Unset] = schemas.unset, - content_type: typing.Union[MetaOapg.properties.content_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectStats': - return super().__new__( - cls, - *_args, - physical_address=physical_address, - path=path, - checksum=checksum, - path_type=path_type, - mtime=mtime, - size_bytes=size_bytes, - metadata=metadata, - content_type=content_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_user_metadata import ObjectUserMetadata + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'path': 'path', # noqa: E501 + 'path_type': 'path_type', # noqa: E501 + 'physical_address': 'physical_address', # noqa: E501 + 'checksum': 'checksum', # noqa: E501 + 'mtime': 'mtime', # noqa: E501 + 'size_bytes': 'size_bytes', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'content_type': 'content_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, path, path_type, physical_address, checksum, mtime, *args, **kwargs): # noqa: E501 + """ObjectStats - a model defined in OpenAPI + + Args: + path (str): + path_type (str): + physical_address (str): The location of the object on the underlying object store. Formatted as a native URI with the object store type as scheme (\"s3://...\", \"gs://...\", etc.) Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET + checksum (str): + mtime (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + size_bytes (int): [optional] # noqa: E501 + metadata (ObjectUserMetadata): [optional] # noqa: E501 + content_type (str): Object media type. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.path = path + self.path_type = path_type + self.physical_address = physical_address + self.checksum = checksum + self.mtime = mtime + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, path, path_type, physical_address, checksum, mtime, *args, **kwargs): # noqa: E501 + """ObjectStats - a model defined in OpenAPI + + Args: + path (str): + path_type (str): + physical_address (str): The location of the object on the underlying object store. Formatted as a native URI with the object store type as scheme (\"s3://...\", \"gs://...\", etc.) Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET + checksum (str): + mtime (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + size_bytes (int): [optional] # noqa: E501 + metadata (ObjectUserMetadata): [optional] # noqa: E501 + content_type (str): Object media type. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.path = path + self.path_type = path_type + self.physical_address = physical_address + self.checksum = checksum + self.mtime = mtime + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/object_stats.pyi b/clients/python/lakefs_client/model/object_stats.pyi deleted file mode 100644 index d1e16be726c..00000000000 --- a/clients/python/lakefs_client/model/object_stats.pyi +++ /dev/null @@ -1,180 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ObjectStats( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "physical_address", - "path", - "checksum", - "path_type", - "mtime", - } - - class properties: - path = schemas.StrSchema - - - class path_type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def COMMON_PREFIX(cls): - return cls("common_prefix") - - @schemas.classproperty - def OBJECT(cls): - return cls("object") - physical_address = schemas.StrSchema - checksum = schemas.StrSchema - mtime = schemas.Int64Schema - size_bytes = schemas.Int64Schema - - @staticmethod - def metadata() -> typing.Type['ObjectUserMetadata']: - return ObjectUserMetadata - content_type = schemas.StrSchema - __annotations__ = { - "path": path, - "path_type": path_type, - "physical_address": physical_address, - "checksum": checksum, - "mtime": mtime, - "size_bytes": size_bytes, - "metadata": metadata, - "content_type": content_type, - } - - physical_address: MetaOapg.properties.physical_address - path: MetaOapg.properties.path - checksum: MetaOapg.properties.checksum - path_type: MetaOapg.properties.path_type - mtime: MetaOapg.properties.mtime - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mtime"]) -> MetaOapg.properties.mtime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> 'ObjectUserMetadata': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content_type"]) -> MetaOapg.properties.content_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["path", "path_type", "physical_address", "checksum", "mtime", "size_bytes", "metadata", "content_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path_type"]) -> MetaOapg.properties.path_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mtime"]) -> MetaOapg.properties.mtime: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> typing.Union[MetaOapg.properties.size_bytes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union['ObjectUserMetadata', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content_type"]) -> typing.Union[MetaOapg.properties.content_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["path", "path_type", "physical_address", "checksum", "mtime", "size_bytes", "metadata", "content_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - physical_address: typing.Union[MetaOapg.properties.physical_address, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - checksum: typing.Union[MetaOapg.properties.checksum, str, ], - path_type: typing.Union[MetaOapg.properties.path_type, str, ], - mtime: typing.Union[MetaOapg.properties.mtime, decimal.Decimal, int, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, schemas.Unset] = schemas.unset, - metadata: typing.Union['ObjectUserMetadata', schemas.Unset] = schemas.unset, - content_type: typing.Union[MetaOapg.properties.content_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectStats': - return super().__new__( - cls, - *_args, - physical_address=physical_address, - path=path, - checksum=checksum, - path_type=path_type, - mtime=mtime, - size_bytes=size_bytes, - metadata=metadata, - content_type=content_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_user_metadata import ObjectUserMetadata diff --git a/clients/python/lakefs_client/model/object_stats_list.py b/clients/python/lakefs_client/model/object_stats_list.py index 86f7427b503..0380ec06c8f 100644 --- a/clients/python/lakefs_client/model/object_stats_list.py +++ b/clients/python/lakefs_client/model/object_stats_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.object_stats import ObjectStats + from lakefs_client.model.pagination import Pagination + globals()['ObjectStats'] = ObjectStats + globals()['Pagination'] = Pagination -class ObjectStatsList( - schemas.DictSchema -): + +class ObjectStatsList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([ObjectStats],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ObjectStats']: - return ObjectStats - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ObjectStats'], typing.List['ObjectStats']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ObjectStats': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectStatsList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_stats import ObjectStats -from lakefs_client.model.pagination import Pagination + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """ObjectStatsList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([ObjectStats]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """ObjectStatsList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([ObjectStats]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/object_stats_list.pyi b/clients/python/lakefs_client/model/object_stats_list.pyi deleted file mode 100644 index 86f7427b503..00000000000 --- a/clients/python/lakefs_client/model/object_stats_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ObjectStatsList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ObjectStats']: - return ObjectStats - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ObjectStats'], typing.List['ObjectStats']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ObjectStats': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectStatsList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.object_stats import ObjectStats -from lakefs_client.model.pagination import Pagination diff --git a/clients/python/lakefs_client/model/object_user_metadata.py b/clients/python/lakefs_client/model/object_user_metadata.py index 887018b18ba..6bac8eb8d62 100644 --- a/clients/python/lakefs_client/model/object_user_metadata.py +++ b/clients/python/lakefs_client/model/object_user_metadata.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,49 +8,245 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class ObjectUserMetadata( - schemas.DictSchema -): +class ObjectUserMetadata(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (str,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ObjectUserMetadata - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """ObjectUserMetadata - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'ObjectUserMetadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/object_user_metadata.pyi b/clients/python/lakefs_client/model/object_user_metadata.pyi deleted file mode 100644 index 887018b18ba..00000000000 --- a/clients/python/lakefs_client/model/object_user_metadata.pyi +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ObjectUserMetadata( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'ObjectUserMetadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/otf_diff_entry.py b/clients/python/lakefs_client/model/otf_diff_entry.py index ba84c875c38..c3e5e1b4b93 100644 --- a/clients/python/lakefs_client/model/otf_diff_entry.py +++ b/clients/python/lakefs_client/model/otf_diff_entry.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,148 +8,284 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class OtfDiffEntry( - schemas.DictSchema -): +class OtfDiffEntry(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('operation_type',): { + 'CREATE': "create", + 'UPDATE': "update", + 'DELETE': "delete", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "operation_content", - "operation_type", - "id", - "operation", - "timestamp", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'timestamp': (int,), # noqa: E501 + 'operation': (str,), # noqa: E501 + 'operation_content': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'operation_type': (str,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - timestamp = schemas.IntSchema - operation = schemas.StrSchema - operation_content = schemas.DictSchema - - - class operation_type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "create": "CREATE", - "update": "UPDATE", - "delete": "DELETE", - } - - @schemas.classproperty - def CREATE(cls): - return cls("create") - - @schemas.classproperty - def UPDATE(cls): - return cls("update") - - @schemas.classproperty - def DELETE(cls): - return cls("delete") - __annotations__ = { - "id": id, - "timestamp": timestamp, - "operation": operation, - "operation_content": operation_content, - "operation_type": operation_type, - } - - operation_content: MetaOapg.properties.operation_content - operation_type: MetaOapg.properties.operation_type - id: MetaOapg.properties.id - operation: MetaOapg.properties.operation - timestamp: MetaOapg.properties.timestamp - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["operation"]) -> MetaOapg.properties.operation: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["operation_content"]) -> MetaOapg.properties.operation_content: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["operation_type"]) -> MetaOapg.properties.operation_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "timestamp", "operation", "operation_content", "operation_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["operation"]) -> MetaOapg.properties.operation: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["operation_content"]) -> MetaOapg.properties.operation_content: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["operation_type"]) -> MetaOapg.properties.operation_type: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "timestamp", "operation", "operation_content", "operation_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - operation_content: typing.Union[MetaOapg.properties.operation_content, dict, frozendict.frozendict, ], - operation_type: typing.Union[MetaOapg.properties.operation_type, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - operation: typing.Union[MetaOapg.properties.operation, str, ], - timestamp: typing.Union[MetaOapg.properties.timestamp, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OtfDiffEntry': - return super().__new__( - cls, - *_args, - operation_content=operation_content, - operation_type=operation_type, - id=id, - operation=operation, - timestamp=timestamp, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'timestamp': 'timestamp', # noqa: E501 + 'operation': 'operation', # noqa: E501 + 'operation_content': 'operation_content', # noqa: E501 + 'operation_type': 'operation_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, timestamp, operation, operation_content, operation_type, *args, **kwargs): # noqa: E501 + """OtfDiffEntry - a model defined in OpenAPI + + Args: + id (str): + timestamp (int): + operation (str): + operation_content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): free form content describing the returned operation diff + operation_type (str): the operation category (CUD) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.timestamp = timestamp + self.operation = operation + self.operation_content = operation_content + self.operation_type = operation_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, timestamp, operation, operation_content, operation_type, *args, **kwargs): # noqa: E501 + """OtfDiffEntry - a model defined in OpenAPI + + Args: + id (str): + timestamp (int): + operation (str): + operation_content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): free form content describing the returned operation diff + operation_type (str): the operation category (CUD) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.timestamp = timestamp + self.operation = operation + self.operation_content = operation_content + self.operation_type = operation_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/otf_diff_entry.pyi b/clients/python/lakefs_client/model/otf_diff_entry.pyi deleted file mode 100644 index 3840e205178..00000000000 --- a/clients/python/lakefs_client/model/otf_diff_entry.pyi +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class OtfDiffEntry( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "operation_content", - "operation_type", - "id", - "operation", - "timestamp", - } - - class properties: - id = schemas.StrSchema - timestamp = schemas.IntSchema - operation = schemas.StrSchema - operation_content = schemas.DictSchema - - - class operation_type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def CREATE(cls): - return cls("create") - - @schemas.classproperty - def UPDATE(cls): - return cls("update") - - @schemas.classproperty - def DELETE(cls): - return cls("delete") - __annotations__ = { - "id": id, - "timestamp": timestamp, - "operation": operation, - "operation_content": operation_content, - "operation_type": operation_type, - } - - operation_content: MetaOapg.properties.operation_content - operation_type: MetaOapg.properties.operation_type - id: MetaOapg.properties.id - operation: MetaOapg.properties.operation - timestamp: MetaOapg.properties.timestamp - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["operation"]) -> MetaOapg.properties.operation: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["operation_content"]) -> MetaOapg.properties.operation_content: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["operation_type"]) -> MetaOapg.properties.operation_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "timestamp", "operation", "operation_content", "operation_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["operation"]) -> MetaOapg.properties.operation: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["operation_content"]) -> MetaOapg.properties.operation_content: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["operation_type"]) -> MetaOapg.properties.operation_type: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "timestamp", "operation", "operation_content", "operation_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - operation_content: typing.Union[MetaOapg.properties.operation_content, dict, frozendict.frozendict, ], - operation_type: typing.Union[MetaOapg.properties.operation_type, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - operation: typing.Union[MetaOapg.properties.operation, str, ], - timestamp: typing.Union[MetaOapg.properties.timestamp, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OtfDiffEntry': - return super().__new__( - cls, - *_args, - operation_content=operation_content, - operation_type=operation_type, - id=id, - operation=operation, - timestamp=timestamp, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/otf_diff_list.py b/clients/python/lakefs_client/model/otf_diff_list.py index a4689349622..2e8b7fdfc0f 100644 --- a/clients/python/lakefs_client/model/otf_diff_list.py +++ b/clients/python/lakefs_client/model/otf_diff_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,137 +8,270 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.otf_diff_entry import OtfDiffEntry + globals()['OtfDiffEntry'] = OtfDiffEntry -class OtfDiffList( - schemas.DictSchema -): + +class OtfDiffList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('diff_type',): { + 'CREATED': "created", + 'DROPPED': "dropped", + 'CHANGED': "changed", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'results': ([OtfDiffEntry],), # noqa: E501 + 'diff_type': (str,), # noqa: E501 } - - class properties: - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OtfDiffEntry']: - return OtfDiffEntry - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OtfDiffEntry'], typing.List['OtfDiffEntry']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OtfDiffEntry': - return super().__getitem__(i) - - - class diff_type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "created": "CREATED", - "dropped": "DROPPED", - "changed": "CHANGED", - } - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def DROPPED(cls): - return cls("dropped") - - @schemas.classproperty - def CHANGED(cls): - return cls("changed") - __annotations__ = { - "results": results, - "diff_type": diff_type, - } - - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["diff_type"]) -> MetaOapg.properties.diff_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["results", "diff_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["diff_type"]) -> typing.Union[MetaOapg.properties.diff_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["results", "diff_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - diff_type: typing.Union[MetaOapg.properties.diff_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OtfDiffList': - return super().__new__( - cls, - *_args, - results=results, - diff_type=diff_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.otf_diff_entry import OtfDiffEntry + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'results': 'results', # noqa: E501 + 'diff_type': 'diff_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, results, *args, **kwargs): # noqa: E501 + """OtfDiffList - a model defined in OpenAPI + + Args: + results ([OtfDiffEntry]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + diff_type (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, results, *args, **kwargs): # noqa: E501 + """OtfDiffList - a model defined in OpenAPI + + Args: + results ([OtfDiffEntry]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + diff_type (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/otf_diff_list.pyi b/clients/python/lakefs_client/model/otf_diff_list.pyi deleted file mode 100644 index 86c16e2d6a2..00000000000 --- a/clients/python/lakefs_client/model/otf_diff_list.pyi +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class OtfDiffList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "results", - } - - class properties: - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OtfDiffEntry']: - return OtfDiffEntry - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OtfDiffEntry'], typing.List['OtfDiffEntry']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OtfDiffEntry': - return super().__getitem__(i) - - - class diff_type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def CREATED(cls): - return cls("created") - - @schemas.classproperty - def DROPPED(cls): - return cls("dropped") - - @schemas.classproperty - def CHANGED(cls): - return cls("changed") - __annotations__ = { - "results": results, - "diff_type": diff_type, - } - - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["diff_type"]) -> MetaOapg.properties.diff_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["results", "diff_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["diff_type"]) -> typing.Union[MetaOapg.properties.diff_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["results", "diff_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - diff_type: typing.Union[MetaOapg.properties.diff_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OtfDiffList': - return super().__new__( - cls, - *_args, - results=results, - diff_type=diff_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.otf_diff_entry import OtfDiffEntry diff --git a/clients/python/lakefs_client/model/pagination.py b/clients/python/lakefs_client/model/pagination.py index c0c34739a68..af48812e378 100644 --- a/clients/python/lakefs_client/model/pagination.py +++ b/clients/python/lakefs_client/model/pagination.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,127 +8,279 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Pagination( - schemas.DictSchema -): +class Pagination(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('results',): { + 'inclusive_minimum': 0, + }, + ('max_per_page',): { + 'inclusive_minimum': 0, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "max_per_page", - "has_more", - "next_offset", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'has_more': (bool,), # noqa: E501 + 'next_offset': (str,), # noqa: E501 + 'results': (int,), # noqa: E501 + 'max_per_page': (int,), # noqa: E501 } - - class properties: - has_more = schemas.BoolSchema - next_offset = schemas.StrSchema - - - class results( - schemas.IntSchema - ): - - - class MetaOapg: - inclusive_minimum = 0 - - - class max_per_page( - schemas.IntSchema - ): - - - class MetaOapg: - inclusive_minimum = 0 - __annotations__ = { - "has_more": has_more, - "next_offset": next_offset, - "results": results, - "max_per_page": max_per_page, - } - - max_per_page: MetaOapg.properties.max_per_page - has_more: MetaOapg.properties.has_more - next_offset: MetaOapg.properties.next_offset - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["next_offset"]) -> MetaOapg.properties.next_offset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_per_page"]) -> MetaOapg.properties.max_per_page: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["has_more", "next_offset", "results", "max_per_page", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["next_offset"]) -> MetaOapg.properties.next_offset: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_per_page"]) -> MetaOapg.properties.max_per_page: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["has_more", "next_offset", "results", "max_per_page", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - max_per_page: typing.Union[MetaOapg.properties.max_per_page, decimal.Decimal, int, ], - has_more: typing.Union[MetaOapg.properties.has_more, bool, ], - next_offset: typing.Union[MetaOapg.properties.next_offset, str, ], - results: typing.Union[MetaOapg.properties.results, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Pagination': - return super().__new__( - cls, - *_args, - max_per_page=max_per_page, - has_more=has_more, - next_offset=next_offset, - results=results, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'has_more': 'has_more', # noqa: E501 + 'next_offset': 'next_offset', # noqa: E501 + 'results': 'results', # noqa: E501 + 'max_per_page': 'max_per_page', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, has_more, next_offset, results, max_per_page, *args, **kwargs): # noqa: E501 + """Pagination - a model defined in OpenAPI + + Args: + has_more (bool): Next page is available + next_offset (str): Token used to retrieve the next page + results (int): Number of values found in the results + max_per_page (int): Maximal number of entries per page + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.has_more = has_more + self.next_offset = next_offset + self.results = results + self.max_per_page = max_per_page + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, has_more, next_offset, results, max_per_page, *args, **kwargs): # noqa: E501 + """Pagination - a model defined in OpenAPI + + Args: + has_more (bool): Next page is available + next_offset (str): Token used to retrieve the next page + results (int): Number of values found in the results + max_per_page (int): Maximal number of entries per page + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.has_more = has_more + self.next_offset = next_offset + self.results = results + self.max_per_page = max_per_page + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/pagination.pyi b/clients/python/lakefs_client/model/pagination.pyi deleted file mode 100644 index e11be0e7e37..00000000000 --- a/clients/python/lakefs_client/model/pagination.pyi +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Pagination( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "max_per_page", - "has_more", - "next_offset", - "results", - } - - class properties: - has_more = schemas.BoolSchema - next_offset = schemas.StrSchema - - - class results( - schemas.IntSchema - ): - pass - - - class max_per_page( - schemas.IntSchema - ): - pass - __annotations__ = { - "has_more": has_more, - "next_offset": next_offset, - "results": results, - "max_per_page": max_per_page, - } - - max_per_page: MetaOapg.properties.max_per_page - has_more: MetaOapg.properties.has_more - next_offset: MetaOapg.properties.next_offset - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["next_offset"]) -> MetaOapg.properties.next_offset: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_per_page"]) -> MetaOapg.properties.max_per_page: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["has_more", "next_offset", "results", "max_per_page", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["has_more"]) -> MetaOapg.properties.has_more: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["next_offset"]) -> MetaOapg.properties.next_offset: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_per_page"]) -> MetaOapg.properties.max_per_page: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["has_more", "next_offset", "results", "max_per_page", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - max_per_page: typing.Union[MetaOapg.properties.max_per_page, decimal.Decimal, int, ], - has_more: typing.Union[MetaOapg.properties.has_more, bool, ], - next_offset: typing.Union[MetaOapg.properties.next_offset, str, ], - results: typing.Union[MetaOapg.properties.results, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Pagination': - return super().__new__( - cls, - *_args, - max_per_page=max_per_page, - has_more=has_more, - next_offset=next_offset, - results=results, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/path_list.py b/clients/python/lakefs_client/model/path_list.py index 6d600b3b578..6fb00f9a282 100644 --- a/clients/python/lakefs_client/model/path_list.py +++ b/clients/python/lakefs_client/model/path_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,97 +8,255 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class PathList( - schemas.DictSchema -): +class PathList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "paths", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'paths': ([str],), # noqa: E501 } - - class properties: - - - class paths( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'paths': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "paths": paths, - } - - paths: MetaOapg.properties.paths - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["paths"]) -> MetaOapg.properties.paths: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["paths", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["paths"]) -> MetaOapg.properties.paths: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["paths", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - paths: typing.Union[MetaOapg.properties.paths, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PathList': - return super().__new__( - cls, - *_args, - paths=paths, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'paths': 'paths', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, paths, *args, **kwargs): # noqa: E501 + """PathList - a model defined in OpenAPI + + Args: + paths ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.paths = paths + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, paths, *args, **kwargs): # noqa: E501 + """PathList - a model defined in OpenAPI + + Args: + paths ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.paths = paths + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/path_list.pyi b/clients/python/lakefs_client/model/path_list.pyi deleted file mode 100644 index 6d600b3b578..00000000000 --- a/clients/python/lakefs_client/model/path_list.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class PathList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "paths", - } - - class properties: - - - class paths( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'paths': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "paths": paths, - } - - paths: MetaOapg.properties.paths - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["paths"]) -> MetaOapg.properties.paths: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["paths", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["paths"]) -> MetaOapg.properties.paths: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["paths", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - paths: typing.Union[MetaOapg.properties.paths, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PathList': - return super().__new__( - cls, - *_args, - paths=paths, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/policy.py b/clients/python/lakefs_client/model/policy.py index 2d6ea701b06..922674c3e9d 100644 --- a/clients/python/lakefs_client/model/policy.py +++ b/clients/python/lakefs_client/model/policy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,125 +8,274 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.statement import Statement + globals()['Statement'] = Statement -class Policy( - schemas.DictSchema -): + +class Policy(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('statement',): { + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "statement", - "id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'statement': ([Statement],), # noqa: E501 + 'creation_date': (int,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - - - class statement( - schemas.ListSchema - ): - - - class MetaOapg: - min_items = 1 - - @staticmethod - def items() -> typing.Type['Statement']: - return Statement - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Statement'], typing.List['Statement']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'statement': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Statement': - return super().__getitem__(i) - creation_date = schemas.Int64Schema - __annotations__ = { - "id": id, - "statement": statement, - "creation_date": creation_date, - } - - statement: MetaOapg.properties.statement - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["statement"]) -> MetaOapg.properties.statement: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "statement", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["statement"]) -> MetaOapg.properties.statement: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> typing.Union[MetaOapg.properties.creation_date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "statement", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - statement: typing.Union[MetaOapg.properties.statement, list, tuple, ], - id: typing.Union[MetaOapg.properties.id, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Policy': - return super().__new__( - cls, - *_args, - statement=statement, - id=id, - creation_date=creation_date, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.statement import Statement + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'statement': 'statement', # noqa: E501 + 'creation_date': 'creation_date', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, statement, *args, **kwargs): # noqa: E501 + """Policy - a model defined in OpenAPI + + Args: + id (str): + statement ([Statement]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creation_date (int): Unix Epoch in seconds. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.statement = statement + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, statement, *args, **kwargs): # noqa: E501 + """Policy - a model defined in OpenAPI + + Args: + id (str): + statement ([Statement]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + creation_date (int): Unix Epoch in seconds. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.statement = statement + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/policy.pyi b/clients/python/lakefs_client/model/policy.pyi deleted file mode 100644 index 7a21a6ba4ff..00000000000 --- a/clients/python/lakefs_client/model/policy.pyi +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Policy( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "statement", - "id", - } - - class properties: - id = schemas.StrSchema - - - class statement( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Statement']: - return Statement - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Statement'], typing.List['Statement']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'statement': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Statement': - return super().__getitem__(i) - creation_date = schemas.Int64Schema - __annotations__ = { - "id": id, - "statement": statement, - "creation_date": creation_date, - } - - statement: MetaOapg.properties.statement - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["statement"]) -> MetaOapg.properties.statement: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "statement", "creation_date", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["statement"]) -> MetaOapg.properties.statement: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> typing.Union[MetaOapg.properties.creation_date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "statement", "creation_date", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - statement: typing.Union[MetaOapg.properties.statement, list, tuple, ], - id: typing.Union[MetaOapg.properties.id, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Policy': - return super().__new__( - cls, - *_args, - statement=statement, - id=id, - creation_date=creation_date, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.statement import Statement diff --git a/clients/python/lakefs_client/model/policy_list.py b/clients/python/lakefs_client/model/policy_list.py index c5d0c517c34..c50d9525021 100644 --- a/clients/python/lakefs_client/model/policy_list.py +++ b/clients/python/lakefs_client/model/policy_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.pagination import Pagination + from lakefs_client.model.policy import Policy + globals()['Pagination'] = Pagination + globals()['Policy'] = Policy -class PolicyList( - schemas.DictSchema -): + +class PolicyList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([Policy],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Policy']: - return Policy - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Policy'], typing.List['Policy']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Policy': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PolicyList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.policy import Policy + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """PolicyList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Policy]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """PolicyList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Policy]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/policy_list.pyi b/clients/python/lakefs_client/model/policy_list.pyi deleted file mode 100644 index c5d0c517c34..00000000000 --- a/clients/python/lakefs_client/model/policy_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class PolicyList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Policy']: - return Policy - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Policy'], typing.List['Policy']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Policy': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PolicyList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.policy import Policy diff --git a/clients/python/lakefs_client/model/prepare_gc_uncommitted_request.py b/clients/python/lakefs_client/model/prepare_gc_uncommitted_request.py index 2a20c8d9acb..ca91ee284cc 100644 --- a/clients/python/lakefs_client/model/prepare_gc_uncommitted_request.py +++ b/clients/python/lakefs_client/model/prepare_gc_uncommitted_request.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,70 +8,249 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class PrepareGCUncommittedRequest( - schemas.DictSchema -): +class PrepareGCUncommittedRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'continuation_token': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'continuation_token': 'continuation_token', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PrepareGCUncommittedRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """PrepareGCUncommittedRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - continuation_token = schemas.StrSchema - __annotations__ = { - "continuation_token": continuation_token, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PrepareGCUncommittedRequest': - return super().__new__( - cls, - *_args, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/prepare_gc_uncommitted_request.pyi b/clients/python/lakefs_client/model/prepare_gc_uncommitted_request.pyi deleted file mode 100644 index 2a20c8d9acb..00000000000 --- a/clients/python/lakefs_client/model/prepare_gc_uncommitted_request.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class PrepareGCUncommittedRequest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - continuation_token = schemas.StrSchema - __annotations__ = { - "continuation_token": continuation_token, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PrepareGCUncommittedRequest': - return super().__new__( - cls, - *_args, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/prepare_gc_uncommitted_response.py b/clients/python/lakefs_client/model/prepare_gc_uncommitted_response.py index e6352289107..de1d0f9e4b3 100644 --- a/clients/python/lakefs_client/model/prepare_gc_uncommitted_response.py +++ b/clients/python/lakefs_client/model/prepare_gc_uncommitted_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,97 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class PrepareGCUncommittedResponse( - schemas.DictSchema -): +class PrepareGCUncommittedResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "run_id", - "gc_uncommitted_location", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'run_id': (str,), # noqa: E501 + 'gc_uncommitted_location': (str,), # noqa: E501 + 'continuation_token': (str,), # noqa: E501 } - - class properties: - run_id = schemas.StrSchema - gc_uncommitted_location = schemas.StrSchema - continuation_token = schemas.StrSchema - __annotations__ = { - "run_id": run_id, - "gc_uncommitted_location": gc_uncommitted_location, - "continuation_token": continuation_token, - } - - run_id: MetaOapg.properties.run_id - gc_uncommitted_location: MetaOapg.properties.gc_uncommitted_location - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gc_uncommitted_location"]) -> MetaOapg.properties.gc_uncommitted_location: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_uncommitted_location", "continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gc_uncommitted_location"]) -> MetaOapg.properties.gc_uncommitted_location: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_uncommitted_location", "continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - run_id: typing.Union[MetaOapg.properties.run_id, str, ], - gc_uncommitted_location: typing.Union[MetaOapg.properties.gc_uncommitted_location, str, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PrepareGCUncommittedResponse': - return super().__new__( - cls, - *_args, - run_id=run_id, - gc_uncommitted_location=gc_uncommitted_location, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'run_id': 'run_id', # noqa: E501 + 'gc_uncommitted_location': 'gc_uncommitted_location', # noqa: E501 + 'continuation_token': 'continuation_token', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, run_id, gc_uncommitted_location, *args, **kwargs): # noqa: E501 + """PrepareGCUncommittedResponse - a model defined in OpenAPI + + Args: + run_id (str): + gc_uncommitted_location (str): location of uncommitted information data + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.run_id = run_id + self.gc_uncommitted_location = gc_uncommitted_location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, run_id, gc_uncommitted_location, *args, **kwargs): # noqa: E501 + """PrepareGCUncommittedResponse - a model defined in OpenAPI + + Args: + run_id (str): + gc_uncommitted_location (str): location of uncommitted information data + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.run_id = run_id + self.gc_uncommitted_location = gc_uncommitted_location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/prepare_gc_uncommitted_response.pyi b/clients/python/lakefs_client/model/prepare_gc_uncommitted_response.pyi deleted file mode 100644 index e6352289107..00000000000 --- a/clients/python/lakefs_client/model/prepare_gc_uncommitted_response.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class PrepareGCUncommittedResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "run_id", - "gc_uncommitted_location", - } - - class properties: - run_id = schemas.StrSchema - gc_uncommitted_location = schemas.StrSchema - continuation_token = schemas.StrSchema - __annotations__ = { - "run_id": run_id, - "gc_uncommitted_location": gc_uncommitted_location, - "continuation_token": continuation_token, - } - - run_id: MetaOapg.properties.run_id - gc_uncommitted_location: MetaOapg.properties.gc_uncommitted_location - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gc_uncommitted_location"]) -> MetaOapg.properties.gc_uncommitted_location: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_uncommitted_location", "continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["run_id"]) -> MetaOapg.properties.run_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gc_uncommitted_location"]) -> MetaOapg.properties.gc_uncommitted_location: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["run_id", "gc_uncommitted_location", "continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - run_id: typing.Union[MetaOapg.properties.run_id, str, ], - gc_uncommitted_location: typing.Union[MetaOapg.properties.gc_uncommitted_location, str, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PrepareGCUncommittedResponse': - return super().__new__( - cls, - *_args, - run_id=run_id, - gc_uncommitted_location=gc_uncommitted_location, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/range_metadata.py b/clients/python/lakefs_client/model/range_metadata.py index 113d58e4f57..e37b296830f 100644 --- a/clients/python/lakefs_client/model/range_metadata.py +++ b/clients/python/lakefs_client/model/range_metadata.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,123 +8,279 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class RangeMetadata( - schemas.DictSchema -): +class RangeMetadata(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "max_key", - "count", - "estimated_size", - "id", - "min_key", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'min_key': (str,), # noqa: E501 + 'max_key': (str,), # noqa: E501 + 'count': (int,), # noqa: E501 + 'estimated_size': (int,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - min_key = schemas.StrSchema - max_key = schemas.StrSchema - count = schemas.IntSchema - estimated_size = schemas.IntSchema - __annotations__ = { - "id": id, - "min_key": min_key, - "max_key": max_key, - "count": count, - "estimated_size": estimated_size, - } - - max_key: MetaOapg.properties.max_key - count: MetaOapg.properties.count - estimated_size: MetaOapg.properties.estimated_size - id: MetaOapg.properties.id - min_key: MetaOapg.properties.min_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_key"]) -> MetaOapg.properties.min_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_key"]) -> MetaOapg.properties.max_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["estimated_size"]) -> MetaOapg.properties.estimated_size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "min_key", "max_key", "count", "estimated_size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_key"]) -> MetaOapg.properties.min_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_key"]) -> MetaOapg.properties.max_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["estimated_size"]) -> MetaOapg.properties.estimated_size: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "min_key", "max_key", "count", "estimated_size", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - max_key: typing.Union[MetaOapg.properties.max_key, str, ], - count: typing.Union[MetaOapg.properties.count, decimal.Decimal, int, ], - estimated_size: typing.Union[MetaOapg.properties.estimated_size, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - min_key: typing.Union[MetaOapg.properties.min_key, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RangeMetadata': - return super().__new__( - cls, - *_args, - max_key=max_key, - count=count, - estimated_size=estimated_size, - id=id, - min_key=min_key, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'min_key': 'min_key', # noqa: E501 + 'max_key': 'max_key', # noqa: E501 + 'count': 'count', # noqa: E501 + 'estimated_size': 'estimated_size', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, min_key, max_key, count, estimated_size, *args, **kwargs): # noqa: E501 + """RangeMetadata - a model defined in OpenAPI + + Args: + id (str): ID of the range. + min_key (str): First key in the range. + max_key (str): Last key in the range. + count (int): Number of records in the range. + estimated_size (int): Estimated size of the range in bytes + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.min_key = min_key + self.max_key = max_key + self.count = count + self.estimated_size = estimated_size + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, min_key, max_key, count, estimated_size, *args, **kwargs): # noqa: E501 + """RangeMetadata - a model defined in OpenAPI + + Args: + id (str): ID of the range. + min_key (str): First key in the range. + max_key (str): Last key in the range. + count (int): Number of records in the range. + estimated_size (int): Estimated size of the range in bytes + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.min_key = min_key + self.max_key = max_key + self.count = count + self.estimated_size = estimated_size + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/range_metadata.pyi b/clients/python/lakefs_client/model/range_metadata.pyi deleted file mode 100644 index 113d58e4f57..00000000000 --- a/clients/python/lakefs_client/model/range_metadata.pyi +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class RangeMetadata( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "max_key", - "count", - "estimated_size", - "id", - "min_key", - } - - class properties: - id = schemas.StrSchema - min_key = schemas.StrSchema - max_key = schemas.StrSchema - count = schemas.IntSchema - estimated_size = schemas.IntSchema - __annotations__ = { - "id": id, - "min_key": min_key, - "max_key": max_key, - "count": count, - "estimated_size": estimated_size, - } - - max_key: MetaOapg.properties.max_key - count: MetaOapg.properties.count - estimated_size: MetaOapg.properties.estimated_size - id: MetaOapg.properties.id - min_key: MetaOapg.properties.min_key - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_key"]) -> MetaOapg.properties.min_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_key"]) -> MetaOapg.properties.max_key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["estimated_size"]) -> MetaOapg.properties.estimated_size: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "min_key", "max_key", "count", "estimated_size", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_key"]) -> MetaOapg.properties.min_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_key"]) -> MetaOapg.properties.max_key: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["estimated_size"]) -> MetaOapg.properties.estimated_size: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "min_key", "max_key", "count", "estimated_size", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - max_key: typing.Union[MetaOapg.properties.max_key, str, ], - count: typing.Union[MetaOapg.properties.count, decimal.Decimal, int, ], - estimated_size: typing.Union[MetaOapg.properties.estimated_size, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - min_key: typing.Union[MetaOapg.properties.min_key, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RangeMetadata': - return super().__new__( - cls, - *_args, - max_key=max_key, - count=count, - estimated_size=estimated_size, - id=id, - min_key=min_key, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/ref.py b/clients/python/lakefs_client/model/ref.py index 8625c4169a2..a096da7a5f5 100644 --- a/clients/python/lakefs_client/model/ref.py +++ b/clients/python/lakefs_client/model/ref.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Ref( - schemas.DictSchema -): +class Ref(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "id", - "commit_id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'commit_id': (str,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - commit_id = schemas.StrSchema - __annotations__ = { - "id": id, - "commit_id": commit_id, - } - - id: MetaOapg.properties.id - commit_id: MetaOapg.properties.commit_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "commit_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "commit_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - commit_id: typing.Union[MetaOapg.properties.commit_id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Ref': - return super().__new__( - cls, - *_args, - id=id, - commit_id=commit_id, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'commit_id': 'commit_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, commit_id, *args, **kwargs): # noqa: E501 + """Ref - a model defined in OpenAPI + + Args: + id (str): + commit_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.commit_id = commit_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, commit_id, *args, **kwargs): # noqa: E501 + """Ref - a model defined in OpenAPI + + Args: + id (str): + commit_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.commit_id = commit_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/ref.pyi b/clients/python/lakefs_client/model/ref.pyi deleted file mode 100644 index 8625c4169a2..00000000000 --- a/clients/python/lakefs_client/model/ref.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Ref( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "id", - "commit_id", - } - - class properties: - id = schemas.StrSchema - commit_id = schemas.StrSchema - __annotations__ = { - "id": id, - "commit_id": commit_id, - } - - id: MetaOapg.properties.id - commit_id: MetaOapg.properties.commit_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "commit_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["commit_id"]) -> MetaOapg.properties.commit_id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "commit_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - commit_id: typing.Union[MetaOapg.properties.commit_id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Ref': - return super().__new__( - cls, - *_args, - id=id, - commit_id=commit_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/ref_list.py b/clients/python/lakefs_client/model/ref_list.py index 69d79599278..3c4d9d74150 100644 --- a/clients/python/lakefs_client/model/ref_list.py +++ b/clients/python/lakefs_client/model/ref_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.pagination import Pagination + from lakefs_client.model.ref import Ref + globals()['Pagination'] = Pagination + globals()['Ref'] = Ref -class RefList( - schemas.DictSchema -): + +class RefList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([Ref],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Ref']: - return Ref - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Ref'], typing.List['Ref']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Ref': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.ref import Ref + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """RefList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Ref]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """RefList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Ref]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/ref_list.pyi b/clients/python/lakefs_client/model/ref_list.pyi deleted file mode 100644 index 69d79599278..00000000000 --- a/clients/python/lakefs_client/model/ref_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class RefList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Ref']: - return Ref - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Ref'], typing.List['Ref']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Ref': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.ref import Ref diff --git a/clients/python/lakefs_client/model/refs_dump.py b/clients/python/lakefs_client/model/refs_dump.py index 04cf8ca8295..49f9ad2e76c 100644 --- a/clients/python/lakefs_client/model/refs_dump.py +++ b/clients/python/lakefs_client/model/refs_dump.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,99 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class RefsDump( - schemas.DictSchema -): +class RefsDump(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "branches_meta_range_id", - "tags_meta_range_id", - "commits_meta_range_id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'commits_meta_range_id': (str,), # noqa: E501 + 'tags_meta_range_id': (str,), # noqa: E501 + 'branches_meta_range_id': (str,), # noqa: E501 } - - class properties: - commits_meta_range_id = schemas.StrSchema - tags_meta_range_id = schemas.StrSchema - branches_meta_range_id = schemas.StrSchema - __annotations__ = { - "commits_meta_range_id": commits_meta_range_id, - "tags_meta_range_id": tags_meta_range_id, - "branches_meta_range_id": branches_meta_range_id, - } - - branches_meta_range_id: MetaOapg.properties.branches_meta_range_id - tags_meta_range_id: MetaOapg.properties.tags_meta_range_id - commits_meta_range_id: MetaOapg.properties.commits_meta_range_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["commits_meta_range_id"]) -> MetaOapg.properties.commits_meta_range_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags_meta_range_id"]) -> MetaOapg.properties.tags_meta_range_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branches_meta_range_id"]) -> MetaOapg.properties.branches_meta_range_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["commits_meta_range_id", "tags_meta_range_id", "branches_meta_range_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["commits_meta_range_id"]) -> MetaOapg.properties.commits_meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags_meta_range_id"]) -> MetaOapg.properties.tags_meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branches_meta_range_id"]) -> MetaOapg.properties.branches_meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["commits_meta_range_id", "tags_meta_range_id", "branches_meta_range_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - branches_meta_range_id: typing.Union[MetaOapg.properties.branches_meta_range_id, str, ], - tags_meta_range_id: typing.Union[MetaOapg.properties.tags_meta_range_id, str, ], - commits_meta_range_id: typing.Union[MetaOapg.properties.commits_meta_range_id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefsDump': - return super().__new__( - cls, - *_args, - branches_meta_range_id=branches_meta_range_id, - tags_meta_range_id=tags_meta_range_id, - commits_meta_range_id=commits_meta_range_id, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'commits_meta_range_id': 'commits_meta_range_id', # noqa: E501 + 'tags_meta_range_id': 'tags_meta_range_id', # noqa: E501 + 'branches_meta_range_id': 'branches_meta_range_id', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, commits_meta_range_id, tags_meta_range_id, branches_meta_range_id, *args, **kwargs): # noqa: E501 + """RefsDump - a model defined in OpenAPI + + Args: + commits_meta_range_id (str): + tags_meta_range_id (str): + branches_meta_range_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.commits_meta_range_id = commits_meta_range_id + self.tags_meta_range_id = tags_meta_range_id + self.branches_meta_range_id = branches_meta_range_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, commits_meta_range_id, tags_meta_range_id, branches_meta_range_id, *args, **kwargs): # noqa: E501 + """RefsDump - a model defined in OpenAPI + + Args: + commits_meta_range_id (str): + tags_meta_range_id (str): + branches_meta_range_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.commits_meta_range_id = commits_meta_range_id + self.tags_meta_range_id = tags_meta_range_id + self.branches_meta_range_id = branches_meta_range_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/refs_dump.pyi b/clients/python/lakefs_client/model/refs_dump.pyi deleted file mode 100644 index 04cf8ca8295..00000000000 --- a/clients/python/lakefs_client/model/refs_dump.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class RefsDump( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "branches_meta_range_id", - "tags_meta_range_id", - "commits_meta_range_id", - } - - class properties: - commits_meta_range_id = schemas.StrSchema - tags_meta_range_id = schemas.StrSchema - branches_meta_range_id = schemas.StrSchema - __annotations__ = { - "commits_meta_range_id": commits_meta_range_id, - "tags_meta_range_id": tags_meta_range_id, - "branches_meta_range_id": branches_meta_range_id, - } - - branches_meta_range_id: MetaOapg.properties.branches_meta_range_id - tags_meta_range_id: MetaOapg.properties.tags_meta_range_id - commits_meta_range_id: MetaOapg.properties.commits_meta_range_id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["commits_meta_range_id"]) -> MetaOapg.properties.commits_meta_range_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags_meta_range_id"]) -> MetaOapg.properties.tags_meta_range_id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["branches_meta_range_id"]) -> MetaOapg.properties.branches_meta_range_id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["commits_meta_range_id", "tags_meta_range_id", "branches_meta_range_id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["commits_meta_range_id"]) -> MetaOapg.properties.commits_meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags_meta_range_id"]) -> MetaOapg.properties.tags_meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["branches_meta_range_id"]) -> MetaOapg.properties.branches_meta_range_id: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["commits_meta_range_id", "tags_meta_range_id", "branches_meta_range_id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - branches_meta_range_id: typing.Union[MetaOapg.properties.branches_meta_range_id, str, ], - tags_meta_range_id: typing.Union[MetaOapg.properties.tags_meta_range_id, str, ], - commits_meta_range_id: typing.Union[MetaOapg.properties.commits_meta_range_id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefsDump': - return super().__new__( - cls, - *_args, - branches_meta_range_id=branches_meta_range_id, - tags_meta_range_id=tags_meta_range_id, - commits_meta_range_id=commits_meta_range_id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/repository.py b/clients/python/lakefs_client/model/repository.py index e923383fdf7..4a96d083528 100644 --- a/clients/python/lakefs_client/model/repository.py +++ b/clients/python/lakefs_client/model/repository.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,111 +8,273 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Repository( - schemas.DictSchema -): +class Repository(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "default_branch", - "creation_date", - "id", - "storage_namespace", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'creation_date': (int,), # noqa: E501 + 'default_branch': (str,), # noqa: E501 + 'storage_namespace': (str,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - creation_date = schemas.Int64Schema - default_branch = schemas.StrSchema - storage_namespace = schemas.StrSchema - __annotations__ = { - "id": id, - "creation_date": creation_date, - "default_branch": default_branch, - "storage_namespace": storage_namespace, - } - - default_branch: MetaOapg.properties.default_branch - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - storage_namespace: MetaOapg.properties.storage_namespace - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_branch"]) -> MetaOapg.properties.default_branch: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "default_branch", "storage_namespace", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_branch"]) -> MetaOapg.properties.default_branch: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "default_branch", "storage_namespace", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - default_branch: typing.Union[MetaOapg.properties.default_branch, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - storage_namespace: typing.Union[MetaOapg.properties.storage_namespace, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Repository': - return super().__new__( - cls, - *_args, - default_branch=default_branch, - creation_date=creation_date, - id=id, - storage_namespace=storage_namespace, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'creation_date': 'creation_date', # noqa: E501 + 'default_branch': 'default_branch', # noqa: E501 + 'storage_namespace': 'storage_namespace', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, creation_date, default_branch, storage_namespace, *args, **kwargs): # noqa: E501 + """Repository - a model defined in OpenAPI + + Args: + id (str): + creation_date (int): Unix Epoch in seconds + default_branch (str): + storage_namespace (str): Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.creation_date = creation_date + self.default_branch = default_branch + self.storage_namespace = storage_namespace + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, creation_date, default_branch, storage_namespace, *args, **kwargs): # noqa: E501 + """Repository - a model defined in OpenAPI + + Args: + id (str): + creation_date (int): Unix Epoch in seconds + default_branch (str): + storage_namespace (str): Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.creation_date = creation_date + self.default_branch = default_branch + self.storage_namespace = storage_namespace + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/repository.pyi b/clients/python/lakefs_client/model/repository.pyi deleted file mode 100644 index e923383fdf7..00000000000 --- a/clients/python/lakefs_client/model/repository.pyi +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Repository( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "default_branch", - "creation_date", - "id", - "storage_namespace", - } - - class properties: - id = schemas.StrSchema - creation_date = schemas.Int64Schema - default_branch = schemas.StrSchema - storage_namespace = schemas.StrSchema - __annotations__ = { - "id": id, - "creation_date": creation_date, - "default_branch": default_branch, - "storage_namespace": storage_namespace, - } - - default_branch: MetaOapg.properties.default_branch - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - storage_namespace: MetaOapg.properties.storage_namespace - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_branch"]) -> MetaOapg.properties.default_branch: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "default_branch", "storage_namespace", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_branch"]) -> MetaOapg.properties.default_branch: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "default_branch", "storage_namespace", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - default_branch: typing.Union[MetaOapg.properties.default_branch, str, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - storage_namespace: typing.Union[MetaOapg.properties.storage_namespace, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Repository': - return super().__new__( - cls, - *_args, - default_branch=default_branch, - creation_date=creation_date, - id=id, - storage_namespace=storage_namespace, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/repository_creation.py b/clients/python/lakefs_client/model/repository_creation.py index fc4c040b091..997c9f6a9ab 100644 --- a/clients/python/lakefs_client/model/repository_creation.py +++ b/clients/python/lakefs_client/model/repository_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,117 +8,275 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class RepositoryCreation( - schemas.DictSchema -): +class RepositoryCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + ('name',): { + 'regex': { + 'pattern': r'^[a-z0-9][a-z0-9-]{2,62}$', # noqa: E501 + }, + }, + ('storage_namespace',): { + 'regex': { + 'pattern': r'^(s3|gs|https?|mem|local|transient):\/\/.*$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "name", - "storage_namespace", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'storage_namespace': (str,), # noqa: E501 + 'default_branch': (str,), # noqa: E501 } - - class properties: - - - class name( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^[a-z0-9][a-z0-9-]{2,62}$', # noqa: E501 - }] - - - class storage_namespace( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^(s3|gs|https?|mem|local|transient)://.*$', # noqa: E501 - }] - default_branch = schemas.StrSchema - __annotations__ = { - "name": name, - "storage_namespace": storage_namespace, - "default_branch": default_branch, - } - - name: MetaOapg.properties.name - storage_namespace: MetaOapg.properties.storage_namespace - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_branch"]) -> MetaOapg.properties.default_branch: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "storage_namespace", "default_branch", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_branch"]) -> typing.Union[MetaOapg.properties.default_branch, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "storage_namespace", "default_branch", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - storage_namespace: typing.Union[MetaOapg.properties.storage_namespace, str, ], - default_branch: typing.Union[MetaOapg.properties.default_branch, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RepositoryCreation': - return super().__new__( - cls, - *_args, - name=name, - storage_namespace=storage_namespace, - default_branch=default_branch, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'storage_namespace': 'storage_namespace', # noqa: E501 + 'default_branch': 'default_branch', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, storage_namespace, *args, **kwargs): # noqa: E501 + """RepositoryCreation - a model defined in OpenAPI + + Args: + name (str): + storage_namespace (str): Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_branch (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.storage_namespace = storage_namespace + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, storage_namespace, *args, **kwargs): # noqa: E501 + """RepositoryCreation - a model defined in OpenAPI + + Args: + name (str): + storage_namespace (str): Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\") + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_branch (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.storage_namespace = storage_namespace + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/repository_creation.pyi b/clients/python/lakefs_client/model/repository_creation.pyi deleted file mode 100644 index 93bab951f19..00000000000 --- a/clients/python/lakefs_client/model/repository_creation.pyi +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class RepositoryCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "name", - "storage_namespace", - } - - class properties: - - - class name( - schemas.StrSchema - ): - pass - - - class storage_namespace( - schemas.StrSchema - ): - pass - default_branch = schemas.StrSchema - __annotations__ = { - "name": name, - "storage_namespace": storage_namespace, - "default_branch": default_branch, - } - - name: MetaOapg.properties.name - storage_namespace: MetaOapg.properties.storage_namespace - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_branch"]) -> MetaOapg.properties.default_branch: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "storage_namespace", "default_branch", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage_namespace"]) -> MetaOapg.properties.storage_namespace: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_branch"]) -> typing.Union[MetaOapg.properties.default_branch, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "storage_namespace", "default_branch", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - storage_namespace: typing.Union[MetaOapg.properties.storage_namespace, str, ], - default_branch: typing.Union[MetaOapg.properties.default_branch, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RepositoryCreation': - return super().__new__( - cls, - *_args, - name=name, - storage_namespace=storage_namespace, - default_branch=default_branch, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/repository_list.py b/clients/python/lakefs_client/model/repository_list.py index 6d74ac51f29..cc05b02d8f3 100644 --- a/clients/python/lakefs_client/model/repository_list.py +++ b/clients/python/lakefs_client/model/repository_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.pagination import Pagination + from lakefs_client.model.repository import Repository + globals()['Pagination'] = Pagination + globals()['Repository'] = Repository -class RepositoryList( - schemas.DictSchema -): + +class RepositoryList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([Repository],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Repository']: - return Repository - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Repository'], typing.List['Repository']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Repository': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RepositoryList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.repository import Repository + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """RepositoryList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Repository]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """RepositoryList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([Repository]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/repository_list.pyi b/clients/python/lakefs_client/model/repository_list.pyi deleted file mode 100644 index 6d74ac51f29..00000000000 --- a/clients/python/lakefs_client/model/repository_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class RepositoryList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Repository']: - return Repository - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Repository'], typing.List['Repository']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Repository': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RepositoryList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.repository import Repository diff --git a/clients/python/lakefs_client/model/reset_creation.py b/clients/python/lakefs_client/model/reset_creation.py index a636f708d5f..5b8a4b3e3f3 100644 --- a/clients/python/lakefs_client/model/reset_creation.py +++ b/clients/python/lakefs_client/model/reset_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,110 +8,264 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class ResetCreation( - schemas.DictSchema -): +class ResetCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('type',): { + 'OBJECT': "object", + 'COMMON_PREFIX': "common_prefix", + 'RESET': "reset", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "type", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'type': (str,), # noqa: E501 + 'path': (str,), # noqa: E501 } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "object": "OBJECT", - "common_prefix": "COMMON_PREFIX", - "reset": "RESET", - } - - @schemas.classproperty - def OBJECT(cls): - return cls("object") - - @schemas.classproperty - def COMMON_PREFIX(cls): - return cls("common_prefix") - - @schemas.classproperty - def RESET(cls): - return cls("reset") - path = schemas.StrSchema - __annotations__ = { - "type": type, - "path": path, - } - - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "path", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> typing.Union[MetaOapg.properties.path, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "path", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union[MetaOapg.properties.type, str, ], - path: typing.Union[MetaOapg.properties.path, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResetCreation': - return super().__new__( - cls, - *_args, - type=type, - path=path, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'path': 'path', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 + """ResetCreation - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + path (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, *args, **kwargs): # noqa: E501 + """ResetCreation - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + path (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/reset_creation.pyi b/clients/python/lakefs_client/model/reset_creation.pyi deleted file mode 100644 index a96be909213..00000000000 --- a/clients/python/lakefs_client/model/reset_creation.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class ResetCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "type", - } - - class properties: - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def OBJECT(cls): - return cls("object") - - @schemas.classproperty - def COMMON_PREFIX(cls): - return cls("common_prefix") - - @schemas.classproperty - def RESET(cls): - return cls("reset") - path = schemas.StrSchema - __annotations__ = { - "type": type, - "path": path, - } - - type: MetaOapg.properties.type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "path", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> typing.Union[MetaOapg.properties.path, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["type", "path", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - type: typing.Union[MetaOapg.properties.type, str, ], - path: typing.Union[MetaOapg.properties.path, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ResetCreation': - return super().__new__( - cls, - *_args, - type=type, - path=path, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/revert_creation.py b/clients/python/lakefs_client/model/revert_creation.py index 41e3a354941..accf7be1e4d 100644 --- a/clients/python/lakefs_client/model/revert_creation.py +++ b/clients/python/lakefs_client/model/revert_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class RevertCreation( - schemas.DictSchema -): +class RevertCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "parent_number", - "ref", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'ref': (str,), # noqa: E501 + 'parent_number': (int,), # noqa: E501 } - - class properties: - ref = schemas.StrSchema - parent_number = schemas.IntSchema - __annotations__ = { - "ref": ref, - "parent_number": parent_number, - } - - parent_number: MetaOapg.properties.parent_number - ref: MetaOapg.properties.ref - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent_number"]) -> MetaOapg.properties.parent_number: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent_number"]) -> MetaOapg.properties.parent_number: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - parent_number: typing.Union[MetaOapg.properties.parent_number, decimal.Decimal, int, ], - ref: typing.Union[MetaOapg.properties.ref, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RevertCreation': - return super().__new__( - cls, - *_args, - parent_number=parent_number, - ref=ref, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ref': 'ref', # noqa: E501 + 'parent_number': 'parent_number', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, ref, parent_number, *args, **kwargs): # noqa: E501 + """RevertCreation - a model defined in OpenAPI + + Args: + ref (str): the commit to revert, given by a ref + parent_number (int): when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.ref = ref + self.parent_number = parent_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, ref, parent_number, *args, **kwargs): # noqa: E501 + """RevertCreation - a model defined in OpenAPI + + Args: + ref (str): the commit to revert, given by a ref + parent_number (int): when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.ref = ref + self.parent_number = parent_number + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/revert_creation.pyi b/clients/python/lakefs_client/model/revert_creation.pyi deleted file mode 100644 index 41e3a354941..00000000000 --- a/clients/python/lakefs_client/model/revert_creation.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class RevertCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "parent_number", - "ref", - } - - class properties: - ref = schemas.StrSchema - parent_number = schemas.IntSchema - __annotations__ = { - "ref": ref, - "parent_number": parent_number, - } - - parent_number: MetaOapg.properties.parent_number - ref: MetaOapg.properties.ref - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parent_number"]) -> MetaOapg.properties.parent_number: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parent_number"]) -> MetaOapg.properties.parent_number: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ref", "parent_number", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - parent_number: typing.Union[MetaOapg.properties.parent_number, decimal.Decimal, int, ], - ref: typing.Union[MetaOapg.properties.ref, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RevertCreation': - return super().__new__( - cls, - *_args, - parent_number=parent_number, - ref=ref, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/setup.py b/clients/python/lakefs_client/model/setup.py index 947f1d67da8..85dc229dabd 100644 --- a/clients/python/lakefs_client/model/setup.py +++ b/clients/python/lakefs_client/model/setup.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,90 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.access_key_credentials import AccessKeyCredentials + globals()['AccessKeyCredentials'] = AccessKeyCredentials -class Setup( - schemas.DictSchema -): + +class Setup(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "username", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'username': (str,), # noqa: E501 + 'key': (AccessKeyCredentials,), # noqa: E501 } - - class properties: - username = schemas.StrSchema - - @staticmethod - def key() -> typing.Type['AccessKeyCredentials']: - return AccessKeyCredentials - __annotations__ = { - "username": username, - "key": key, - } - - username: MetaOapg.properties.username - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> 'AccessKeyCredentials': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "key", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union['AccessKeyCredentials', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["username", "key", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - username: typing.Union[MetaOapg.properties.username, str, ], - key: typing.Union['AccessKeyCredentials', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Setup': - return super().__new__( - cls, - *_args, - username=username, - key=key, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.access_key_credentials import AccessKeyCredentials + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'username': 'username', # noqa: E501 + 'key': 'key', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, username, *args, **kwargs): # noqa: E501 + """Setup - a model defined in OpenAPI + + Args: + username (str): an identifier for the user (e.g. jane.doe) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + key (AccessKeyCredentials): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.username = username + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, username, *args, **kwargs): # noqa: E501 + """Setup - a model defined in OpenAPI + + Args: + username (str): an identifier for the user (e.g. jane.doe) + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + key (AccessKeyCredentials): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.username = username + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/setup.pyi b/clients/python/lakefs_client/model/setup.pyi deleted file mode 100644 index 947f1d67da8..00000000000 --- a/clients/python/lakefs_client/model/setup.pyi +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Setup( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "username", - } - - class properties: - username = schemas.StrSchema - - @staticmethod - def key() -> typing.Type['AccessKeyCredentials']: - return AccessKeyCredentials - __annotations__ = { - "username": username, - "key": key, - } - - username: MetaOapg.properties.username - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> 'AccessKeyCredentials': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "key", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union['AccessKeyCredentials', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["username", "key", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - username: typing.Union[MetaOapg.properties.username, str, ], - key: typing.Union['AccessKeyCredentials', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Setup': - return super().__new__( - cls, - *_args, - username=username, - key=key, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.access_key_credentials import AccessKeyCredentials diff --git a/clients/python/lakefs_client/model/setup_state.py b/clients/python/lakefs_client/model/setup_state.py index 18cc4625e4f..0302b4b6de3 100644 --- a/clients/python/lakefs_client/model/setup_state.py +++ b/clients/python/lakefs_client/model/setup_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,110 +8,264 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.login_config import LoginConfig + globals()['LoginConfig'] = LoginConfig -class SetupState( - schemas.DictSchema -): + +class SetupState(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('state',): { + 'INITIALIZED': "initialized", + 'NOT_INITIALIZED': "not_initialized", + 'COMM_PREFS_DONE': "comm_prefs_done", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'state': (str,), # noqa: E501 + 'login_config': (LoginConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'state': 'state', # noqa: E501 + 'login_config': 'login_config', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SetupState - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + state (str): [optional] # noqa: E501 + login_config (LoginConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """SetupState - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + state (str): [optional] # noqa: E501 + login_config (LoginConfig): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "initialized": "INITIALIZED", - "not_initialized": "NOT_INITIALIZED", - "comm_prefs_done": "COMM_PREFS_DONE", - } - - @schemas.classproperty - def INITIALIZED(cls): - return cls("initialized") - - @schemas.classproperty - def NOT_INITIALIZED(cls): - return cls("not_initialized") - - @schemas.classproperty - def COMM_PREFS_DONE(cls): - return cls("comm_prefs_done") - - @staticmethod - def login_config() -> typing.Type['LoginConfig']: - return LoginConfig - __annotations__ = { - "state": state, - "login_config": login_config, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_config"]) -> 'LoginConfig': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["state", "login_config", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_config"]) -> typing.Union['LoginConfig', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["state", "login_config", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - login_config: typing.Union['LoginConfig', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SetupState': - return super().__new__( - cls, - *_args, - state=state, - login_config=login_config, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.login_config import LoginConfig + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/setup_state.pyi b/clients/python/lakefs_client/model/setup_state.pyi deleted file mode 100644 index 2acfab3d0db..00000000000 --- a/clients/python/lakefs_client/model/setup_state.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class SetupState( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class state( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def INITIALIZED(cls): - return cls("initialized") - - @schemas.classproperty - def NOT_INITIALIZED(cls): - return cls("not_initialized") - - @schemas.classproperty - def COMM_PREFS_DONE(cls): - return cls("comm_prefs_done") - - @staticmethod - def login_config() -> typing.Type['LoginConfig']: - return LoginConfig - __annotations__ = { - "state": state, - "login_config": login_config, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["login_config"]) -> 'LoginConfig': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["state", "login_config", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["login_config"]) -> typing.Union['LoginConfig', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["state", "login_config", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - state: typing.Union[MetaOapg.properties.state, str, schemas.Unset] = schemas.unset, - login_config: typing.Union['LoginConfig', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SetupState': - return super().__new__( - cls, - *_args, - state=state, - login_config=login_config, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.login_config import LoginConfig diff --git a/clients/python/lakefs_client/model/stage_range_creation.py b/clients/python/lakefs_client/model/stage_range_creation.py index 209233c749b..c57f010f0a9 100644 --- a/clients/python/lakefs_client/model/stage_range_creation.py +++ b/clients/python/lakefs_client/model/stage_range_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,109 +8,271 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class StageRangeCreation( - schemas.DictSchema -): +class StageRangeCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "fromSourceURI", - "prepend", - "after", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'from_source_uri': (str,), # noqa: E501 + 'after': (str,), # noqa: E501 + 'prepend': (str,), # noqa: E501 + 'continuation_token': (str,), # noqa: E501 } - - class properties: - fromSourceURI = schemas.StrSchema - after = schemas.StrSchema - prepend = schemas.StrSchema - continuation_token = schemas.StrSchema - __annotations__ = { - "fromSourceURI": fromSourceURI, - "after": after, - "prepend": prepend, - "continuation_token": continuation_token, - } - - fromSourceURI: MetaOapg.properties.fromSourceURI - prepend: MetaOapg.properties.prepend - after: MetaOapg.properties.after - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fromSourceURI"]) -> MetaOapg.properties.fromSourceURI: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["after"]) -> MetaOapg.properties.after: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prepend"]) -> MetaOapg.properties.prepend: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["fromSourceURI", "after", "prepend", "continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fromSourceURI"]) -> MetaOapg.properties.fromSourceURI: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["after"]) -> MetaOapg.properties.after: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["prepend"]) -> MetaOapg.properties.prepend: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["fromSourceURI", "after", "prepend", "continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - fromSourceURI: typing.Union[MetaOapg.properties.fromSourceURI, str, ], - prepend: typing.Union[MetaOapg.properties.prepend, str, ], - after: typing.Union[MetaOapg.properties.after, str, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StageRangeCreation': - return super().__new__( - cls, - *_args, - fromSourceURI=fromSourceURI, - prepend=prepend, - after=after, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'from_source_uri': 'fromSourceURI', # noqa: E501 + 'after': 'after', # noqa: E501 + 'prepend': 'prepend', # noqa: E501 + 'continuation_token': 'continuation_token', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, from_source_uri, after, prepend, *args, **kwargs): # noqa: E501 + """StageRangeCreation - a model defined in OpenAPI + + Args: + from_source_uri (str): The source location of the ingested files. Must match the lakeFS installation blockstore type. + after (str): Only objects after this key would be ingested. + prepend (str): A prefix to prepend to ingested objects. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): Opaque. Client should pass the continuation_token received from server to continue creation ranges from the same key.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.from_source_uri = from_source_uri + self.after = after + self.prepend = prepend + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, from_source_uri, after, prepend, *args, **kwargs): # noqa: E501 + """StageRangeCreation - a model defined in OpenAPI + + Args: + from_source_uri (str): The source location of the ingested files. Must match the lakeFS installation blockstore type. + after (str): Only objects after this key would be ingested. + prepend (str): A prefix to prepend to ingested objects. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + continuation_token (str): Opaque. Client should pass the continuation_token received from server to continue creation ranges from the same key.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.from_source_uri = from_source_uri + self.after = after + self.prepend = prepend + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/stage_range_creation.pyi b/clients/python/lakefs_client/model/stage_range_creation.pyi deleted file mode 100644 index 209233c749b..00000000000 --- a/clients/python/lakefs_client/model/stage_range_creation.pyi +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class StageRangeCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "fromSourceURI", - "prepend", - "after", - } - - class properties: - fromSourceURI = schemas.StrSchema - after = schemas.StrSchema - prepend = schemas.StrSchema - continuation_token = schemas.StrSchema - __annotations__ = { - "fromSourceURI": fromSourceURI, - "after": after, - "prepend": prepend, - "continuation_token": continuation_token, - } - - fromSourceURI: MetaOapg.properties.fromSourceURI - prepend: MetaOapg.properties.prepend - after: MetaOapg.properties.after - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["fromSourceURI"]) -> MetaOapg.properties.fromSourceURI: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["after"]) -> MetaOapg.properties.after: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prepend"]) -> MetaOapg.properties.prepend: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["continuation_token"]) -> MetaOapg.properties.continuation_token: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["fromSourceURI", "after", "prepend", "continuation_token", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["fromSourceURI"]) -> MetaOapg.properties.fromSourceURI: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["after"]) -> MetaOapg.properties.after: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["prepend"]) -> MetaOapg.properties.prepend: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["continuation_token"]) -> typing.Union[MetaOapg.properties.continuation_token, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["fromSourceURI", "after", "prepend", "continuation_token", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - fromSourceURI: typing.Union[MetaOapg.properties.fromSourceURI, str, ], - prepend: typing.Union[MetaOapg.properties.prepend, str, ], - after: typing.Union[MetaOapg.properties.after, str, ], - continuation_token: typing.Union[MetaOapg.properties.continuation_token, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StageRangeCreation': - return super().__new__( - cls, - *_args, - fromSourceURI=fromSourceURI, - prepend=prepend, - after=after, - continuation_token=continuation_token, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/staging_location.py b/clients/python/lakefs_client/model/staging_location.py index d6068b69730..cf38c629a3f 100644 --- a/clients/python/lakefs_client/model/staging_location.py +++ b/clients/python/lakefs_client/model/staging_location.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,116 +8,263 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class StagingLocation( - schemas.DictSchema -): +class StagingLocation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - location for placing an object when staging it + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "token", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'token': (str,), # noqa: E501 + 'physical_address': (str,), # noqa: E501 + 'presigned_url': (str, none_type,), # noqa: E501 } - - class properties: - token = schemas.StrSchema - physical_address = schemas.StrSchema - - - class presigned_url( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'presigned_url': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "token": token, - "physical_address": physical_address, - "presigned_url": presigned_url, - } - - token: MetaOapg.properties.token - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["presigned_url"]) -> MetaOapg.properties.presigned_url: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "physical_address", "presigned_url", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["physical_address"]) -> typing.Union[MetaOapg.properties.physical_address, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["presigned_url"]) -> typing.Union[MetaOapg.properties.presigned_url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "physical_address", "presigned_url", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - token: typing.Union[MetaOapg.properties.token, str, ], - physical_address: typing.Union[MetaOapg.properties.physical_address, str, schemas.Unset] = schemas.unset, - presigned_url: typing.Union[MetaOapg.properties.presigned_url, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StagingLocation': - return super().__new__( - cls, - *_args, - token=token, - physical_address=physical_address, - presigned_url=presigned_url, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'token': 'token', # noqa: E501 + 'physical_address': 'physical_address', # noqa: E501 + 'presigned_url': 'presigned_url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, token, *args, **kwargs): # noqa: E501 + """StagingLocation - a model defined in OpenAPI + + Args: + token (str): opaque staging token to use to link uploaded object + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + physical_address (str): [optional] # noqa: E501 + presigned_url (str, none_type): if presign=true is passed in the request, this field will contain a presigned URL to use when uploading. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.token = token + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, token, *args, **kwargs): # noqa: E501 + """StagingLocation - a model defined in OpenAPI + + Args: + token (str): opaque staging token to use to link uploaded object + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + physical_address (str): [optional] # noqa: E501 + presigned_url (str, none_type): if presign=true is passed in the request, this field will contain a presigned URL to use when uploading. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.token = token + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/staging_location.pyi b/clients/python/lakefs_client/model/staging_location.pyi deleted file mode 100644 index d6068b69730..00000000000 --- a/clients/python/lakefs_client/model/staging_location.pyi +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class StagingLocation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - location for placing an object when staging it - """ - - - class MetaOapg: - required = { - "token", - } - - class properties: - token = schemas.StrSchema - physical_address = schemas.StrSchema - - - class presigned_url( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'presigned_url': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "token": token, - "physical_address": physical_address, - "presigned_url": presigned_url, - } - - token: MetaOapg.properties.token - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["physical_address"]) -> MetaOapg.properties.physical_address: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["presigned_url"]) -> MetaOapg.properties.presigned_url: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "physical_address", "presigned_url", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["physical_address"]) -> typing.Union[MetaOapg.properties.physical_address, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["presigned_url"]) -> typing.Union[MetaOapg.properties.presigned_url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "physical_address", "presigned_url", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - token: typing.Union[MetaOapg.properties.token, str, ], - physical_address: typing.Union[MetaOapg.properties.physical_address, str, schemas.Unset] = schemas.unset, - presigned_url: typing.Union[MetaOapg.properties.presigned_url, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StagingLocation': - return super().__new__( - cls, - *_args, - token=token, - physical_address=physical_address, - presigned_url=presigned_url, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/staging_metadata.py b/clients/python/lakefs_client/model/staging_metadata.py index ff8dcd1560d..8866cb31240 100644 --- a/clients/python/lakefs_client/model/staging_metadata.py +++ b/clients/python/lakefs_client/model/staging_metadata.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,154 +8,281 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.staging_location import StagingLocation + globals()['StagingLocation'] = StagingLocation -class StagingMetadata( - schemas.DictSchema -): + +class StagingMetadata(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - information about uploaded object + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "size_bytes", - "checksum", - "staging", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'staging': (StagingLocation,), # noqa: E501 + 'checksum': (str,), # noqa: E501 + 'size_bytes': (int,), # noqa: E501 + 'user_metadata': ({str: (str,)},), # noqa: E501 + 'content_type': (str,), # noqa: E501 } - - class properties: - - @staticmethod - def staging() -> typing.Type['StagingLocation']: - return StagingLocation - checksum = schemas.StrSchema - size_bytes = schemas.Int64Schema - - - class user_metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'user_metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - content_type = schemas.StrSchema - __annotations__ = { - "staging": staging, - "checksum": checksum, - "size_bytes": size_bytes, - "user_metadata": user_metadata, - "content_type": content_type, - } - - size_bytes: MetaOapg.properties.size_bytes - checksum: MetaOapg.properties.checksum - staging: 'StagingLocation' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["staging"]) -> 'StagingLocation': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user_metadata"]) -> MetaOapg.properties.user_metadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content_type"]) -> MetaOapg.properties.content_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["staging", "checksum", "size_bytes", "user_metadata", "content_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["staging"]) -> 'StagingLocation': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user_metadata"]) -> typing.Union[MetaOapg.properties.user_metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content_type"]) -> typing.Union[MetaOapg.properties.content_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["staging", "checksum", "size_bytes", "user_metadata", "content_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, ], - checksum: typing.Union[MetaOapg.properties.checksum, str, ], - staging: 'StagingLocation', - user_metadata: typing.Union[MetaOapg.properties.user_metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - content_type: typing.Union[MetaOapg.properties.content_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StagingMetadata': - return super().__new__( - cls, - *_args, - size_bytes=size_bytes, - checksum=checksum, - staging=staging, - user_metadata=user_metadata, - content_type=content_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.staging_location import StagingLocation + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'staging': 'staging', # noqa: E501 + 'checksum': 'checksum', # noqa: E501 + 'size_bytes': 'size_bytes', # noqa: E501 + 'user_metadata': 'user_metadata', # noqa: E501 + 'content_type': 'content_type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, staging, checksum, size_bytes, *args, **kwargs): # noqa: E501 + """StagingMetadata - a model defined in OpenAPI + + Args: + staging (StagingLocation): + checksum (str): unique identifier of object content on backing store (typically ETag) + size_bytes (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + user_metadata ({str: (str,)}): [optional] # noqa: E501 + content_type (str): Object media type. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.staging = staging + self.checksum = checksum + self.size_bytes = size_bytes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, staging, checksum, size_bytes, *args, **kwargs): # noqa: E501 + """StagingMetadata - a model defined in OpenAPI + + Args: + staging (StagingLocation): + checksum (str): unique identifier of object content on backing store (typically ETag) + size_bytes (int): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + user_metadata ({str: (str,)}): [optional] # noqa: E501 + content_type (str): Object media type. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.staging = staging + self.checksum = checksum + self.size_bytes = size_bytes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/staging_metadata.pyi b/clients/python/lakefs_client/model/staging_metadata.pyi deleted file mode 100644 index ff8dcd1560d..00000000000 --- a/clients/python/lakefs_client/model/staging_metadata.pyi +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class StagingMetadata( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - information about uploaded object - """ - - - class MetaOapg: - required = { - "size_bytes", - "checksum", - "staging", - } - - class properties: - - @staticmethod - def staging() -> typing.Type['StagingLocation']: - return StagingLocation - checksum = schemas.StrSchema - size_bytes = schemas.Int64Schema - - - class user_metadata( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'user_metadata': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - content_type = schemas.StrSchema - __annotations__ = { - "staging": staging, - "checksum": checksum, - "size_bytes": size_bytes, - "user_metadata": user_metadata, - "content_type": content_type, - } - - size_bytes: MetaOapg.properties.size_bytes - checksum: MetaOapg.properties.checksum - staging: 'StagingLocation' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["staging"]) -> 'StagingLocation': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["user_metadata"]) -> MetaOapg.properties.user_metadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content_type"]) -> MetaOapg.properties.content_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["staging", "checksum", "size_bytes", "user_metadata", "content_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["staging"]) -> 'StagingLocation': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["checksum"]) -> MetaOapg.properties.checksum: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["size_bytes"]) -> MetaOapg.properties.size_bytes: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["user_metadata"]) -> typing.Union[MetaOapg.properties.user_metadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content_type"]) -> typing.Union[MetaOapg.properties.content_type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["staging", "checksum", "size_bytes", "user_metadata", "content_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - size_bytes: typing.Union[MetaOapg.properties.size_bytes, decimal.Decimal, int, ], - checksum: typing.Union[MetaOapg.properties.checksum, str, ], - staging: 'StagingLocation', - user_metadata: typing.Union[MetaOapg.properties.user_metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - content_type: typing.Union[MetaOapg.properties.content_type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StagingMetadata': - return super().__new__( - cls, - *_args, - size_bytes=size_bytes, - checksum=checksum, - staging=staging, - user_metadata=user_metadata, - content_type=content_type, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.staging_location import StagingLocation diff --git a/clients/python/lakefs_client/model/statement.py b/clients/python/lakefs_client/model/statement.py index 747838ef05a..ae0fb6a9685 100644 --- a/clients/python/lakefs_client/model/statement.py +++ b/clients/python/lakefs_client/model/statement.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,142 +8,274 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class Statement( - schemas.DictSchema -): +class Statement(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + ('effect',): { + 'ALLOW': "allow", + 'DENY': "deny", + }, + } + + validations = { + ('action',): { + 'min_items': 1, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "resource", - "effect", - "action", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'effect': (str,), # noqa: E501 + 'resource': (str,), # noqa: E501 + 'action': ([str],), # noqa: E501 } - - class properties: - - - class effect( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "allow": "ALLOW", - "deny": "DENY", - } - - @schemas.classproperty - def ALLOW(cls): - return cls("allow") - - @schemas.classproperty - def DENY(cls): - return cls("deny") - resource = schemas.StrSchema - - - class action( - schemas.ListSchema - ): - - - class MetaOapg: - min_items = 1 - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'action': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "effect": effect, - "resource": resource, - "action": action, - } - - resource: MetaOapg.properties.resource - effect: MetaOapg.properties.effect - action: MetaOapg.properties.action - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["effect"]) -> MetaOapg.properties.effect: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["effect", "resource", "action", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["effect"]) -> MetaOapg.properties.effect: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["effect", "resource", "action", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - resource: typing.Union[MetaOapg.properties.resource, str, ], - effect: typing.Union[MetaOapg.properties.effect, str, ], - action: typing.Union[MetaOapg.properties.action, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Statement': - return super().__new__( - cls, - *_args, - resource=resource, - effect=effect, - action=action, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'effect': 'effect', # noqa: E501 + 'resource': 'resource', # noqa: E501 + 'action': 'action', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, effect, resource, action, *args, **kwargs): # noqa: E501 + """Statement - a model defined in OpenAPI + + Args: + effect (str): + resource (str): + action ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.effect = effect + self.resource = resource + self.action = action + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, effect, resource, action, *args, **kwargs): # noqa: E501 + """Statement - a model defined in OpenAPI + + Args: + effect (str): + resource (str): + action ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.effect = effect + self.resource = resource + self.action = action + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/statement.pyi b/clients/python/lakefs_client/model/statement.pyi deleted file mode 100644 index 11b71ae62fe..00000000000 --- a/clients/python/lakefs_client/model/statement.pyi +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class Statement( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "resource", - "effect", - "action", - } - - class properties: - - - class effect( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def ALLOW(cls): - return cls("allow") - - @schemas.classproperty - def DENY(cls): - return cls("deny") - resource = schemas.StrSchema - - - class action( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'action': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "effect": effect, - "resource": resource, - "action": action, - } - - resource: MetaOapg.properties.resource - effect: MetaOapg.properties.effect - action: MetaOapg.properties.action - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["effect"]) -> MetaOapg.properties.effect: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["effect", "resource", "action", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["effect"]) -> MetaOapg.properties.effect: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource"]) -> MetaOapg.properties.resource: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["action"]) -> MetaOapg.properties.action: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["effect", "resource", "action", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - resource: typing.Union[MetaOapg.properties.resource, str, ], - effect: typing.Union[MetaOapg.properties.effect, str, ], - action: typing.Union[MetaOapg.properties.action, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Statement': - return super().__new__( - cls, - *_args, - resource=resource, - effect=effect, - action=action, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/stats_event.py b/clients/python/lakefs_client/model/stats_event.py index de4f4532850..90d9316c1c5 100644 --- a/clients/python/lakefs_client/model/stats_event.py +++ b/clients/python/lakefs_client/model/stats_event.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,96 +8,267 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class StatsEvent( - schemas.DictSchema -): +class StatsEvent(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "count", - "name", - "class", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + '_class': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'count': (int,), # noqa: E501 } - - class properties: - _class = schemas.StrSchema - name = schemas.StrSchema - count = schemas.IntSchema - __annotations__ = { - "class": _class, - "name": name, - "count": count, - } - - count: MetaOapg.properties.count - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["class", "name", "count", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["class", "name", "count", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - count: typing.Union[MetaOapg.properties.count, decimal.Decimal, int, ], - name: typing.Union[MetaOapg.properties.name, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StatsEvent': - return super().__new__( - cls, - *_args, - count=count, - name=name, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_class': 'class', # noqa: E501 + 'name': 'name', # noqa: E501 + 'count': 'count', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, _class, name, count, *args, **kwargs): # noqa: E501 + """StatsEvent - a model defined in OpenAPI + + Args: + _class (str): stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\") + name (str): stats event name (e.g. \"put_object\", \"create_repository\", \"\") + count (int): number of events of the class and name + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self._class = _class + self.name = name + self.count = count + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, _class, name, count, *args, **kwargs): # noqa: E501 + """StatsEvent - a model defined in OpenAPI + + Args: + _class (str): stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\") + name (str): stats event name (e.g. \"put_object\", \"create_repository\", \"\") + count (int): number of events of the class and name + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self._class = _class + self.name = name + self.count = count + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/stats_event.pyi b/clients/python/lakefs_client/model/stats_event.pyi deleted file mode 100644 index de4f4532850..00000000000 --- a/clients/python/lakefs_client/model/stats_event.pyi +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class StatsEvent( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "count", - "name", - "class", - } - - class properties: - _class = schemas.StrSchema - name = schemas.StrSchema - count = schemas.IntSchema - __annotations__ = { - "class": _class, - "name": name, - "count": count, - } - - count: MetaOapg.properties.count - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["class", "name", "count", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["count"]) -> MetaOapg.properties.count: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["class", "name", "count", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - count: typing.Union[MetaOapg.properties.count, decimal.Decimal, int, ], - name: typing.Union[MetaOapg.properties.name, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StatsEvent': - return super().__new__( - cls, - *_args, - count=count, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/stats_events_list.py b/clients/python/lakefs_client/model/stats_events_list.py index e06687e292b..e22ac5ed721 100644 --- a/clients/python/lakefs_client/model/stats_events_list.py +++ b/clients/python/lakefs_client/model/stats_events_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,102 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.stats_event import StatsEvent + globals()['StatsEvent'] = StatsEvent -class StatsEventsList( - schemas.DictSchema -): + +class StatsEventsList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "events", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'events': ([StatsEvent],), # noqa: E501 } - - class properties: - - - class events( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['StatsEvent']: - return StatsEvent - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['StatsEvent'], typing.List['StatsEvent']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'events': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'StatsEvent': - return super().__getitem__(i) - __annotations__ = { - "events": events, - } - - events: MetaOapg.properties.events - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["events"]) -> MetaOapg.properties.events: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["events", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["events"]) -> MetaOapg.properties.events: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["events", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - events: typing.Union[MetaOapg.properties.events, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StatsEventsList': - return super().__new__( - cls, - *_args, - events=events, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.stats_event import StatsEvent + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'events': 'events', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, events, *args, **kwargs): # noqa: E501 + """StatsEventsList - a model defined in OpenAPI + + Args: + events ([StatsEvent]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.events = events + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, events, *args, **kwargs): # noqa: E501 + """StatsEventsList - a model defined in OpenAPI + + Args: + events ([StatsEvent]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.events = events + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/stats_events_list.pyi b/clients/python/lakefs_client/model/stats_events_list.pyi deleted file mode 100644 index e06687e292b..00000000000 --- a/clients/python/lakefs_client/model/stats_events_list.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class StatsEventsList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "events", - } - - class properties: - - - class events( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['StatsEvent']: - return StatsEvent - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['StatsEvent'], typing.List['StatsEvent']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'events': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'StatsEvent': - return super().__getitem__(i) - __annotations__ = { - "events": events, - } - - events: MetaOapg.properties.events - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["events"]) -> MetaOapg.properties.events: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["events", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["events"]) -> MetaOapg.properties.events: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["events", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - events: typing.Union[MetaOapg.properties.events, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StatsEventsList': - return super().__new__( - cls, - *_args, - events=events, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.stats_event import StatsEvent diff --git a/clients/python/lakefs_client/model/storage_config.py b/clients/python/lakefs_client/model/storage_config.py index 46b0b51312d..2c9ee299438 100644 --- a/clients/python/lakefs_client/model/storage_config.py +++ b/clients/python/lakefs_client/model/storage_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,145 +8,289 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class StorageConfig( - schemas.DictSchema -): +class StorageConfig(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "blockstore_namespace_ValidityRegex", - "blockstore_namespace_example", - "blockstore_type", - "import_support", - "pre_sign_support_UI", - "pre_sign_support", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'blockstore_type': (str,), # noqa: E501 + 'blockstore_namespace_example': (str,), # noqa: E501 + 'blockstore_namespace_validity_regex': (str,), # noqa: E501 + 'pre_sign_support': (bool,), # noqa: E501 + 'pre_sign_support_ui': (bool,), # noqa: E501 + 'import_support': (bool,), # noqa: E501 + 'default_namespace_prefix': (str,), # noqa: E501 } - - class properties: - blockstore_type = schemas.StrSchema - blockstore_namespace_example = schemas.StrSchema - blockstore_namespace_ValidityRegex = schemas.StrSchema - pre_sign_support = schemas.BoolSchema - pre_sign_support_UI = schemas.BoolSchema - import_support = schemas.BoolSchema - default_namespace_prefix = schemas.StrSchema - __annotations__ = { - "blockstore_type": blockstore_type, - "blockstore_namespace_example": blockstore_namespace_example, - "blockstore_namespace_ValidityRegex": blockstore_namespace_ValidityRegex, - "pre_sign_support": pre_sign_support, - "pre_sign_support_UI": pre_sign_support_UI, - "import_support": import_support, - "default_namespace_prefix": default_namespace_prefix, - } - - blockstore_namespace_ValidityRegex: MetaOapg.properties.blockstore_namespace_ValidityRegex - blockstore_namespace_example: MetaOapg.properties.blockstore_namespace_example - blockstore_type: MetaOapg.properties.blockstore_type - import_support: MetaOapg.properties.import_support - pre_sign_support_UI: MetaOapg.properties.pre_sign_support_UI - pre_sign_support: MetaOapg.properties.pre_sign_support - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["blockstore_type"]) -> MetaOapg.properties.blockstore_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["blockstore_namespace_example"]) -> MetaOapg.properties.blockstore_namespace_example: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["blockstore_namespace_ValidityRegex"]) -> MetaOapg.properties.blockstore_namespace_ValidityRegex: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pre_sign_support"]) -> MetaOapg.properties.pre_sign_support: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pre_sign_support_UI"]) -> MetaOapg.properties.pre_sign_support_UI: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["import_support"]) -> MetaOapg.properties.import_support: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_namespace_prefix"]) -> MetaOapg.properties.default_namespace_prefix: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["blockstore_type", "blockstore_namespace_example", "blockstore_namespace_ValidityRegex", "pre_sign_support", "pre_sign_support_UI", "import_support", "default_namespace_prefix", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["blockstore_type"]) -> MetaOapg.properties.blockstore_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["blockstore_namespace_example"]) -> MetaOapg.properties.blockstore_namespace_example: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["blockstore_namespace_ValidityRegex"]) -> MetaOapg.properties.blockstore_namespace_ValidityRegex: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pre_sign_support"]) -> MetaOapg.properties.pre_sign_support: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pre_sign_support_UI"]) -> MetaOapg.properties.pre_sign_support_UI: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["import_support"]) -> MetaOapg.properties.import_support: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_namespace_prefix"]) -> typing.Union[MetaOapg.properties.default_namespace_prefix, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["blockstore_type", "blockstore_namespace_example", "blockstore_namespace_ValidityRegex", "pre_sign_support", "pre_sign_support_UI", "import_support", "default_namespace_prefix", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - blockstore_namespace_ValidityRegex: typing.Union[MetaOapg.properties.blockstore_namespace_ValidityRegex, str, ], - blockstore_namespace_example: typing.Union[MetaOapg.properties.blockstore_namespace_example, str, ], - blockstore_type: typing.Union[MetaOapg.properties.blockstore_type, str, ], - import_support: typing.Union[MetaOapg.properties.import_support, bool, ], - pre_sign_support_UI: typing.Union[MetaOapg.properties.pre_sign_support_UI, bool, ], - pre_sign_support: typing.Union[MetaOapg.properties.pre_sign_support, bool, ], - default_namespace_prefix: typing.Union[MetaOapg.properties.default_namespace_prefix, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StorageConfig': - return super().__new__( - cls, - *_args, - blockstore_namespace_ValidityRegex=blockstore_namespace_ValidityRegex, - blockstore_namespace_example=blockstore_namespace_example, - blockstore_type=blockstore_type, - import_support=import_support, - pre_sign_support_UI=pre_sign_support_UI, - pre_sign_support=pre_sign_support, - default_namespace_prefix=default_namespace_prefix, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'blockstore_type': 'blockstore_type', # noqa: E501 + 'blockstore_namespace_example': 'blockstore_namespace_example', # noqa: E501 + 'blockstore_namespace_validity_regex': 'blockstore_namespace_ValidityRegex', # noqa: E501 + 'pre_sign_support': 'pre_sign_support', # noqa: E501 + 'pre_sign_support_ui': 'pre_sign_support_UI', # noqa: E501 + 'import_support': 'import_support', # noqa: E501 + 'default_namespace_prefix': 'default_namespace_prefix', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, blockstore_type, blockstore_namespace_example, blockstore_namespace_validity_regex, pre_sign_support, pre_sign_support_ui, import_support, *args, **kwargs): # noqa: E501 + """StorageConfig - a model defined in OpenAPI + + Args: + blockstore_type (str): + blockstore_namespace_example (str): + blockstore_namespace_validity_regex (str): + pre_sign_support (bool): + pre_sign_support_ui (bool): + import_support (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_namespace_prefix (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.blockstore_type = blockstore_type + self.blockstore_namespace_example = blockstore_namespace_example + self.blockstore_namespace_validity_regex = blockstore_namespace_validity_regex + self.pre_sign_support = pre_sign_support + self.pre_sign_support_ui = pre_sign_support_ui + self.import_support = import_support + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, blockstore_type, blockstore_namespace_example, blockstore_namespace_validity_regex, pre_sign_support, pre_sign_support_ui, import_support, *args, **kwargs): # noqa: E501 + """StorageConfig - a model defined in OpenAPI + + Args: + blockstore_type (str): + blockstore_namespace_example (str): + blockstore_namespace_validity_regex (str): + pre_sign_support (bool): + pre_sign_support_ui (bool): + import_support (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + default_namespace_prefix (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.blockstore_type = blockstore_type + self.blockstore_namespace_example = blockstore_namespace_example + self.blockstore_namespace_validity_regex = blockstore_namespace_validity_regex + self.pre_sign_support = pre_sign_support + self.pre_sign_support_ui = pre_sign_support_ui + self.import_support = import_support + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/storage_config.pyi b/clients/python/lakefs_client/model/storage_config.pyi deleted file mode 100644 index 46b0b51312d..00000000000 --- a/clients/python/lakefs_client/model/storage_config.pyi +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class StorageConfig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "blockstore_namespace_ValidityRegex", - "blockstore_namespace_example", - "blockstore_type", - "import_support", - "pre_sign_support_UI", - "pre_sign_support", - } - - class properties: - blockstore_type = schemas.StrSchema - blockstore_namespace_example = schemas.StrSchema - blockstore_namespace_ValidityRegex = schemas.StrSchema - pre_sign_support = schemas.BoolSchema - pre_sign_support_UI = schemas.BoolSchema - import_support = schemas.BoolSchema - default_namespace_prefix = schemas.StrSchema - __annotations__ = { - "blockstore_type": blockstore_type, - "blockstore_namespace_example": blockstore_namespace_example, - "blockstore_namespace_ValidityRegex": blockstore_namespace_ValidityRegex, - "pre_sign_support": pre_sign_support, - "pre_sign_support_UI": pre_sign_support_UI, - "import_support": import_support, - "default_namespace_prefix": default_namespace_prefix, - } - - blockstore_namespace_ValidityRegex: MetaOapg.properties.blockstore_namespace_ValidityRegex - blockstore_namespace_example: MetaOapg.properties.blockstore_namespace_example - blockstore_type: MetaOapg.properties.blockstore_type - import_support: MetaOapg.properties.import_support - pre_sign_support_UI: MetaOapg.properties.pre_sign_support_UI - pre_sign_support: MetaOapg.properties.pre_sign_support - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["blockstore_type"]) -> MetaOapg.properties.blockstore_type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["blockstore_namespace_example"]) -> MetaOapg.properties.blockstore_namespace_example: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["blockstore_namespace_ValidityRegex"]) -> MetaOapg.properties.blockstore_namespace_ValidityRegex: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pre_sign_support"]) -> MetaOapg.properties.pre_sign_support: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pre_sign_support_UI"]) -> MetaOapg.properties.pre_sign_support_UI: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["import_support"]) -> MetaOapg.properties.import_support: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_namespace_prefix"]) -> MetaOapg.properties.default_namespace_prefix: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["blockstore_type", "blockstore_namespace_example", "blockstore_namespace_ValidityRegex", "pre_sign_support", "pre_sign_support_UI", "import_support", "default_namespace_prefix", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["blockstore_type"]) -> MetaOapg.properties.blockstore_type: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["blockstore_namespace_example"]) -> MetaOapg.properties.blockstore_namespace_example: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["blockstore_namespace_ValidityRegex"]) -> MetaOapg.properties.blockstore_namespace_ValidityRegex: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pre_sign_support"]) -> MetaOapg.properties.pre_sign_support: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pre_sign_support_UI"]) -> MetaOapg.properties.pre_sign_support_UI: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["import_support"]) -> MetaOapg.properties.import_support: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_namespace_prefix"]) -> typing.Union[MetaOapg.properties.default_namespace_prefix, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["blockstore_type", "blockstore_namespace_example", "blockstore_namespace_ValidityRegex", "pre_sign_support", "pre_sign_support_UI", "import_support", "default_namespace_prefix", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - blockstore_namespace_ValidityRegex: typing.Union[MetaOapg.properties.blockstore_namespace_ValidityRegex, str, ], - blockstore_namespace_example: typing.Union[MetaOapg.properties.blockstore_namespace_example, str, ], - blockstore_type: typing.Union[MetaOapg.properties.blockstore_type, str, ], - import_support: typing.Union[MetaOapg.properties.import_support, bool, ], - pre_sign_support_UI: typing.Union[MetaOapg.properties.pre_sign_support_UI, bool, ], - pre_sign_support: typing.Union[MetaOapg.properties.pre_sign_support, bool, ], - default_namespace_prefix: typing.Union[MetaOapg.properties.default_namespace_prefix, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StorageConfig': - return super().__new__( - cls, - *_args, - blockstore_namespace_ValidityRegex=blockstore_namespace_ValidityRegex, - blockstore_namespace_example=blockstore_namespace_example, - blockstore_type=blockstore_type, - import_support=import_support, - pre_sign_support_UI=pre_sign_support_UI, - pre_sign_support=pre_sign_support, - default_namespace_prefix=default_namespace_prefix, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/storage_uri.py b/clients/python/lakefs_client/model/storage_uri.py index 7a945ef01e0..e424b444ff0 100644 --- a/clients/python/lakefs_client/model/storage_uri.py +++ b/clients/python/lakefs_client/model/storage_uri.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,77 +8,255 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class StorageURI( - schemas.DictSchema -): +class StorageURI(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - URI to a path in a storage provider (e.g. "s3://bucket1/path/to/object") + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - class MetaOapg: - required = { - "location", + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'location': (str,), # noqa: E501 } - - class properties: - location = schemas.StrSchema - __annotations__ = { - "location": location, - } - - location: MetaOapg.properties.location - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["location", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["location", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - location: typing.Union[MetaOapg.properties.location, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StorageURI': - return super().__new__( - cls, - *_args, - location=location, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'location': 'location', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, location, *args, **kwargs): # noqa: E501 + """StorageURI - a model defined in OpenAPI + + Args: + location (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, location, *args, **kwargs): # noqa: E501 + """StorageURI - a model defined in OpenAPI + + Args: + location (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.location = location + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/storage_uri.pyi b/clients/python/lakefs_client/model/storage_uri.pyi deleted file mode 100644 index 7a945ef01e0..00000000000 --- a/clients/python/lakefs_client/model/storage_uri.pyi +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class StorageURI( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - URI to a path in a storage provider (e.g. "s3://bucket1/path/to/object") - """ - - - class MetaOapg: - required = { - "location", - } - - class properties: - location = schemas.StrSchema - __annotations__ = { - "location": location, - } - - location: MetaOapg.properties.location - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["location", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["location", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - location: typing.Union[MetaOapg.properties.location, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'StorageURI': - return super().__new__( - cls, - *_args, - location=location, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/tag_creation.py b/clients/python/lakefs_client/model/tag_creation.py index 59ca0eacd74..ba5d8c6e3de 100644 --- a/clients/python/lakefs_client/model/tag_creation.py +++ b/clients/python/lakefs_client/model/tag_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,87 +8,261 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class TagCreation( - schemas.DictSchema -): +class TagCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "ref", - "id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'ref': (str,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - ref = schemas.StrSchema - __annotations__ = { - "id": id, - "ref": ref, - } - - ref: MetaOapg.properties.ref - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "ref", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "ref", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ref: typing.Union[MetaOapg.properties.ref, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TagCreation': - return super().__new__( - cls, - *_args, - ref=ref, - id=id, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'ref': 'ref', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, ref, *args, **kwargs): # noqa: E501 + """TagCreation - a model defined in OpenAPI + + Args: + id (str): + ref (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.ref = ref + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, ref, *args, **kwargs): # noqa: E501 + """TagCreation - a model defined in OpenAPI + + Args: + id (str): + ref (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.ref = ref + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/tag_creation.pyi b/clients/python/lakefs_client/model/tag_creation.pyi deleted file mode 100644 index 59ca0eacd74..00000000000 --- a/clients/python/lakefs_client/model/tag_creation.pyi +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class TagCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "ref", - "id", - } - - class properties: - id = schemas.StrSchema - ref = schemas.StrSchema - __annotations__ = { - "id": id, - "ref": ref, - } - - ref: MetaOapg.properties.ref - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "ref", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "ref", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ref: typing.Union[MetaOapg.properties.ref, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TagCreation': - return super().__new__( - cls, - *_args, - ref=ref, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/underlying_object_properties.py b/clients/python/lakefs_client/model/underlying_object_properties.py index bcdd2464c69..424454ba735 100644 --- a/clients/python/lakefs_client/model/underlying_object_properties.py +++ b/clients/python/lakefs_client/model/underlying_object_properties.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,89 +8,249 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class UnderlyingObjectProperties( - schemas.DictSchema -): +class UnderlyingObjectProperties(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'storage_class': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'storage_class': 'storage_class', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnderlyingObjectProperties - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + storage_class (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UnderlyingObjectProperties - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + storage_class (str, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - - - class storage_class( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'storage_class': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "storage_class": storage_class, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage_class"]) -> MetaOapg.properties.storage_class: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["storage_class", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage_class"]) -> typing.Union[MetaOapg.properties.storage_class, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["storage_class", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - storage_class: typing.Union[MetaOapg.properties.storage_class, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UnderlyingObjectProperties': - return super().__new__( - cls, - *_args, - storage_class=storage_class, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/underlying_object_properties.pyi b/clients/python/lakefs_client/model/underlying_object_properties.pyi deleted file mode 100644 index bcdd2464c69..00000000000 --- a/clients/python/lakefs_client/model/underlying_object_properties.pyi +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class UnderlyingObjectProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class storage_class( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'storage_class': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "storage_class": storage_class, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage_class"]) -> MetaOapg.properties.storage_class: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["storage_class", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage_class"]) -> typing.Union[MetaOapg.properties.storage_class, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["storage_class", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - storage_class: typing.Union[MetaOapg.properties.storage_class, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UnderlyingObjectProperties': - return super().__new__( - cls, - *_args, - storage_class=storage_class, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/update_password_by_token.py b/clients/python/lakefs_client/model/update_password_by_token.py index 6c496aa5e42..f6b5cd5fe0c 100644 --- a/clients/python/lakefs_client/model/update_password_by_token.py +++ b/clients/python/lakefs_client/model/update_password_by_token.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,97 +8,265 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class UpdatePasswordByToken( - schemas.DictSchema -): +class UpdatePasswordByToken(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "newPassword", - "token", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'token': (str,), # noqa: E501 + 'new_password': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 } - - class properties: - token = schemas.StrSchema - newPassword = schemas.StrSchema - email = schemas.StrSchema - __annotations__ = { - "token": token, - "newPassword": newPassword, - "email": email, - } - - newPassword: MetaOapg.properties.newPassword - token: MetaOapg.properties.token - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["newPassword"]) -> MetaOapg.properties.newPassword: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "newPassword", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["newPassword"]) -> MetaOapg.properties.newPassword: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "newPassword", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - newPassword: typing.Union[MetaOapg.properties.newPassword, str, ], - token: typing.Union[MetaOapg.properties.token, str, ], - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdatePasswordByToken': - return super().__new__( - cls, - *_args, - newPassword=newPassword, - token=token, - email=email, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'token': 'token', # noqa: E501 + 'new_password': 'newPassword', # noqa: E501 + 'email': 'email', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, token, new_password, *args, **kwargs): # noqa: E501 + """UpdatePasswordByToken - a model defined in OpenAPI + + Args: + token (str): token used for authentication + new_password (str): new password to update + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): optional user email to match the token for verification. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.token = token + self.new_password = new_password + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, token, new_password, *args, **kwargs): # noqa: E501 + """UpdatePasswordByToken - a model defined in OpenAPI + + Args: + token (str): token used for authentication + new_password (str): new password to update + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + email (str): optional user email to match the token for verification. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.token = token + self.new_password = new_password + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/update_password_by_token.pyi b/clients/python/lakefs_client/model/update_password_by_token.pyi deleted file mode 100644 index 6c496aa5e42..00000000000 --- a/clients/python/lakefs_client/model/update_password_by_token.pyi +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class UpdatePasswordByToken( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "newPassword", - "token", - } - - class properties: - token = schemas.StrSchema - newPassword = schemas.StrSchema - email = schemas.StrSchema - __annotations__ = { - "token": token, - "newPassword": newPassword, - "email": email, - } - - newPassword: MetaOapg.properties.newPassword - token: MetaOapg.properties.token - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["newPassword"]) -> MetaOapg.properties.newPassword: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["token", "newPassword", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["newPassword"]) -> MetaOapg.properties.newPassword: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["token", "newPassword", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - newPassword: typing.Union[MetaOapg.properties.newPassword, str, ], - token: typing.Union[MetaOapg.properties.token, str, ], - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdatePasswordByToken': - return super().__new__( - cls, - *_args, - newPassword=newPassword, - token=token, - email=email, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/user.py b/clients/python/lakefs_client/model/user.py index 874ad45fa52..f39590763fb 100644 --- a/clients/python/lakefs_client/model/user.py +++ b/clients/python/lakefs_client/model/user.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,107 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class User( - schemas.DictSchema -): +class User(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "creation_date", - "id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'creation_date': (int,), # noqa: E501 + 'friendly_name': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - creation_date = schemas.Int64Schema - friendly_name = schemas.StrSchema - email = schemas.StrSchema - __annotations__ = { - "id": id, - "creation_date": creation_date, - "friendly_name": friendly_name, - "email": email, - } - - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["friendly_name"]) -> MetaOapg.properties.friendly_name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "friendly_name", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["friendly_name"]) -> typing.Union[MetaOapg.properties.friendly_name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "friendly_name", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - friendly_name: typing.Union[MetaOapg.properties.friendly_name, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'User': - return super().__new__( - cls, - *_args, - creation_date=creation_date, - id=id, - friendly_name=friendly_name, - email=email, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'creation_date': 'creation_date', # noqa: E501 + 'friendly_name': 'friendly_name', # noqa: E501 + 'email': 'email', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, creation_date, *args, **kwargs): # noqa: E501 + """User - a model defined in OpenAPI + + Args: + id (str): a unique identifier for the user. In password-based authentication, this is the email. + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + friendly_name (str): [optional] # noqa: E501 + email (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, creation_date, *args, **kwargs): # noqa: E501 + """User - a model defined in OpenAPI + + Args: + id (str): a unique identifier for the user. In password-based authentication, this is the email. + creation_date (int): Unix Epoch in seconds + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + friendly_name (str): [optional] # noqa: E501 + email (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.creation_date = creation_date + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/user.pyi b/clients/python/lakefs_client/model/user.pyi deleted file mode 100644 index 874ad45fa52..00000000000 --- a/clients/python/lakefs_client/model/user.pyi +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class User( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "creation_date", - "id", - } - - class properties: - id = schemas.StrSchema - creation_date = schemas.Int64Schema - friendly_name = schemas.StrSchema - email = schemas.StrSchema - __annotations__ = { - "id": id, - "creation_date": creation_date, - "friendly_name": friendly_name, - "email": email, - } - - creation_date: MetaOapg.properties.creation_date - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["friendly_name"]) -> MetaOapg.properties.friendly_name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "friendly_name", "email", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["creation_date"]) -> MetaOapg.properties.creation_date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["friendly_name"]) -> typing.Union[MetaOapg.properties.friendly_name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "creation_date", "friendly_name", "email", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - creation_date: typing.Union[MetaOapg.properties.creation_date, decimal.Decimal, int, ], - id: typing.Union[MetaOapg.properties.id, str, ], - friendly_name: typing.Union[MetaOapg.properties.friendly_name, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'User': - return super().__new__( - cls, - *_args, - creation_date=creation_date, - id=id, - friendly_name=friendly_name, - email=email, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/user_creation.py b/clients/python/lakefs_client/model/user_creation.py index 860540fbd58..0ecb59f4033 100644 --- a/clients/python/lakefs_client/model/user_creation.py +++ b/clients/python/lakefs_client/model/user_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,85 +8,259 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class UserCreation( - schemas.DictSchema -): +class UserCreation(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "id", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'invite_user': (bool,), # noqa: E501 } - - class properties: - id = schemas.StrSchema - invite_user = schemas.BoolSchema - __annotations__ = { - "id": id, - "invite_user": invite_user, - } - - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invite_user"]) -> MetaOapg.properties.invite_user: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "invite_user", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invite_user"]) -> typing.Union[MetaOapg.properties.invite_user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "invite_user", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - invite_user: typing.Union[MetaOapg.properties.invite_user, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserCreation': - return super().__new__( - cls, - *_args, - id=id, - invite_user=invite_user, - _configuration=_configuration, - **kwargs, - ) + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'invite_user': 'invite_user', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """UserCreation - a model defined in OpenAPI + + Args: + id (str): a unique identifier for the user. In password-based authentication, this is the email. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_user (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """UserCreation - a model defined in OpenAPI + + Args: + id (str): a unique identifier for the user. In password-based authentication, this is the email. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + invite_user (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/user_creation.pyi b/clients/python/lakefs_client/model/user_creation.pyi deleted file mode 100644 index 860540fbd58..00000000000 --- a/clients/python/lakefs_client/model/user_creation.pyi +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class UserCreation( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "id", - } - - class properties: - id = schemas.StrSchema - invite_user = schemas.BoolSchema - __annotations__ = { - "id": id, - "invite_user": invite_user, - } - - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["invite_user"]) -> MetaOapg.properties.invite_user: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "invite_user", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["invite_user"]) -> typing.Union[MetaOapg.properties.invite_user, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "invite_user", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, str, ], - invite_user: typing.Union[MetaOapg.properties.invite_user, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserCreation': - return super().__new__( - cls, - *_args, - id=id, - invite_user=invite_user, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model/user_list.py b/clients/python/lakefs_client/model/user_list.py index 860cb9d8263..8489e7e4614 100644 --- a/clients/python/lakefs_client/model/user_list.py +++ b/clients/python/lakefs_client/model/user_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,118 +8,269 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 +def lazy_import(): + from lakefs_client.model.pagination import Pagination + from lakefs_client.model.user import User + globals()['Pagination'] = Pagination + globals()['User'] = User -class UserList( - schemas.DictSchema -): + +class UserList(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded - class MetaOapg: - required = { - "pagination", - "results", + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pagination': (Pagination,), # noqa: E501 + 'results': ([User],), # noqa: E501 } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['User']: - return User - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['User'], typing.List['User']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'User': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.user import User + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pagination': 'pagination', # noqa: E501 + 'results': 'results', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pagination, results, *args, **kwargs): # noqa: E501 + """UserList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([User]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pagination, results, *args, **kwargs): # noqa: E501 + """UserList - a model defined in OpenAPI + + Args: + pagination (Pagination): + results ([User]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pagination = pagination + self.results = results + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/user_list.pyi b/clients/python/lakefs_client/model/user_list.pyi deleted file mode 100644 index 860cb9d8263..00000000000 --- a/clients/python/lakefs_client/model/user_list.pyi +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class UserList( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pagination", - "results", - } - - class properties: - - @staticmethod - def pagination() -> typing.Type['Pagination']: - return Pagination - - - class results( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['User']: - return User - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['User'], typing.List['User']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'results': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'User': - return super().__getitem__(i) - __annotations__ = { - "pagination": pagination, - "results": results, - } - - pagination: 'Pagination' - results: MetaOapg.properties.results - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pagination"]) -> 'Pagination': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results"]) -> MetaOapg.properties.results: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pagination", "results", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pagination: 'Pagination', - results: typing.Union[MetaOapg.properties.results, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UserList': - return super().__new__( - cls, - *_args, - pagination=pagination, - results=results, - _configuration=_configuration, - **kwargs, - ) - -from lakefs_client.model.pagination import Pagination -from lakefs_client.model.user import User diff --git a/clients/python/lakefs_client/model/version_config.py b/clients/python/lakefs_client/model/version_config.py index 72196426504..e4dc4a13f2d 100644 --- a/clients/python/lakefs_client/model/version_config.py +++ b/clients/python/lakefs_client/model/version_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,90 +8,257 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 + import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 +import sys # noqa: F401 -import frozendict # noqa: F401 +from lakefs_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from ..model_utils import OpenApiModel +from lakefs_client.exceptions import ApiAttributeError -from lakefs_client import schemas # noqa: F401 -class VersionConfig( - schemas.DictSchema -): +class VersionConfig(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. """ + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'version': (str,), # noqa: E501 + 'upgrade_recommended': (bool,), # noqa: E501 + 'upgrade_url': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'version': 'version', # noqa: E501 + 'upgrade_recommended': 'upgrade_recommended', # noqa: E501 + 'upgrade_url': 'upgrade_url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """VersionConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + version (str): [optional] # noqa: E501 + upgrade_recommended (bool): [optional] # noqa: E501 + upgrade_url (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """VersionConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + version (str): [optional] # noqa: E501 + upgrade_recommended (bool): [optional] # noqa: E501 + upgrade_url (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - class MetaOapg: - - class properties: - version = schemas.StrSchema - upgrade_recommended = schemas.BoolSchema - upgrade_url = schemas.StrSchema - __annotations__ = { - "version": version, - "upgrade_recommended": upgrade_recommended, - "upgrade_url": upgrade_url, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["version"]) -> MetaOapg.properties.version: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["upgrade_recommended"]) -> MetaOapg.properties.upgrade_recommended: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["upgrade_url"]) -> MetaOapg.properties.upgrade_url: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["version", "upgrade_recommended", "upgrade_url", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["version"]) -> typing.Union[MetaOapg.properties.version, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["upgrade_recommended"]) -> typing.Union[MetaOapg.properties.upgrade_recommended, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["upgrade_url"]) -> typing.Union[MetaOapg.properties.upgrade_url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["version", "upgrade_recommended", "upgrade_url", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - version: typing.Union[MetaOapg.properties.version, str, schemas.Unset] = schemas.unset, - upgrade_recommended: typing.Union[MetaOapg.properties.upgrade_recommended, bool, schemas.Unset] = schemas.unset, - upgrade_url: typing.Union[MetaOapg.properties.upgrade_url, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'VersionConfig': - return super().__new__( - cls, - *_args, - version=version, - upgrade_recommended=upgrade_recommended, - upgrade_url=upgrade_url, - _configuration=_configuration, - **kwargs, - ) + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/clients/python/lakefs_client/model/version_config.pyi b/clients/python/lakefs_client/model/version_config.pyi deleted file mode 100644 index 72196426504..00000000000 --- a/clients/python/lakefs_client/model/version_config.pyi +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - -class VersionConfig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - version = schemas.StrSchema - upgrade_recommended = schemas.BoolSchema - upgrade_url = schemas.StrSchema - __annotations__ = { - "version": version, - "upgrade_recommended": upgrade_recommended, - "upgrade_url": upgrade_url, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["version"]) -> MetaOapg.properties.version: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["upgrade_recommended"]) -> MetaOapg.properties.upgrade_recommended: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["upgrade_url"]) -> MetaOapg.properties.upgrade_url: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["version", "upgrade_recommended", "upgrade_url", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["version"]) -> typing.Union[MetaOapg.properties.version, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["upgrade_recommended"]) -> typing.Union[MetaOapg.properties.upgrade_recommended, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["upgrade_url"]) -> typing.Union[MetaOapg.properties.upgrade_url, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["version", "upgrade_recommended", "upgrade_url", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - version: typing.Union[MetaOapg.properties.version, str, schemas.Unset] = schemas.unset, - upgrade_recommended: typing.Union[MetaOapg.properties.upgrade_recommended, bool, schemas.Unset] = schemas.unset, - upgrade_url: typing.Union[MetaOapg.properties.upgrade_url, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'VersionConfig': - return super().__new__( - cls, - *_args, - version=version, - upgrade_recommended=upgrade_recommended, - upgrade_url=upgrade_url, - _configuration=_configuration, - **kwargs, - ) diff --git a/clients/python/lakefs_client/model_utils.py b/clients/python/lakefs_client/model_utils.py new file mode 100644 index 00000000000..b3fbda54e88 --- /dev/null +++ b/clients/python/lakefs_client/model_utils.py @@ -0,0 +1,2034 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +from datetime import date, datetime # noqa: F401 +from copy import deepcopy +import inspect +import io +import os +import pprint +import re +import tempfile + +from dateutil.parser import parse + +from lakefs_client.exceptions import ( + ApiKeyError, + ApiAttributeError, + ApiTypeError, + ApiValueError, +) + +none_type = type(None) +file_type = io.IOBase + + +def convert_js_args_to_python_args(fn): + from functools import wraps + @wraps(fn) + def wrapped_init(_self, *args, **kwargs): + """ + An attribute named `self` received from the api will conflicts with the reserved `self` + parameter of a class method. During generation, `self` attributes are mapped + to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. + """ + spec_property_naming = kwargs.get('_spec_property_naming', False) + if spec_property_naming: + kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) + return fn(_self, *args, **kwargs) + return wrapped_init + + +class cached_property(object): + # this caches the result of the function call for fn with no inputs + # use this as a decorator on function methods that you want converted + # into cached properties + result_key = '_results' + + def __init__(self, fn): + self._fn = fn + + def __get__(self, instance, cls=None): + if self.result_key in vars(self): + return vars(self)[self.result_key] + else: + result = self._fn() + setattr(self, self.result_key, result) + return result + + +PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) + +def allows_single_value_input(cls): + """ + This function returns True if the input composed schema model or any + descendant model allows a value only input + This is true for cases where oneOf contains items like: + oneOf: + - float + - NumberWithValidation + - StringEnum + - ArrayModel + - null + TODO: lru_cache this + """ + if ( + issubclass(cls, ModelSimple) or + cls in PRIMITIVE_TYPES + ): + return True + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return False + return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return False + +def composed_model_input_classes(cls): + """ + This function returns a list of the possible models that can be accepted as + inputs. + TODO: lru_cache this + """ + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: + return [cls] + elif issubclass(cls, ModelNormal): + if cls.discriminator is None: + return [cls] + else: + return get_discriminated_classes(cls) + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return [] + if cls.discriminator is None: + input_classes = [] + for c in cls._composed_schemas['oneOf']: + input_classes.extend(composed_model_input_classes(c)) + return input_classes + else: + return get_discriminated_classes(cls) + return [] + + +class OpenApiModel(object): + """The base class for all OpenAPIModels""" + + def set_attribute(self, name, value): + # this is only used to set properties on self + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._spec_property_naming, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value, + self._configuration + ) + self.__dict__['_data_store'][name] = value + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other + + def __setattr__(self, attr, value): + """set the value of an attribute using dot notation: `instance.attr = val`""" + self[attr] = value + + def __getattr__(self, attr): + """get the value of an attribute using dot notation: `instance.attr`""" + return self.__getitem__(attr) + + def __copy__(self): + cls = self.__class__ + if self.get("_spec_property_naming", False): + return cls._new_from_openapi_data(**self.__dict__) + else: + return new_cls.__new__(cls, **self.__dict__) + + def __deepcopy__(self, memo): + cls = self.__class__ + + if self.get("_spec_property_naming", False): + new_inst = cls._new_from_openapi_data() + else: + new_inst = cls.__new__(cls) + + for k, v in self.__dict__.items(): + setattr(new_inst, k, deepcopy(v, memo)) + return new_inst + + + def __new__(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return super(OpenApiModel, cls).__new__(cls) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return super(OpenApiModel, cls).__new__(cls) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = super(OpenApiModel, cls).__new__(cls) + self_inst.__init__(*args, **kwargs) + + if kwargs.get("_spec_property_naming", False): + # when true, implies new is from deserialization + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + else: + new_inst = new_cls.__new__(new_cls, *args, **kwargs) + new_inst.__init__(*args, **kwargs) + + return new_inst + + + @classmethod + @convert_js_args_to_python_args + def _new_from_openapi_data(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return cls._from_openapi_data(*args, **kwargs) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return cls._from_openapi_data(*args, **kwargs) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = cls._from_openapi_data(*args, **kwargs) + + + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + return new_inst + + +class ModelSimple(OpenApiModel): + """the parent class of models whose type != object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_str(self): + """Returns the string representation of the model""" + return str(self.value) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + return vals_equal + + +class ModelNormal(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +class ModelComposed(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi and have oneOf/allOf/anyOf + + When one sets a property we use var_name_to_model_instances to store the value in + the correct class instances + run any type checking + validation code. + When one gets a property we use var_name_to_model_instances to get the value + from the correct class instances. + This allows multiple composed schemas to contain the same property with additive + constraints on the value. + + _composed_schemas (dict) stores the anyOf/allOf/oneOf classes + key (str): allOf/oneOf/anyOf + value (list): the classes in the XOf definition. + Note: none_type can be included when the openapi document version >= 3.1.0 + _composed_instances (list): stores a list of instances of the composed schemas + defined in _composed_schemas. When properties are accessed in the self instance, + they are returned from the self._data_store or the data stores in the instances + in self._composed_schemas + _var_name_to_model_instances (dict): maps between a variable name on self and + the composed instances (self included) which contain that data + key (str): property name + value (list): list of class instances, self or instances in _composed_instances + which contain the value that the key is referring to. + """ + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + """ + Use cases: + 1. additional_properties_type is None (additionalProperties == False in spec) + Check for property presence in self.openapi_types + if not present then throw an error + if present set in self, set attribute + always set on composed schemas + 2. additional_properties_type exists + set attribute on self + always set on composed schemas + """ + if self.additional_properties_type is None: + """ + For an attribute to exist on a composed schema it must: + - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND + - fulfill schema_requirements in each oneOf/anyOf/allOf schemas + + schema_requirements: + For an attribute to exist on a schema it must: + - be present in properties at the schema OR + - have additionalProperties unset (defaults additionalProperties = any type) OR + - have additionalProperties set + """ + if name not in self.openapi_types: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + # attribute must be set on self and composed instances + self.set_attribute(name, value) + for model_instance in self._composed_instances: + setattr(model_instance, name, value) + if name not in self._var_name_to_model_instances: + # we assigned an additional property + self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + return None + + __unset_attribute_value__ = object() + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + # get the attribute from the correct instance + model_instances = self._var_name_to_model_instances.get(name) + values = [] + # A composed model stores self and child (oneof/anyOf/allOf) models under + # self._var_name_to_model_instances. + # Any property must exist in self and all model instances + # The value stored in all model instances must be the same + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + v = model_instance._data_store[name] + if v not in values: + values.append(v) + len_values = len(values) + if len_values == 0: + return default + elif len_values == 1: + return values[0] + elif len_values > 1: + raise ApiValueError( + "Values stored for property {0} in {1} differ when looking " + "at self and self's composed instances. All values must be " + "the same".format(name, type(self).__name__), + [e for e in [self._path_to_item, name] if e] + ) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + value = self.get(name, self.__unset_attribute_value__) + if value is self.__unset_attribute_value__: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + return value + + def __contains__(self, name): + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" + + if name in self.required_properties: + return name in self.__dict__ + + model_instances = self._var_name_to_model_instances.get( + name, self._additional_properties_model_instances) + + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + return True + + return False + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +COERCION_INDEX_BY_TYPE = { + ModelComposed: 0, + ModelNormal: 1, + ModelSimple: 2, + none_type: 3, # The type of 'None'. + list: 4, + dict: 5, + float: 6, + int: 7, + bool: 8, + datetime: 9, + date: 10, + str: 11, + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. +} + +# these are used to limit what type conversions we try to do +# when we have a valid type already and we want to try converting +# to another type +UPCONVERSION_TYPE_PAIRS = ( + (str, datetime), + (str, date), + (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (list, ModelComposed), + (dict, ModelComposed), + (str, ModelComposed), + (int, ModelComposed), + (float, ModelComposed), + (list, ModelComposed), + (list, ModelNormal), + (dict, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), +) + +COERCIBLE_TYPE_PAIRS = { + False: ( # client instantiation of a model with client data + # (dict, ModelComposed), + # (list, ModelComposed), + # (dict, ModelNormal), + # (list, ModelNormal), + # (str, ModelSimple), + # (int, ModelSimple), + # (float, ModelSimple), + # (list, ModelSimple), + # (str, int), + # (str, float), + # (str, datetime), + # (str, date), + # (int, str), + # (float, str), + ), + True: ( # server -> client data + (dict, ModelComposed), + (list, ModelComposed), + (dict, ModelNormal), + (list, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), + # (str, int), + # (str, float), + (str, datetime), + (str, date), + # (int, str), + # (float, str), + (str, file_type) + ), +} + + +def get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + Python2: + float and int will return int, where int is the python3 int backport + str and unicode will return str, where str is the python3 str backport + Note: float and int ARE both instances of int backport + Note: str_py2 and unicode_py2 are NOT both instances of str backport + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, type): + # input_value is a class + return input_value + elif isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, list): + return list + elif isinstance(input_value, dict): + return dict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, file_type): + return file_type + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + return int + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif isinstance(input_value, str): + return str + return type(input_value) + + +def check_allowed_values(allowed_values, input_variable_path, input_values): + """Raises an exception if the input_values are not allowed + + Args: + allowed_values (dict): the allowed_values dict + input_variable_path (tuple): the path to the input variable + input_values (list/str/int/float/date/datetime): the values that we + are checking to see if they are in allowed_values + """ + these_allowed_values = list(allowed_values[input_variable_path].values()) + if (isinstance(input_values, list) + and not set(input_values).issubset( + set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values) - set(these_allowed_values))), + raise ApiValueError( + "Invalid values for `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (isinstance(input_values, dict) + and not set( + input_values.keys()).issubset(set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values.keys()) - set(these_allowed_values))) + raise ApiValueError( + "Invalid keys in `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (not isinstance(input_values, (list, dict)) + and input_values not in these_allowed_values): + raise ApiValueError( + "Invalid value for `%s` (%s), must be one of %s" % + ( + input_variable_path[0], + input_values, + these_allowed_values + ) + ) + + +def is_json_validation_enabled(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + +def check_validations( + validations, input_variable_path, input_values, + configuration=None): + """Raises an exception if the input_values are invalid + + Args: + validations (dict): the validation dictionary. + input_variable_path (tuple): the path to the input variable. + input_values (list/str/int/float/date/datetime): the values that we + are checking. + configuration (Configuration): the configuration class. + """ + + if input_values is None: + return + + current_validations = validations[input_variable_path] + if (is_json_validation_enabled('multipleOf', configuration) and + 'multiple_of' in current_validations and + isinstance(input_values, (int, float)) and + not (float(input_values) / current_validations['multiple_of']).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + raise ApiValueError( + "Invalid value for `%s`, value must be a multiple of " + "`%s`" % ( + input_variable_path[0], + current_validations['multiple_of'] + ) + ) + + if (is_json_validation_enabled('maxLength', configuration) and + 'max_length' in current_validations and + len(input_values) > current_validations['max_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['max_length'] + ) + ) + + if (is_json_validation_enabled('minLength', configuration) and + 'min_length' in current_validations and + len(input_values) < current_validations['min_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be greater than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['min_length'] + ) + ) + + if (is_json_validation_enabled('maxItems', configuration) and + 'max_items' in current_validations and + len(input_values) > current_validations['max_items']): + raise ApiValueError( + "Invalid value for `%s`, number of items must be less than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['max_items'] + ) + ) + + if (is_json_validation_enabled('minItems', configuration) and + 'min_items' in current_validations and + len(input_values) < current_validations['min_items']): + raise ValueError( + "Invalid value for `%s`, number of items must be greater than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['min_items'] + ) + ) + + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): + if isinstance(input_values, list): + max_val = max(input_values) + min_val = min(input_values) + elif isinstance(input_values, dict): + max_val = max(input_values.values()) + min_val = min(input_values.values()) + else: + max_val = input_values + min_val = input_values + + if (is_json_validation_enabled('exclusiveMaximum', configuration) and + 'exclusive_maximum' in current_validations and + max_val >= current_validations['exclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than `%s`" % ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('maximum', configuration) and + 'inclusive_maximum' in current_validations and + max_val > current_validations['inclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['inclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('exclusiveMinimum', configuration) and + 'exclusive_minimum' in current_validations and + min_val <= current_validations['exclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than `%s`" % + ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('minimum', configuration) and + 'inclusive_minimum' in current_validations and + min_val < current_validations['inclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than or equal " + "to `%s`" % ( + input_variable_path[0], + current_validations['inclusive_minimum'] + ) + ) + flags = current_validations.get('regex', {}).get('flags', 0) + if (is_json_validation_enabled('pattern', configuration) and + 'regex' in current_validations and + not re.search(current_validations['regex']['pattern'], + input_values, flags=flags)): + err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( + input_variable_path[0], + current_validations['regex']['pattern'] + ) + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + err_msg = r"%s with flags=`%s`" % (err_msg, flags) + raise ApiValueError(err_msg) + + +def order_response_types(required_types): + """Returns the required types sorted in coercion order + + Args: + required_types (list/tuple): collection of classes or instance of + list or dict with class information inside it. + + Returns: + (list): coercion order sorted collection of classes or instance + of list or dict with class information inside it. + """ + + def index_getter(class_or_instance): + if isinstance(class_or_instance, list): + return COERCION_INDEX_BY_TYPE[list] + elif isinstance(class_or_instance, dict): + return COERCION_INDEX_BY_TYPE[dict] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelComposed)): + return COERCION_INDEX_BY_TYPE[ModelComposed] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): + return COERCION_INDEX_BY_TYPE[ModelNormal] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): + return COERCION_INDEX_BY_TYPE[ModelSimple] + elif class_or_instance in COERCION_INDEX_BY_TYPE: + return COERCION_INDEX_BY_TYPE[class_or_instance] + raise ApiValueError("Unsupported type: %s" % class_or_instance) + + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) + return sorted_types + + +def remove_uncoercible(required_types_classes, current_item, spec_property_naming, + must_convert=True): + """Only keeps the type conversions that are possible + + Args: + required_types_classes (tuple): tuple of classes that are required + these should be ordered by COERCION_INDEX_BY_TYPE + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + current_item (any): the current item (input data) to be converted + + Keyword Args: + must_convert (bool): if True the item to convert is of the wrong + type and we want a big list of coercibles + if False, we want a limited list of coercibles + + Returns: + (list): the remaining coercible required types, classes only + """ + current_type_simple = get_simple_class(current_item) + + results_classes = [] + for required_type_class in required_types_classes: + # convert our models to OpenApiModel + required_type_class_simplified = required_type_class + if isinstance(required_type_class_simplified, type): + if issubclass(required_type_class_simplified, ModelComposed): + required_type_class_simplified = ModelComposed + elif issubclass(required_type_class_simplified, ModelNormal): + required_type_class_simplified = ModelNormal + elif issubclass(required_type_class_simplified, ModelSimple): + required_type_class_simplified = ModelSimple + + if required_type_class_simplified == current_type_simple: + # don't consider converting to one's own class + continue + + class_pair = (current_type_simple, required_type_class_simplified) + if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: + results_classes.append(required_type_class) + elif class_pair in UPCONVERSION_TYPE_PAIRS: + results_classes.append(required_type_class) + return results_classes + +def get_discriminated_classes(cls): + """ + Returns all the classes that a discriminator converts to + TODO: lru_cache this + """ + possible_classes = [] + key = list(cls.discriminator.keys())[0] + if is_type_nullable(cls): + possible_classes.append(cls) + for discr_cls in cls.discriminator[key].values(): + if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + possible_classes.extend(get_discriminated_classes(discr_cls)) + else: + possible_classes.append(discr_cls) + return possible_classes + + +def get_possible_classes(cls, from_server_context): + # TODO: lru_cache this + possible_classes = [cls] + if from_server_context: + return possible_classes + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + possible_classes = [] + possible_classes.extend(get_discriminated_classes(cls)) + elif issubclass(cls, ModelComposed): + possible_classes.extend(composed_model_input_classes(cls)) + return possible_classes + + +def get_required_type_classes(required_types_mixed, spec_property_naming): + """Converts the tuple required_types into a tuple and a dict described + below + + Args: + required_types_mixed (tuple/list): will contain either classes or + instance of list or dict + spec_property_naming (bool): if True these values came from the + server, and we use the data types in our endpoints. + If False, we are client side and we need to include + oneOf and discriminator classes inside the data types in our endpoints + + Returns: + (valid_classes, dict_valid_class_to_child_types_mixed): + valid_classes (tuple): the valid classes that the current item + should be + dict_valid_class_to_child_types_mixed (dict): + valid_class (class): this is the key + child_types_mixed (list/dict/tuple): describes the valid child + types + """ + valid_classes = [] + child_req_types_by_current_type = {} + for required_type in required_types_mixed: + if isinstance(required_type, list): + valid_classes.append(list) + child_req_types_by_current_type[list] = required_type + elif isinstance(required_type, tuple): + valid_classes.append(tuple) + child_req_types_by_current_type[tuple] = required_type + elif isinstance(required_type, dict): + valid_classes.append(dict) + child_req_types_by_current_type[dict] = required_type[str] + else: + valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) + return tuple(valid_classes), child_req_types_by_current_type + + +def change_keys_js_to_python(input_dict, model_class): + """ + Converts from javascript_key keys in the input_dict to python_keys in + the output dict using the mapping in model_class. + If the input_dict contains a key which does not declared in the model_class, + the key is added to the output dict as is. The assumption is the model_class + may have undeclared properties (additionalProperties attribute in the OAS + document). + """ + + if getattr(model_class, 'attribute_map', None) is None: + return input_dict + output_dict = {} + reversed_attr_map = {value: key for key, value in + model_class.attribute_map.items()} + for javascript_key, value in input_dict.items(): + python_key = reversed_attr_map.get(javascript_key) + if python_key is None: + # if the key is unknown, it is in error or it is an + # additionalProperties variable + python_key = javascript_key + output_dict[python_key] = value + return output_dict + + +def get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type + ) + + +def deserialize_primitive(data, klass, path_to_item): + """Deserializes string to primitive type. + + :param data: str/int/float + :param klass: str/class the class to convert to + + :return: int, float, str, bool, date, datetime + """ + additional_message = "" + try: + if klass in {datetime, date}: + additional_message = ( + "If you need your parameter to have a fallback " + "string value, please set its type as `type: {}` in your " + "spec. That allows the value to be any type. " + ) + if klass == datetime: + if len(data) < 8: + raise ValueError("This is not a datetime") + # The string should be in iso8601 datetime format. + parsed_datetime = parse(data) + date_only = ( + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 + ) + if date_only: + raise ValueError("This is a date, not a datetime") + return parsed_datetime + elif klass == date: + if len(data) < 8: + raise ValueError("This is not a date") + return parse(data).date() + else: + converted_value = klass(data) + if isinstance(data, str) and klass == float: + if str(converted_value) != data: + # '7' -> 7.0 -> '7.0' != '7' + raise ValueError('This is not a float') + return converted_value + except (OverflowError, ValueError) as ex: + # parse can raise OverflowError + raise ApiValueError( + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), klass.__name__ + ), + path_to_item=path_to_item + ) from ex + + +def get_discriminator_class(model_class, + discr_name, + discr_value, cls_visited): + """Returns the child class specified by the discriminator. + + Args: + model_class (OpenApiModel): the model class. + discr_name (string): the name of the discriminator property. + discr_value (any): the discriminator value. + cls_visited (list): list of model classes that have been visited. + Used to determine the discriminator class without + visiting circular references indefinitely. + + Returns: + used_model_class (class/None): the chosen child class that will be used + to deserialize the data, for example dog.Dog. + If a class is not found, None is returned. + """ + + if model_class in cls_visited: + # The class has already been visited and no suitable class was found. + return None + cls_visited.append(model_class) + used_model_class = None + if discr_name in model_class.discriminator: + class_name_to_discr_class = model_class.discriminator[discr_name] + used_model_class = class_name_to_discr_class.get(discr_value) + if used_model_class is None: + # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators + # The discriminator mapping may exist in a descendant (anyOf, oneOf) + # or ancestor (allOf). + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat + # hierarchy, the discriminator mappings may be defined at any level + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: + # Check if the schema has inherited discriminators. + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + used_model_class = get_discriminator_class( + cls, discr_name, discr_value, cls_visited) + if used_model_class is not None: + return used_model_class + return used_model_class + + +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, spec_property_naming): + """Deserializes model_data to model instance. + + Args: + model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model + model_class (OpenApiModel): the model class + path_to_item (list): path to the model in the received data + check_type (bool): whether to check the data tupe for the values in + the model + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + + Returns: + model instance + + Raise: + ApiTypeError + ApiValueError + ApiKeyError + """ + + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming) + + if issubclass(model_class, ModelSimple): + return model_class._new_from_openapi_data(model_data, **kw_args) + elif isinstance(model_data, list): + return model_class._new_from_openapi_data(*model_data, **kw_args) + if isinstance(model_data, dict): + kw_args.update(model_data) + return model_class._new_from_openapi_data(**kw_args) + elif isinstance(model_data, PRIMITIVE_TYPES): + return model_class._new_from_openapi_data(model_data, **kw_args) + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, spec_property_naming, key_type=False, + must_convert=False, check_type=True): + """ + Args: + input_value (any): the data to convert + valid_classes (any): the classes that are valid + path_to_item (list): the path to the item to convert + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + key_type (bool): if True we need to convert a key type (not supported) + must_convert (bool): if True we must convert + check_type (bool): if True we check the type or the returned data in + ModelComposed/ModelNormal/ModelSimple instances + + Returns: + instance (any) the fixed item + + Raises: + ApiTypeError + ApiValueError + ApiKeyError + """ + valid_classes_ordered = order_response_types(valid_classes) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, spec_property_naming) + if not valid_classes_coercible or key_type: + # we do not handle keytype errors, json will take care + # of this for us + if configuration is None or not configuration.discard_unknown_keys: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) + for valid_class in valid_classes_coercible: + try: + if issubclass(valid_class, OpenApiModel): + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, spec_property_naming) + elif valid_class == file_type: + return deserialize_file(input_value, configuration) + return deserialize_primitive(input_value, valid_class, + path_to_item) + except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: + if must_convert: + raise conversion_exc + # if we have conversion errors when must_convert == False + # we ignore the exception and move on to the next class + continue + # we were unable to convert, must_convert == False + return input_value + + +def is_type_nullable(input_type): + """ + Returns true if None is an allowed value for the specified input_type. + + A type is nullable if at least one of the following conditions is true: + 1. The OAS 'nullable' attribute has been specified, + 1. The type is the 'null' type, + 1. The type is a anyOf/oneOf composed schema, and a child schema is + the 'null' type. + Args: + input_type (type): the class of the input_value that we are + checking + Returns: + bool + """ + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True + if issubclass(input_type, ModelComposed): + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + for t in input_type._composed_schemas.get('oneOf', ()): + if is_type_nullable(t): return True + for t in input_type._composed_schemas.get('anyOf', ()): + if is_type_nullable(t): return True + return False + + +def is_valid_type(input_class_simple, valid_classes): + """ + Args: + input_class_simple (class): the class of the input_value that we are + checking + valid_classes (tuple): the valid classes that the current item + should be + Returns: + bool + """ + if issubclass(input_class_simple, OpenApiModel) and \ + valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): + return True + valid_type = input_class_simple in valid_classes + if not valid_type and ( + issubclass(input_class_simple, OpenApiModel) or + input_class_simple is none_type): + for valid_class in valid_classes: + if input_class_simple is none_type and is_type_nullable(valid_class): + # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. + return True + if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): + continue + discr_propertyname_py = list(valid_class.discriminator.keys())[0] + discriminator_classes = ( + valid_class.discriminator[discr_propertyname_py].values() + ) + valid_type = is_valid_type(input_class_simple, discriminator_classes) + if valid_type: + return True + return valid_type + + +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + spec_property_naming, _check_type, configuration=None): + """Raises a TypeError is there is a problem, otherwise returns value + + Args: + input_value (any): the data to validate/convert + required_types_mixed (list/dict/tuple): A list of + valid classes, or a list tuples of valid classes, or a dict where + the value is a tuple of value classes + path_to_item: (list) the path to the data being validated + this stores a list of keys or indices to get to the data being + validated + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + _check_type: (boolean) if true, type will be checked and conversion + will be attempted. + configuration: (Configuration): the configuration class to use + when converting file_type items. + If passed, conversion will be attempted when possible + If not passed, no conversions will be attempted and + exceptions will be raised + + Returns: + the correctly typed value + + Raises: + ApiTypeError + """ + results = get_required_type_classes(required_types_mixed, spec_property_naming) + valid_classes, child_req_types_by_current_type = results + + input_class_simple = get_simple_class(input_value) + valid_type = is_valid_type(input_class_simple, valid_classes) + if not valid_type: + if configuration: + # if input_value is not valid_type try to convert it + converted_instance = attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=True, + check_type=_check_type + ) + return converted_instance + else: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) + + # input_value's type is in valid_classes + if len(valid_classes) > 1 and configuration: + # there are valid classes which are not the current class + valid_classes_coercible = remove_uncoercible( + valid_classes, input_value, spec_property_naming, must_convert=False) + if valid_classes_coercible: + converted_instance = attempt_convert_item( + input_value, + valid_classes_coercible, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=_check_type + ) + return converted_instance + + if child_req_types_by_current_type == {}: + # all types are of the required types and there are no more inner + # variables left to look at + return input_value + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) + if inner_required_types is None: + # for this type, there are not more inner variables left to look at + return input_value + if isinstance(input_value, list): + if input_value == []: + # allow an empty list + return input_value + for index, inner_value in enumerate(input_value): + inner_path = list(path_to_item) + inner_path.append(index) + input_value[index] = validate_and_convert_types( + inner_value, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + elif isinstance(input_value, dict): + if input_value == {}: + # allow an empty dict + return input_value + for inner_key, inner_val in input_value.items(): + inner_path = list(path_to_item) + inner_path.append(inner_key) + if get_simple_class(inner_key) != str: + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) + input_value[inner_key] = validate_and_convert_types( + inner_val, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + return input_value + + +def model_to_dict(model_instance, serialize=True): + """Returns the model properties as a dict + + Args: + model_instance (one of your model instances): the model instance that + will be converted to a dict. + + Keyword Args: + serialize (bool): if True, the keys in the dict will be values from + attribute_map + """ + result = {} + + model_instances = [model_instance] + if model_instance._composed_schemas: + model_instances.extend(model_instance._composed_instances) + seen_json_attribute_names = set() + used_fallback_python_attribute_names = set() + py_to_json_map = {} + for model_instance in model_instances: + for attr, value in model_instance._data_store.items(): + if serialize: + # we use get here because additional property key names do not + # exist in attribute_map + try: + attr = model_instance.attribute_map[attr] + py_to_json_map.update(model_instance.attribute_map) + seen_json_attribute_names.add(attr) + except KeyError: + used_fallback_python_attribute_names.add(attr) + if isinstance(value, list): + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], + model_to_dict(item[1], serialize=serialize)) + if hasattr(item[1], '_data_store') else item, + value.items() + )) + elif isinstance(value, ModelSimple): + result[attr] = value.value + elif hasattr(value, '_data_store'): + result[attr] = model_to_dict(value, serialize=serialize) + else: + result[attr] = value + if serialize: + for python_key in used_fallback_python_attribute_names: + json_key = py_to_json_map.get(python_key) + if json_key is None: + continue + if python_key == json_key: + continue + json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names + if json_key_assigned_no_need_for_python_key: + del result[python_key] + + return result + + +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + """ + key_or_value = 'value' + if key_type: + key_or_value = 'key' + valid_classes_phrase = get_valid_classes_phrase(valid_classes) + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + ) + return msg + + +def get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed + """ + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return 'is {0}'.format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def get_allof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + used to make instances + constant_args (dict): + metadata arguments: + _check_type + _path_to_item + _spec_property_naming + _configuration + _visited_composed_classes + + Returns + composed_instances (list) + """ + composed_instances = [] + for allof_class in self._composed_schemas['allOf']: + + try: + if constant_args.get('_spec_property_naming'): + allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) + else: + allof_instance = allof_class(**model_args, **constant_args) + composed_instances.append(allof_instance) + except Exception as ex: + raise ApiValueError( + "Invalid inputs given to generate an instance of '%s'. The " + "input data was invalid for the allOf schema '%s' in the composed " + "schema '%s'. Error=%s" % ( + allof_class.__name__, + allof_class.__name__, + self.__class__.__name__, + str(ex) + ) + ) from ex + return composed_instances + + +def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): + """ + Find the oneOf schema that matches the input data (e.g. payload). + If exactly one schema matches the input data, an instance of that schema + is returned. + If zero or more than one schema match the input data, an exception is raised. + In OAS 3.x, the payload MUST, by validation, match exactly one of the + schemas described by oneOf. + + Args: + cls: the class we are handling + model_kwargs (dict): var_name to var_value + The input data, e.g. the payload that must match a oneOf schema + in the OpenAPI document. + constant_kwargs (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Kwargs: + model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): + the value to assign to a primitive class or ModelSimple class + Notes: + - this is only passed in when oneOf includes types which are not object + - None is used to suppress handling of model_arg, nullable models are handled in __new__ + + Returns + oneof_instance (instance) + """ + if len(cls._composed_schemas['oneOf']) == 0: + return None + + oneof_instances = [] + # Iterate over each oneOf schema and determine if the input data + # matches the oneOf schemas. + for oneof_class in cls._composed_schemas['oneOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if oneof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + single_value_input = allows_single_value_input(oneof_class) + + try: + if not single_value_input: + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) + else: + oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) + else: + if issubclass(oneof_class, ModelSimple): + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) + else: + oneof_instance = oneof_class(model_arg, **constant_kwargs) + elif oneof_class in PRIMITIVE_TYPES: + oneof_instance = validate_and_convert_types( + model_arg, + (oneof_class,), + constant_kwargs['_path_to_item'], + constant_kwargs['_spec_property_naming'], + constant_kwargs['_check_type'], + configuration=constant_kwargs['_configuration'] + ) + oneof_instances.append(oneof_instance) + except Exception: + pass + if len(oneof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None " + "of the oneOf schemas matched the input data." % + cls.__name__ + ) + elif len(oneof_instances) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. Multiple " + "oneOf schemas matched the inputs, but a max of one is allowed." % + cls.__name__ + ) + return oneof_instances[0] + + +def get_anyof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + The input data, e.g. the payload that must match at least one + anyOf child schema in the OpenAPI document. + constant_args (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Returns + anyof_instances (list) + """ + anyof_instances = [] + if len(self._composed_schemas['anyOf']) == 0: + return anyof_instances + + for anyof_class in self._composed_schemas['anyOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if anyof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + try: + if constant_args.get('_spec_property_naming'): + anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) + else: + anyof_instance = anyof_class(**model_args, **constant_args) + anyof_instances.append(anyof_instance) + except Exception: + pass + if len(anyof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None of the " + "anyOf schemas matched the inputs." % + self.__class__.__name__ + ) + return anyof_instances + + +def get_discarded_args(self, composed_instances, model_args): + """ + Gathers the args that were discarded by configuration.discard_unknown_keys + """ + model_arg_keys = model_args.keys() + discarded_args = set() + # arguments passed to self were already converted to python names + # before __init__ was called + for instance in composed_instances: + if instance.__class__ in self._composed_schemas['allOf']: + try: + keys = instance.to_dict().keys() + discarded_keys = model_args - keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + else: + try: + all_keys = set(model_to_dict(instance, serialize=False).keys()) + js_keys = model_to_dict(instance, serialize=True).keys() + all_keys.update(js_keys) + discarded_keys = model_arg_keys - all_keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + return discarded_args + + +def validate_get_composed_info(constant_args, model_args, self): + """ + For composed schemas, generate schema instances for + all schemas in the oneOf/anyOf/allOf definition. If additional + properties are allowed, also assign those properties on + all matched schemas that contain additionalProperties. + Openapi schemas are python classes. + + Exceptions are raised if: + - 0 or > 1 oneOf schema matches the model_args input data + - no anyOf schema matches the model_args input data + - any of the allOf schemas do not match the model_args input data + + Args: + constant_args (dict): these are the args that every model requires + model_args (dict): these are the required and optional spec args that + were passed in to make this model + self (class): the class that we are instantiating + This class contains self._composed_schemas + + Returns: + composed_info (list): length three + composed_instances (list): the composed instances which are not + self + var_name_to_model_instances (dict): a dict going from var_name + to the model_instance which holds that var_name + the model_instance may be self or an instance of one of the + classes in self.composed_instances() + additional_properties_model_instances (list): a list of the + model instances which have the property + additional_properties_type. This list can include self + """ + # create composed_instances + composed_instances = [] + allof_instances = get_allof_instances(self, model_args, constant_args) + composed_instances.extend(allof_instances) + oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) + if oneof_instance is not None: + composed_instances.append(oneof_instance) + anyof_instances = get_anyof_instances(self, model_args, constant_args) + composed_instances.extend(anyof_instances) + """ + set additional_properties_model_instances + additional properties must be evaluated at the schema level + so self's additional properties are most important + If self is a composed schema with: + - no properties defined in self + - additionalProperties: False + Then for object payloads every property is an additional property + and they are not allowed, so only empty dict is allowed + + Properties must be set on all matching schemas + so when a property is assigned toa composed instance, it must be set on all + composed instances regardless of additionalProperties presence + keeping it to prevent breaking changes in v5.0.1 + TODO remove cls._additional_properties_model_instances in 6.0.0 + """ + additional_properties_model_instances = [] + if self.additional_properties_type is not None: + additional_properties_model_instances = [self] + + """ + no need to set properties on self in here, they will be set in __init__ + By here all composed schema oneOf/anyOf/allOf instances have their properties set using + model_args + """ + discarded_args = get_discarded_args(self, composed_instances, model_args) + + # map variable names to composed_instances + var_name_to_model_instances = {} + for prop_name in model_args: + if prop_name not in discarded_args: + var_name_to_model_instances[prop_name] = [self] + composed_instances + + return [ + composed_instances, + var_name_to_model_instances, + additional_properties_model_instances, + discarded_args + ] diff --git a/clients/python/lakefs_client/models/__init__.py b/clients/python/lakefs_client/models/__init__.py index 28ddb221de2..c7a1d03439c 100644 --- a/clients/python/lakefs_client/models/__init__.py +++ b/clients/python/lakefs_client/models/__init__.py @@ -1,12 +1,10 @@ -# coding: utf-8 - # flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from lakefs_client.model.pet import Pet +# from from lakefs_client.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) @@ -44,6 +42,7 @@ from lakefs_client.model.hook_run_list import HookRunList from lakefs_client.model.import_pagination import ImportPagination from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse +from lakefs_client.model.inline_object1 import InlineObject1 from lakefs_client.model.login_config import LoginConfig from lakefs_client.model.login_information import LoginInformation from lakefs_client.model.merge import Merge diff --git a/clients/python/lakefs_client/paths/__init__.py b/clients/python/lakefs_client/paths/__init__.py deleted file mode 100644 index 4f3a4e327f9..00000000000 --- a/clients/python/lakefs_client/paths/__init__.py +++ /dev/null @@ -1,74 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.apis.path_to_api import path_to_api - -import enum - - -class PathValues(str, enum.Enum): - SETUP_COMM_PREFS = "/setup_comm_prefs" - SETUP_LAKEFS = "/setup_lakefs" - USER = "/user" - AUTH_LOGIN = "/auth/login" - AUTH_PASSWORD = "/auth/password" - AUTH_PASSWORD_FORGOT = "/auth/password/forgot" - AUTH_CAPABILITIES = "/auth/capabilities" - AUTH_USERS = "/auth/users" - AUTH_USERS_USER_ID = "/auth/users/{userId}" - AUTH_GROUPS = "/auth/groups" - AUTH_GROUPS_GROUP_ID = "/auth/groups/{groupId}" - AUTH_POLICIES = "/auth/policies" - AUTH_POLICIES_POLICY_ID = "/auth/policies/{policyId}" - AUTH_GROUPS_GROUP_ID_MEMBERS = "/auth/groups/{groupId}/members" - AUTH_GROUPS_GROUP_ID_MEMBERS_USER_ID = "/auth/groups/{groupId}/members/{userId}" - AUTH_USERS_USER_ID_CREDENTIALS = "/auth/users/{userId}/credentials" - AUTH_USERS_USER_ID_CREDENTIALS_ACCESS_KEY_ID = "/auth/users/{userId}/credentials/{accessKeyId}" - AUTH_USERS_USER_ID_GROUPS = "/auth/users/{userId}/groups" - AUTH_USERS_USER_ID_POLICIES = "/auth/users/{userId}/policies" - AUTH_USERS_USER_ID_POLICIES_POLICY_ID = "/auth/users/{userId}/policies/{policyId}" - AUTH_GROUPS_GROUP_ID_POLICIES = "/auth/groups/{groupId}/policies" - AUTH_GROUPS_GROUP_ID_POLICIES_POLICY_ID = "/auth/groups/{groupId}/policies/{policyId}" - REPOSITORIES = "/repositories" - REPOSITORIES_REPOSITORY = "/repositories/{repository}" - REPOSITORIES_REPOSITORY_OTF_REFS_LEFT_REF_DIFF_RIGHT_REF = "/repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref}" - REPOSITORIES_REPOSITORY_REFS_DUMP = "/repositories/{repository}/refs/dump" - REPOSITORIES_REPOSITORY_REFS_RESTORE = "/repositories/{repository}/refs/restore" - REPOSITORIES_REPOSITORY_TAGS = "/repositories/{repository}/tags" - REPOSITORIES_REPOSITORY_TAGS_TAG = "/repositories/{repository}/tags/{tag}" - REPOSITORIES_REPOSITORY_BRANCHES = "/repositories/{repository}/branches" - REPOSITORIES_REPOSITORY_REFS_REF_COMMITS = "/repositories/{repository}/refs/{ref}/commits" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_COMMITS = "/repositories/{repository}/branches/{branch}/commits" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH = "/repositories/{repository}/branches/{branch}" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_REVERT = "/repositories/{repository}/branches/{branch}/revert" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_CHERRYPICK = "/repositories/{repository}/branches/{branch}/cherry-pick" - REPOSITORIES_REPOSITORY_REFS_SOURCE_REF_MERGE_DESTINATION_BRANCH = "/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_DIFF = "/repositories/{repository}/branches/{branch}/diff" - REPOSITORIES_REPOSITORY_REFS_LEFT_REF_DIFF_RIGHT_REF = "/repositories/{repository}/refs/{leftRef}/diff/{rightRef}" - REPOSITORIES_REPOSITORY_COMMITS_COMMIT_ID = "/repositories/{repository}/commits/{commitId}" - REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS = "/repositories/{repository}/refs/{ref}/objects" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_STAGING_BACKING = "/repositories/{repository}/branches/{branch}/staging/backing" - REPOSITORIES_REPOSITORY_BRANCHES_METARANGES = "/repositories/{repository}/branches/metaranges" - REPOSITORIES_REPOSITORY_BRANCHES_RANGES = "/repositories/{repository}/branches/ranges" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS = "/repositories/{repository}/branches/{branch}/objects" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_DELETE = "/repositories/{repository}/branches/{branch}/objects/delete" - REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_COPY = "/repositories/{repository}/branches/{branch}/objects/copy" - REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_STAT = "/repositories/{repository}/refs/{ref}/objects/stat" - REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_UNDERLYING_PROPERTIES = "/repositories/{repository}/refs/{ref}/objects/underlyingProperties" - REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_LS = "/repositories/{repository}/refs/{ref}/objects/ls" - REPOSITORIES_REPOSITORY_REFS_BRANCH_SYMLINK = "/repositories/{repository}/refs/{branch}/symlink" - REPOSITORIES_REPOSITORY_ACTIONS_RUNS = "/repositories/{repository}/actions/runs" - REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID = "/repositories/{repository}/actions/runs/{run_id}" - REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS = "/repositories/{repository}/actions/runs/{run_id}/hooks" - REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS_HOOK_RUN_ID_OUTPUT = "/repositories/{repository}/actions/runs/{run_id}/hooks/{hook_run_id}/output" - REPOSITORIES_REPOSITORY_METADATA_META_RANGE_META_RANGE = "/repositories/{repository}/metadata/meta_range/{meta_range}" - REPOSITORIES_REPOSITORY_METADATA_RANGE_RANGE = "/repositories/{repository}/metadata/range/{range}" - REPOSITORIES_REPOSITORY_GC_RULES = "/repositories/{repository}/gc/rules" - REPOSITORIES_REPOSITORY_GC_PREPARE_COMMITS = "/repositories/{repository}/gc/prepare_commits" - REPOSITORIES_REPOSITORY_GC_PREPARE_UNCOMMITED = "/repositories/{repository}/gc/prepare_uncommited" - REPOSITORIES_REPOSITORY_BRANCH_PROTECTION = "/repositories/{repository}/branch_protection" - HEALTHCHECK = "/healthcheck" - CONFIG_VERSION = "/config/version" - CONFIG_STORAGE = "/config/storage" - CONFIG_GARBAGECOLLECTION = "/config/garbage-collection" - TEMPLATES_TEMPLATE_LOCATION = "/templates/{template_location}" - STATISTICS = "/statistics" diff --git a/clients/python/lakefs_client/paths/auth_capabilities/__init__.py b/clients/python/lakefs_client/paths/auth_capabilities/__init__.py deleted file mode 100644 index 92a66bb73f0..00000000000 --- a/clients/python/lakefs_client/paths/auth_capabilities/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_capabilities import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_CAPABILITIES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_capabilities/get.py b/clients/python/lakefs_client/paths/auth_capabilities/get.py deleted file mode 100644 index 4ed6f13d1cf..00000000000 --- a/clients/python/lakefs_client/paths/auth_capabilities/get.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.auth_capabilities import AuthCapabilities - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AuthCapabilities - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_auth_capabilities_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_auth_capabilities_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_auth_capabilities_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_auth_capabilities_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list authentication capabilities supported - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetAuthCapabilities(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_auth_capabilities( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_auth_capabilities( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_auth_capabilities( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_auth_capabilities( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_auth_capabilities_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_auth_capabilities_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_capabilities/get.pyi b/clients/python/lakefs_client/paths/auth_capabilities/get.pyi deleted file mode 100644 index 89d22f183e2..00000000000 --- a/clients/python/lakefs_client/paths/auth_capabilities/get.pyi +++ /dev/null @@ -1,264 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.auth_capabilities import AuthCapabilities - -SchemaFor200ResponseBodyApplicationJson = AuthCapabilities - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_auth_capabilities_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_auth_capabilities_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_auth_capabilities_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_auth_capabilities_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list authentication capabilities supported - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetAuthCapabilities(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_auth_capabilities( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_auth_capabilities( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_auth_capabilities( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_auth_capabilities( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_auth_capabilities_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_auth_capabilities_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups/__init__.py b/clients/python/lakefs_client/paths/auth_groups/__init__.py deleted file mode 100644 index 723c7e6325d..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_groups import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_GROUPS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_groups/get.py b/clients/python/lakefs_client/paths/auth_groups/get.py deleted file mode 100644 index d102d59967c..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups/get.py +++ /dev/null @@ -1,379 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.group_list import GroupList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = GroupList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_groups_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list groups - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroups(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_groups( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_groups_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_groups_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups/get.pyi b/clients/python/lakefs_client/paths/auth_groups/get.pyi deleted file mode 100644 index 7836256e6ef..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups/get.pyi +++ /dev/null @@ -1,361 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.group_list import GroupList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = GroupList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_groups_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list groups - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroups(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_groups( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_groups_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_groups_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups/post.py b/clients/python/lakefs_client/paths/auth_groups/post.py deleted file mode 100644 index 963b7054644..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups/post.py +++ /dev/null @@ -1,413 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.group_creation import GroupCreation -from lakefs_client.model.error import Error -from lakefs_client.model.group import Group - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = GroupCreation - - -request_body_group_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = Group - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_group_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_group_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_group_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_group_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_group_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_group( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_group( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_group( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_group( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_group( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_group_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_group_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups/post.pyi b/clients/python/lakefs_client/paths/auth_groups/post.pyi deleted file mode 100644 index 4b6510cae6d..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups/post.pyi +++ /dev/null @@ -1,398 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.group_creation import GroupCreation -from lakefs_client.model.error import Error -from lakefs_client.model.group import Group - -# body param -SchemaForRequestBodyApplicationJson = GroupCreation - - -request_body_group_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor201ResponseBodyApplicationJson = Group - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_group_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_group_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_group_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_group_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_group_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_group( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_group( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_group( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_group( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_group( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_group_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_group_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id/__init__.py b/clients/python/lakefs_client/paths/auth_groups_group_id/__init__.py deleted file mode 100644 index 4e17ac912ca..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_groups_group_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_GROUPS_GROUP_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id/delete.py b/clients/python/lakefs_client/paths/auth_groups_group_id/delete.py deleted file mode 100644 index 415d68a3f40..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id/delete.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id/delete.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id/delete.pyi deleted file mode 100644 index d82bb8eb8e0..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id/delete.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id/get.py b/clients/python/lakefs_client/paths/auth_groups_group_id/get.py deleted file mode 100644 index 0d74847f631..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id/get.py +++ /dev/null @@ -1,372 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.group import Group - -from . import path - -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Group - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id/get.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id/get.pyi deleted file mode 100644 index d3e2a901fa4..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id/get.pyi +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.group import Group - -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Group - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members/__init__.py b/clients/python/lakefs_client/paths/auth_groups_group_id_members/__init__.py deleted file mode 100644 index 7b367b56f50..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_groups_group_id_members import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_GROUPS_GROUP_ID_MEMBERS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members/get.py b/clients/python/lakefs_client/paths/auth_groups_group_id_members/get.py deleted file mode 100644 index c745c306498..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members/get.py +++ /dev/null @@ -1,433 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.user_list import UserList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = UserList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_group_members_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_group_members_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_group_members_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_group_members_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list group members - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroupMembers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_group_members( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_group_members( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_group_members( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_group_members( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_members_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_members_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members/get.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id_members/get.pyi deleted file mode 100644 index f4b8e1e01aa..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members/get.pyi +++ /dev/null @@ -1,415 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.user_list import UserList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = UserList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_group_members_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_group_members_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_group_members_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_group_members_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list group members - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroupMembers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_group_members( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_group_members( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_group_members( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_group_members( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_members_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_members_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/__init__.py b/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/__init__.py deleted file mode 100644 index a986d92587a..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_groups_group_id_members_user_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_GROUPS_GROUP_ID_MEMBERS_USER_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.py b/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.py deleted file mode 100644 index df17bd82293..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -GroupIdSchema = schemas.StrSchema -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_group_membership_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete group membership - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteGroupMembership(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_group_membership( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.pyi deleted file mode 100644 index e86ad6fd6e6..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/delete.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -GroupIdSchema = schemas.StrSchema -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_group_membership_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete group membership - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteGroupMembership(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_group_membership( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.py b/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.py deleted file mode 100644 index 031367d9415..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -GroupIdSchema = schemas.StrSchema -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_group_membership_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - add group membership - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddGroupMembership(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_group_membership( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.pyi deleted file mode 100644 index f3a6ba0d56f..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_members_user_id/put.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -GroupIdSchema = schemas.StrSchema -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _add_group_membership_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_group_membership_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - add group membership - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddGroupMembership(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def add_group_membership( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_group_membership( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_group_membership_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies/__init__.py b/clients/python/lakefs_client/paths/auth_groups_group_id_policies/__init__.py deleted file mode 100644 index 388b20b44ac..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_groups_group_id_policies import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_GROUPS_GROUP_ID_POLICIES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.py b/clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.py deleted file mode 100644 index 9d4c11486ac..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = PolicyList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_group_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_group_policies_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_group_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_group_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list group policies - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroupPolicies(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_group_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_group_policies( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_group_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_group_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.pyi deleted file mode 100644 index 5ccee37663d..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies/get.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -GroupIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = PolicyList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_group_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_group_policies_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_group_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_group_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list group policies - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListGroupPolicies(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_group_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_group_policies( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_group_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_group_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_group_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/__init__.py b/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/__init__.py deleted file mode 100644 index 4c6437db0d4..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_groups_group_id_policies_policy_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_GROUPS_GROUP_ID_POLICIES_POLICY_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.py b/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.py deleted file mode 100644 index 7d73c38ede8..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -GroupIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _detach_policy_from_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _detach_policy_from_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _detach_policy_from_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _detach_policy_from_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - detach policy from group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DetachPolicyFromGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def detach_policy_from_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def detach_policy_from_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def detach_policy_from_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def detach_policy_from_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.pyi deleted file mode 100644 index f3c65cbbb38..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/delete.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -GroupIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _detach_policy_from_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _detach_policy_from_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _detach_policy_from_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _detach_policy_from_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - detach policy from group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DetachPolicyFromGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def detach_policy_from_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def detach_policy_from_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def detach_policy_from_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def detach_policy_from_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.py b/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.py deleted file mode 100644 index 4c96349f832..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -GroupIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _attach_policy_to_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _attach_policy_to_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _attach_policy_to_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _attach_policy_to_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - attach policy to group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AttachPolicyToGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def attach_policy_to_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def attach_policy_to_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def attach_policy_to_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def attach_policy_to_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.pyi b/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.pyi deleted file mode 100644 index 981598ab09a..00000000000 --- a/clients/python/lakefs_client/paths/auth_groups_group_id_policies_policy_id/put.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -GroupIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'groupId': typing.Union[GroupIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_group_id = api_client.PathParameter( - name="groupId", - style=api_client.ParameterStyle.SIMPLE, - schema=GroupIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _attach_policy_to_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _attach_policy_to_group_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _attach_policy_to_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _attach_policy_to_group_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - attach policy to group - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_group_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AttachPolicyToGroup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def attach_policy_to_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def attach_policy_to_group( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def attach_policy_to_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def attach_policy_to_group( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_group_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_login/__init__.py b/clients/python/lakefs_client/paths/auth_login/__init__.py deleted file mode 100644 index 2384446bdb3..00000000000 --- a/clients/python/lakefs_client/paths/auth_login/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_login import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_LOGIN \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_login/post.py b/clients/python/lakefs_client/paths/auth_login/post.py deleted file mode 100644 index 37d69a051a5..00000000000 --- a/clients/python/lakefs_client/paths/auth_login/post.py +++ /dev/null @@ -1,400 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.authentication_token import AuthenticationToken -from lakefs_client.model.login_information import LoginInformation -from lakefs_client.model.error import Error - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = LoginInformation - - -request_body_login_information = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SetCookieSchema = schemas.StrSchema -set_cookie_parameter = api_client.HeaderParameter( - name="Set-Cookie", - style=api_client.ParameterStyle.SIMPLE, - schema=SetCookieSchema, -) -SchemaFor200ResponseBodyApplicationJson = AuthenticationToken -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Set-Cookie': SetCookieSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - set_cookie_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _login_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _login_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _login_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _login_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _login_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - perform a login - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_login_information.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Login(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def login( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def login( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def login( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def login( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def login( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_login/post.pyi b/clients/python/lakefs_client/paths/auth_login/post.pyi deleted file mode 100644 index c498e85a5c6..00000000000 --- a/clients/python/lakefs_client/paths/auth_login/post.pyi +++ /dev/null @@ -1,388 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.authentication_token import AuthenticationToken -from lakefs_client.model.login_information import LoginInformation -from lakefs_client.model.error import Error - -# body param -SchemaForRequestBodyApplicationJson = LoginInformation - - -request_body_login_information = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SetCookieSchema = schemas.StrSchema -SchemaFor200ResponseBodyApplicationJson = AuthenticationToken -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Set-Cookie': SetCookieSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - set_cookie_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _login_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _login_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _login_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _login_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _login_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - perform a login - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_login_information.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Login(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def login( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def login( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def login( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def login( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def login( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_password/__init__.py b/clients/python/lakefs_client/paths/auth_password/__init__.py deleted file mode 100644 index a0e3c6b3cee..00000000000 --- a/clients/python/lakefs_client/paths/auth_password/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_password import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_PASSWORD \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_password/post.py b/clients/python/lakefs_client/paths/auth_password/post.py deleted file mode 100644 index ef93edcbc82..00000000000 --- a/clients/python/lakefs_client/paths/auth_password/post.py +++ /dev/null @@ -1,384 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.update_password_by_token import UpdatePasswordByToken -from lakefs_client.model.error import Error - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = UpdatePasswordByToken - - -request_body_update_password_by_token = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'cookie_auth', -] - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update user password by reset_password token - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_update_password_by_token.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePassword(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_password/post.pyi b/clients/python/lakefs_client/paths/auth_password/post.pyi deleted file mode 100644 index 1f8ca52d112..00000000000 --- a/clients/python/lakefs_client/paths/auth_password/post.pyi +++ /dev/null @@ -1,374 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.update_password_by_token import UpdatePasswordByToken -from lakefs_client.model.error import Error - -# body param -SchemaForRequestBodyApplicationJson = UpdatePasswordByToken - - -request_body_update_password_by_token = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update user password by reset_password token - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_update_password_by_token.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePassword(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_password_forgot/__init__.py b/clients/python/lakefs_client/paths/auth_password_forgot/__init__.py deleted file mode 100644 index f4034f37fdd..00000000000 --- a/clients/python/lakefs_client/paths/auth_password_forgot/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_password_forgot import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_PASSWORD_FORGOT \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_password_forgot/post.py b/clients/python/lakefs_client/paths/auth_password_forgot/post.py deleted file mode 100644 index eb18751ba04..00000000000 --- a/clients/python/lakefs_client/paths/auth_password_forgot/post.py +++ /dev/null @@ -1,380 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.forgot_password_request import ForgotPasswordRequest -from lakefs_client.model.error import Error - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ForgotPasswordRequest - - -request_body_forgot_password_request = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '400': _response_for_400, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - forgot password request initiates the password reset process - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_forgot_password_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ForgotPassword(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._forgot_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._forgot_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_password_forgot/post.pyi b/clients/python/lakefs_client/paths/auth_password_forgot/post.pyi deleted file mode 100644 index 22f9f06989f..00000000000 --- a/clients/python/lakefs_client/paths/auth_password_forgot/post.pyi +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.forgot_password_request import ForgotPasswordRequest -from lakefs_client.model.error import Error - -# body param -SchemaForRequestBodyApplicationJson = ForgotPasswordRequest - - -request_body_forgot_password_request = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _forgot_password_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - forgot password request initiates the password reset process - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_forgot_password_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ForgotPassword(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def forgot_password( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._forgot_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._forgot_password_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies/__init__.py b/clients/python/lakefs_client/paths/auth_policies/__init__.py deleted file mode 100644 index 06acbb9e731..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_policies import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_POLICIES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_policies/get.py b/clients/python/lakefs_client/paths/auth_policies/get.py deleted file mode 100644 index 61741097e36..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies/get.py +++ /dev/null @@ -1,379 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = PolicyList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_policies_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list policies - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListPolicies(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_policies( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_policies_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_policies_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies/get.pyi b/clients/python/lakefs_client/paths/auth_policies/get.pyi deleted file mode 100644 index 97026f0e2a1..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies/get.pyi +++ /dev/null @@ -1,361 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = PolicyList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_policies_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list policies - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListPolicies(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_policies( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_policies_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_policies_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies/post.py b/clients/python/lakefs_client/paths/auth_policies/post.py deleted file mode 100644 index 07d25c01f1e..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies/post.py +++ /dev/null @@ -1,435 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Policy - - -request_body_policy = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = Policy - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_policy.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreatePolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_policy_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_policy_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies/post.pyi b/clients/python/lakefs_client/paths/auth_policies/post.pyi deleted file mode 100644 index bbfe81cb8ff..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies/post.pyi +++ /dev/null @@ -1,419 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error - -# body param -SchemaForRequestBodyApplicationJson = Policy - - -request_body_policy = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = Policy - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_policy.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreatePolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_policy_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_policy_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies_policy_id/__init__.py b/clients/python/lakefs_client/paths/auth_policies_policy_id/__init__.py deleted file mode 100644 index c46763c1d2f..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies_policy_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_policies_policy_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_POLICIES_POLICY_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_policies_policy_id/delete.py b/clients/python/lakefs_client/paths/auth_policies_policy_id/delete.py deleted file mode 100644 index b20daba1eb3..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies_policy_id/delete.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_policy_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeletePolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_policy( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies_policy_id/delete.pyi b/clients/python/lakefs_client/paths/auth_policies_policy_id/delete.pyi deleted file mode 100644 index dca20b9d0f0..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies_policy_id/delete.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_policy_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeletePolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_policy( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies_policy_id/get.py b/clients/python/lakefs_client/paths/auth_policies_policy_id/get.py deleted file mode 100644 index 971c81253db..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies_policy_id/get.py +++ /dev/null @@ -1,372 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error - -from . import path - -# Path params -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Policy - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_policy_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetPolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_policy( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies_policy_id/get.pyi b/clients/python/lakefs_client/paths/auth_policies_policy_id/get.pyi deleted file mode 100644 index 4d21350e237..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies_policy_id/get.pyi +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error - -# Path params -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Policy - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_policy_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_policy_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetPolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_policy( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_policy( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_policy_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies_policy_id/put.py b/clients/python/lakefs_client/paths/auth_policies_policy_id/put.py deleted file mode 100644 index 7e6860f925b..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies_policy_id/put.py +++ /dev/null @@ -1,492 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error - -from . import path - -# Path params -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = Policy - - -request_body_policy = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Policy - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - update policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_policy.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_policy_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_policy_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_policies_policy_id/put.pyi b/clients/python/lakefs_client/paths/auth_policies_policy_id/put.pyi deleted file mode 100644 index c4d3de3213f..00000000000 --- a/clients/python/lakefs_client/paths/auth_policies_policy_id/put.pyi +++ /dev/null @@ -1,476 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy import Policy -from lakefs_client.model.error import Error - -# Path params -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = Policy - - -request_body_policy = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Policy - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_policy_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - update policy - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_policy.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePolicy(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_policy( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_policy_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_policy_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users/__init__.py b/clients/python/lakefs_client/paths/auth_users/__init__.py deleted file mode 100644 index 1bd21a6989a..00000000000 --- a/clients/python/lakefs_client/paths/auth_users/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_users import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_USERS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_users/get.py b/clients/python/lakefs_client/paths/auth_users/get.py deleted file mode 100644 index 27f687a6993..00000000000 --- a/clients/python/lakefs_client/paths/auth_users/get.py +++ /dev/null @@ -1,379 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.user_list import UserList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = UserList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list users - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users/get.pyi b/clients/python/lakefs_client/paths/auth_users/get.pyi deleted file mode 100644 index f5e51b730ab..00000000000 --- a/clients/python/lakefs_client/paths/auth_users/get.pyi +++ /dev/null @@ -1,361 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.user_list import UserList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = UserList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_users_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list users - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_users( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_users( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_users_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users/post.py b/clients/python/lakefs_client/paths/auth_users/post.py deleted file mode 100644 index c9e14818e97..00000000000 --- a/clients/python/lakefs_client/paths/auth_users/post.py +++ /dev/null @@ -1,433 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.user import User -from lakefs_client.model.user_creation import UserCreation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = UserCreation - - -request_body_user_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = User - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_user_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_user_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_user_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_user( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_user( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_user( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users/post.pyi b/clients/python/lakefs_client/paths/auth_users/post.pyi deleted file mode 100644 index d8301f14aa9..00000000000 --- a/clients/python/lakefs_client/paths/auth_users/post.pyi +++ /dev/null @@ -1,417 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.user import User -from lakefs_client.model.user_creation import UserCreation - -# body param -SchemaForRequestBodyApplicationJson = UserCreation - - -request_body_user_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor201ResponseBodyApplicationJson = User - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_user_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_user_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_user_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_user( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_user( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_user( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id/__init__.py b/clients/python/lakefs_client/paths/auth_users_user_id/__init__.py deleted file mode 100644 index ea754f0d682..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_users_user_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_USERS_USER_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_users_user_id/delete.py b/clients/python/lakefs_client/paths/auth_users_user_id/delete.py deleted file mode 100644 index ac311c68bba..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id/delete.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id/delete.pyi b/clients/python/lakefs_client/paths/auth_users_user_id/delete.pyi deleted file mode 100644 index 436f3616193..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id/delete.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id/get.py b/clients/python/lakefs_client/paths/auth_users_user_id/get.py deleted file mode 100644 index 29e7059b4bf..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id/get.py +++ /dev/null @@ -1,372 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.user import User - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = User - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id/get.pyi b/clients/python/lakefs_client/paths/auth_users_user_id/get.pyi deleted file mode 100644 index f0ad43e30d4..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id/get.pyi +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.user import User - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = User - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/__init__.py b/clients/python/lakefs_client/paths/auth_users_user_id_credentials/__init__.py deleted file mode 100644 index fcbce269249..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_users_user_id_credentials import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_USERS_USER_ID_CREDENTIALS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.py b/clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.py deleted file mode 100644 index c90059dea2d..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.credentials_list import CredentialsList - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = CredentialsList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_user_credentials_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_user_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_user_credentials_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_user_credentials_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list user credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUserCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_user_credentials( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_user_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_user_credentials( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_user_credentials( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_credentials_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_credentials_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.pyi deleted file mode 100644 index 7d42e2f6f31..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/get.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.credentials_list import CredentialsList - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = CredentialsList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_user_credentials_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_user_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_user_credentials_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_user_credentials_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list user credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUserCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_user_credentials( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_user_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_user_credentials( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_user_credentials( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_credentials_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_credentials_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.py b/clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.py deleted file mode 100644 index 18734762b38..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.py +++ /dev/null @@ -1,372 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.credentials_with_secret import CredentialsWithSecret -from lakefs_client.model.error import Error - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = CredentialsWithSecret - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.pyi deleted file mode 100644 index 0e7a1cc3499..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials/post.pyi +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.credentials_with_secret import CredentialsWithSecret -from lakefs_client.model.error import Error - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = CredentialsWithSecret - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/__init__.py b/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/__init__.py deleted file mode 100644 index c953d134de8..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_users_user_id_credentials_access_key_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_USERS_USER_ID_CREDENTIALS_ACCESS_KEY_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.py b/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.py deleted file mode 100644 index 05ea7d660a0..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_access_key_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.pyi deleted file mode 100644 index 27271b42f33..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/delete.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -UserIdSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_access_key_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.py b/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.py deleted file mode 100644 index d4c5eac38e6..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.credentials import Credentials -from lakefs_client.model.error import Error - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Credentials - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_access_key_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.pyi deleted file mode 100644 index 8cd09dac708..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_credentials_access_key_id/get.pyi +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.credentials import Credentials -from lakefs_client.model.error import Error - -# Path params -UserIdSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Credentials - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_credentials_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_credentials_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get credentials - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_access_key_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCredentials(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_credentials( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_credentials( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_credentials_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_groups/__init__.py b/clients/python/lakefs_client/paths/auth_users_user_id_groups/__init__.py deleted file mode 100644 index 0c2e4fd9cd6..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_groups/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_users_user_id_groups import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_USERS_USER_ID_GROUPS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_groups/get.py b/clients/python/lakefs_client/paths/auth_users_user_id_groups/get.py deleted file mode 100644 index 3c144236bf6..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_groups/get.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.group_list import GroupList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = GroupList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_user_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_user_groups_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_user_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_user_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list user groups - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUserGroups(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_user_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_user_groups( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_user_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_user_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_groups_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_groups_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_groups/get.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_groups/get.pyi deleted file mode 100644 index 1145a9dda65..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_groups/get.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.group_list import GroupList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = GroupList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_user_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_user_groups_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_user_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_user_groups_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list user groups - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUserGroups(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_user_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_user_groups( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_user_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_user_groups( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_groups_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_groups_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies/__init__.py b/clients/python/lakefs_client/paths/auth_users_user_id_policies/__init__.py deleted file mode 100644 index 49e5e7afaa0..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_users_user_id_policies import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_USERS_USER_ID_POLICIES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies/get.py b/clients/python/lakefs_client/paths/auth_users_user_id_policies/get.py deleted file mode 100644 index cb822093749..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies/get.py +++ /dev/null @@ -1,462 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -EffectiveSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'effective': typing.Union[EffectiveSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_effective = api_client.QueryParameter( - name="effective", - style=api_client.ParameterStyle.FORM, - schema=EffectiveSchema, - explode=True, -) -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = PolicyList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_user_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_user_policies_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_user_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_user_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list user policies - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - request_query_effective, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUserPolicies(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_user_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_user_policies( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_user_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_user_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies/get.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_policies/get.pyi deleted file mode 100644 index aa04d8a34fc..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies/get.pyi +++ /dev/null @@ -1,443 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.policy_list import PolicyList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -EffectiveSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'effective': typing.Union[EffectiveSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_effective = api_client.QueryParameter( - name="effective", - style=api_client.ParameterStyle.FORM, - schema=EffectiveSchema, - explode=True, -) -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = PolicyList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_user_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_user_policies_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_user_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_user_policies_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list user policies - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - request_query_effective, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListUserPolicies(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_user_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_user_policies( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_user_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_user_policies( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_user_policies_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/__init__.py b/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/__init__.py deleted file mode 100644 index f51a4ffe9c3..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.auth_users_user_id_policies_policy_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.AUTH_USERS_USER_ID_POLICIES_POLICY_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.py b/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.py deleted file mode 100644 index e4ea4fe2e43..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _detach_policy_from_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _detach_policy_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _detach_policy_from_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _detach_policy_from_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - detach policy from user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DetachPolicyFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def detach_policy_from_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def detach_policy_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def detach_policy_from_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def detach_policy_from_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.pyi deleted file mode 100644 index ce8681b4538..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/delete.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -UserIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _detach_policy_from_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _detach_policy_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _detach_policy_from_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _detach_policy_from_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - detach policy from user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DetachPolicyFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def detach_policy_from_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def detach_policy_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def detach_policy_from_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def detach_policy_from_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._detach_policy_from_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.py b/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.py deleted file mode 100644 index b6daae35bc8..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _attach_policy_to_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _attach_policy_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _attach_policy_to_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _attach_policy_to_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - attach policy to user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AttachPolicyToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def attach_policy_to_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def attach_policy_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def attach_policy_to_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def attach_policy_to_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.pyi b/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.pyi deleted file mode 100644 index 9da68b3d5e3..00000000000 --- a/clients/python/lakefs_client/paths/auth_users_user_id_policies_policy_id/put.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -UserIdSchema = schemas.StrSchema -PolicyIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'policyId': typing.Union[PolicyIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -request_path_policy_id = api_client.PathParameter( - name="policyId", - style=api_client.ParameterStyle.SIMPLE, - schema=PolicyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _attach_policy_to_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _attach_policy_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _attach_policy_to_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _attach_policy_to_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - attach policy to user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_user_id, - request_path_policy_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AttachPolicyToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def attach_policy_to_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def attach_policy_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def attach_policy_to_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def attach_policy_to_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._attach_policy_to_user_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/config_garbage_collection/__init__.py b/clients/python/lakefs_client/paths/config_garbage_collection/__init__.py deleted file mode 100644 index 9175325407e..00000000000 --- a/clients/python/lakefs_client/paths/config_garbage_collection/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.config_garbage_collection import Api - -from lakefs_client.paths import PathValues - -path = PathValues.CONFIG_GARBAGECOLLECTION \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/config_garbage_collection/get.py b/clients/python/lakefs_client/paths/config_garbage_collection/get.py deleted file mode 100644 index 3e13373f9ac..00000000000 --- a/clients/python/lakefs_client/paths/config_garbage_collection/get.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig -from lakefs_client.model.error import Error - -from . import path - -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = GarbageCollectionConfig - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_garbage_collection_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_garbage_collection_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_garbage_collection_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_garbage_collection_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGarbageCollectionConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_garbage_collection_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_garbage_collection_config( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_garbage_collection_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_garbage_collection_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/config_garbage_collection/get.pyi b/clients/python/lakefs_client/paths/config_garbage_collection/get.pyi deleted file mode 100644 index dd8584a11eb..00000000000 --- a/clients/python/lakefs_client/paths/config_garbage_collection/get.pyi +++ /dev/null @@ -1,254 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig -from lakefs_client.model.error import Error - -SchemaFor200ResponseBodyApplicationJson = GarbageCollectionConfig - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_garbage_collection_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_garbage_collection_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_garbage_collection_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_garbage_collection_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGarbageCollectionConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_garbage_collection_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_garbage_collection_config( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_garbage_collection_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_garbage_collection_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/config_storage/__init__.py b/clients/python/lakefs_client/paths/config_storage/__init__.py deleted file mode 100644 index 2586604e9bc..00000000000 --- a/clients/python/lakefs_client/paths/config_storage/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.config_storage import Api - -from lakefs_client.paths import PathValues - -path = PathValues.CONFIG_STORAGE \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/config_storage/get.py b/clients/python/lakefs_client/paths/config_storage/get.py deleted file mode 100644 index c10e0fa9722..00000000000 --- a/clients/python/lakefs_client/paths/config_storage/get.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_config import StorageConfig - -from . import path - -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = StorageConfig - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_storage_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_storage_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_storage_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_storage_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetStorageConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_storage_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_storage_config( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_storage_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_storage_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_storage_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_storage_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/config_storage/get.pyi b/clients/python/lakefs_client/paths/config_storage/get.pyi deleted file mode 100644 index e5661ada60c..00000000000 --- a/clients/python/lakefs_client/paths/config_storage/get.pyi +++ /dev/null @@ -1,254 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_config import StorageConfig - -SchemaFor200ResponseBodyApplicationJson = StorageConfig - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_storage_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_storage_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_storage_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_storage_config_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetStorageConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_storage_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_storage_config( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_storage_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_storage_config( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_storage_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_storage_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/config_version/__init__.py b/clients/python/lakefs_client/paths/config_version/__init__.py deleted file mode 100644 index abb4db3a7f4..00000000000 --- a/clients/python/lakefs_client/paths/config_version/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.config_version import Api - -from lakefs_client.paths import PathValues - -path = PathValues.CONFIG_VERSION \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/config_version/get.py b/clients/python/lakefs_client/paths/config_version/get.py deleted file mode 100644 index e77dc7d04d8..00000000000 --- a/clients/python/lakefs_client/paths/config_version/get.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.version_config import VersionConfig -from lakefs_client.model.error import Error - -from . import path - -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = VersionConfig - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_lake_fs_version_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_lake_fs_version_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_lake_fs_version_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_lake_fs_version_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetLakeFsVersion(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_lake_fs_version( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_lake_fs_version( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_lake_fs_version( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_lake_fs_version( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_lake_fs_version_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_lake_fs_version_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/config_version/get.pyi b/clients/python/lakefs_client/paths/config_version/get.pyi deleted file mode 100644 index 562bae24561..00000000000 --- a/clients/python/lakefs_client/paths/config_version/get.pyi +++ /dev/null @@ -1,254 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.version_config import VersionConfig -from lakefs_client.model.error import Error - -SchemaFor200ResponseBodyApplicationJson = VersionConfig - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_lake_fs_version_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_lake_fs_version_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_lake_fs_version_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_lake_fs_version_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetLakeFsVersion(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_lake_fs_version( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_lake_fs_version( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_lake_fs_version( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_lake_fs_version( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_lake_fs_version_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_lake_fs_version_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/healthcheck/__init__.py b/clients/python/lakefs_client/paths/healthcheck/__init__.py deleted file mode 100644 index 5976fc40379..00000000000 --- a/clients/python/lakefs_client/paths/healthcheck/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.healthcheck import Api - -from lakefs_client.paths import PathValues - -path = PathValues.HEALTHCHECK \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/healthcheck/get.py b/clients/python/lakefs_client/paths/healthcheck/get.py deleted file mode 100644 index 056a37a6149..00000000000 --- a/clients/python/lakefs_client/paths/healthcheck/get.py +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from . import path - - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -_status_code_to_response = { - '204': _response_for_204, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _health_check_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ]: ... - - @typing.overload - def _health_check_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _health_check_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _health_check_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class HealthCheck(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def health_check( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ]: ... - - @typing.overload - def health_check( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def health_check( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def health_check( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._health_check_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._health_check_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/healthcheck/get.pyi b/clients/python/lakefs_client/paths/healthcheck/get.pyi deleted file mode 100644 index ad7091f9312..00000000000 --- a/clients/python/lakefs_client/paths/healthcheck/get.pyi +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _health_check_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ]: ... - - @typing.overload - def _health_check_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _health_check_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _health_check_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class HealthCheck(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def health_check( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ]: ... - - @typing.overload - def health_check( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def health_check( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def health_check( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._health_check_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._health_check_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories/__init__.py b/clients/python/lakefs_client/paths/repositories/__init__.py deleted file mode 100644 index 6324105af98..00000000000 --- a/clients/python/lakefs_client/paths/repositories/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories/get.py b/clients/python/lakefs_client/paths/repositories/get.py deleted file mode 100644 index ddac289feaf..00000000000 --- a/clients/python/lakefs_client/paths/repositories/get.py +++ /dev/null @@ -1,379 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.repository_list import RepositoryList -from lakefs_client.model.error import Error - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = RepositoryList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_repositories_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_repositories_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_repositories_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_repositories_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list repositories - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListRepositories(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_repositories( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_repositories( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_repositories( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_repositories( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repositories_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repositories_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories/get.pyi b/clients/python/lakefs_client/paths/repositories/get.pyi deleted file mode 100644 index 675b0432c27..00000000000 --- a/clients/python/lakefs_client/paths/repositories/get.pyi +++ /dev/null @@ -1,361 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.repository_list import RepositoryList -from lakefs_client.model.error import Error - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = RepositoryList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_repositories_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_repositories_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_repositories_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_repositories_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list repositories - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListRepositories(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_repositories( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_repositories( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_repositories( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_repositories( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repositories_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repositories_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories/post.py b/clients/python/lakefs_client/paths/repositories/post.py deleted file mode 100644 index ddfeea1fd9a..00000000000 --- a/clients/python/lakefs_client/paths/repositories/post.py +++ /dev/null @@ -1,493 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.repository import Repository -from lakefs_client.model.error import Error -from lakefs_client.model.repository_creation import RepositoryCreation - -from . import path - -# Query params -BareSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'bare': typing.Union[BareSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_bare = api_client.QueryParameter( - name="bare", - style=api_client.ParameterStyle.FORM, - schema=BareSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = RepositoryCreation - - -request_body_repository_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = Repository - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create repository - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_bare, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_repository_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateRepository(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_repository_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_repository_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories/post.pyi b/clients/python/lakefs_client/paths/repositories/post.pyi deleted file mode 100644 index 07c2327568d..00000000000 --- a/clients/python/lakefs_client/paths/repositories/post.pyi +++ /dev/null @@ -1,477 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.repository import Repository -from lakefs_client.model.error import Error -from lakefs_client.model.repository_creation import RepositoryCreation - -# Query params -BareSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'bare': typing.Union[BareSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_bare = api_client.QueryParameter( - name="bare", - style=api_client.ParameterStyle.FORM, - schema=BareSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = RepositoryCreation - - -request_body_repository_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = Repository - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_repository_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create repository - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_bare, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_repository_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateRepository(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_repository( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_repository_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_repository_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository/__init__.py b/clients/python/lakefs_client/paths/repositories_repository/__init__.py deleted file mode 100644 index 48e026f5da4..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository/delete.py b/clients/python/lakefs_client/paths/repositories_repository/delete.py deleted file mode 100644 index ab31b4c8d62..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository/delete.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_repository_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete repository - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteRepository(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_repository( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository/delete.pyi b/clients/python/lakefs_client/paths/repositories_repository/delete.pyi deleted file mode 100644 index 5a961b21ccd..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository/delete.pyi +++ /dev/null @@ -1,349 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_repository_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete repository - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteRepository(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_repository( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository/get.py b/clients/python/lakefs_client/paths/repositories_repository/get.py deleted file mode 100644 index 87393c26796..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository/get.py +++ /dev/null @@ -1,372 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.repository import Repository -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Repository - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_repository_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get repository - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRepository(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_repository( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository/get.pyi b/clients/python/lakefs_client/paths/repositories_repository/get.pyi deleted file mode 100644 index 52ae41f1514..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository/get.pyi +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.repository import Repository -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Repository - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_repository_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_repository_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get repository - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRepository(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_repository( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_repository( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_repository_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs/__init__.py deleted file mode 100644 index 1e072824c07..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_actions_runs import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.py deleted file mode 100644 index 27fffc271e3..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.py +++ /dev/null @@ -1,462 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.action_run_list import ActionRunList -from lakefs_client.model.error import Error - -from . import path - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -BranchSchema = schemas.StrSchema -CommitSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'branch': typing.Union[BranchSchema, str, ], - 'commit': typing.Union[CommitSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_branch = api_client.QueryParameter( - name="branch", - style=api_client.ParameterStyle.FORM, - schema=BranchSchema, - explode=True, -) -request_query_commit = api_client.QueryParameter( - name="commit", - style=api_client.ParameterStyle.FORM, - schema=CommitSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = ActionRunList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_repository_runs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_repository_runs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_repository_runs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_repository_runs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list runs - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_branch, - request_query_commit, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListRepositoryRuns(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_repository_runs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_repository_runs( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_repository_runs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_repository_runs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repository_runs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repository_runs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.pyi deleted file mode 100644 index e90c475e881..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs/get.pyi +++ /dev/null @@ -1,443 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.action_run_list import ActionRunList -from lakefs_client.model.error import Error - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -BranchSchema = schemas.StrSchema -CommitSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'branch': typing.Union[BranchSchema, str, ], - 'commit': typing.Union[CommitSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_branch = api_client.QueryParameter( - name="branch", - style=api_client.ParameterStyle.FORM, - schema=BranchSchema, - explode=True, -) -request_query_commit = api_client.QueryParameter( - name="commit", - style=api_client.ParameterStyle.FORM, - schema=CommitSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ActionRunList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_repository_runs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_repository_runs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_repository_runs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_repository_runs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list runs - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_branch, - request_query_commit, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListRepositoryRuns(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_repository_runs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_repository_runs( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_repository_runs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_repository_runs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repository_runs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_repository_runs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/__init__.py deleted file mode 100644 index 7e228972b1c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_actions_runs_run_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.py deleted file mode 100644 index 0f470d62246..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.action_run import ActionRun -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RunIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'run_id': typing.Union[RunIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_run_id = api_client.PathParameter( - name="run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=RunIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = ActionRun - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_run_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_run_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_run_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_run_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get a run - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_run_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRun(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_run( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_run( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_run( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_run( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.pyi deleted file mode 100644 index 78ab74df55c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id/get.pyi +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.action_run import ActionRun -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RunIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'run_id': typing.Union[RunIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_run_id = api_client.PathParameter( - name="run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=RunIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ActionRun - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_run_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_run_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_run_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_run_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get a run - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_run_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRun(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_run( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_run( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_run( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_run( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/__init__.py deleted file mode 100644 index 4ed2f837b11..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.py deleted file mode 100644 index 057331a7a80..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.hook_run_list import HookRunList - -from . import path - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RunIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'run_id': typing.Union[RunIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_run_id = api_client.PathParameter( - name="run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=RunIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = HookRunList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_run_hooks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_run_hooks_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_run_hooks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_run_hooks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list run hooks - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_run_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListRunHooks(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_run_hooks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_run_hooks( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_run_hooks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_run_hooks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_run_hooks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_run_hooks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.pyi deleted file mode 100644 index 65a04f0abf9..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks/get.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.hook_run_list import HookRunList - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RunIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'run_id': typing.Union[RunIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_run_id = api_client.PathParameter( - name="run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=RunIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = HookRunList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_run_hooks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_run_hooks_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_run_hooks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_run_hooks_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list run hooks - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_run_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListRunHooks(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_run_hooks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_run_hooks( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_run_hooks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_run_hooks( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_run_hooks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_run_hooks_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/__init__.py deleted file mode 100644 index aec7eaae47c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks_hook_run_id_output import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_ACTIONS_RUNS_RUN_ID_HOOKS_HOOK_RUN_ID_OUTPUT \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.py b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.py deleted file mode 100644 index 6ccf0898e3e..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.py +++ /dev/null @@ -1,390 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RunIdSchema = schemas.StrSchema -HookRunIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'run_id': typing.Union[RunIdSchema, str, ], - 'hook_run_id': typing.Union[HookRunIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_run_id = api_client.PathParameter( - name="run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=RunIdSchema, - required=True, -) -request_path_hook_run_id = api_client.PathParameter( - name="hook_run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=HookRunIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/octet-stream', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_run_hook_output_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_run_hook_output_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_run_hook_output_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_run_hook_output_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get run hook output - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_run_id, - request_path_hook_run_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRunHookOutput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_run_hook_output( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_run_hook_output( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_run_hook_output( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_run_hook_output( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_hook_output_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_hook_output_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.pyi deleted file mode 100644 index 4bf0a527bf1..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/get.pyi +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RunIdSchema = schemas.StrSchema -HookRunIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'run_id': typing.Union[RunIdSchema, str, ], - 'hook_run_id': typing.Union[HookRunIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_run_id = api_client.PathParameter( - name="run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=RunIdSchema, - required=True, -) -request_path_hook_run_id = api_client.PathParameter( - name="hook_run_id", - style=api_client.ParameterStyle.SIMPLE, - schema=HookRunIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/octet-stream', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_run_hook_output_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_run_hook_output_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_run_hook_output_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_run_hook_output_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get run hook output - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_run_id, - request_path_hook_run_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRunHookOutput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_run_hook_output( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_run_hook_output( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_run_hook_output( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_run_hook_output( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_hook_output_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_run_hook_output_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branch_protection/__init__.py deleted file mode 100644 index e8f52d5916f..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branch_protection import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCH_PROTECTION \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.py b/clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.py deleted file mode 100644 index e99b389c834..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.py +++ /dev/null @@ -1,517 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "pattern", - } - - class properties: - pattern = schemas.StrSchema - __annotations__ = { - "pattern": pattern, - } - - pattern: MetaOapg.properties.pattern - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pattern: typing.Union[MetaOapg.properties.pattern, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - pattern=pattern, - _configuration=_configuration, - **kwargs, - ) - - -request_body_any_type = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_any_type.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteBranchProtectionRule(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.pyi b/clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.pyi deleted file mode 100644 index 144b383e02e..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/delete.pyi +++ /dev/null @@ -1,502 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "pattern", - } - - class properties: - pattern = schemas.StrSchema - __annotations__ = { - "pattern": pattern, - } - - pattern: MetaOapg.properties.pattern - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern"]) -> MetaOapg.properties.pattern: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pattern", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pattern: typing.Union[MetaOapg.properties.pattern, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - pattern=pattern, - _configuration=_configuration, - **kwargs, - ) - - -request_body_any_type = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_any_type.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteBranchProtectionRule(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.py b/clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.py deleted file mode 100644 index f9b65d1326f..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.py +++ /dev/null @@ -1,397 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.branch_protection_rule import BranchProtectionRule - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['BranchProtectionRule']: - return BranchProtectionRule - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['BranchProtectionRule'], typing.List['BranchProtectionRule']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'BranchProtectionRule': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_branch_protection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_branch_protection_rules_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_branch_protection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_branch_protection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get branch protection rules - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetBranchProtectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_branch_protection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_branch_protection_rules( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_branch_protection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_branch_protection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_protection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_protection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.pyi deleted file mode 100644 index 81aee7e5f96..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/get.pyi +++ /dev/null @@ -1,382 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.branch_protection_rule import BranchProtectionRule - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['BranchProtectionRule']: - return BranchProtectionRule - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['BranchProtectionRule'], typing.List['BranchProtectionRule']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'BranchProtectionRule': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_branch_protection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_branch_protection_rules_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_branch_protection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_branch_protection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get branch protection rules - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetBranchProtectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_branch_protection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_branch_protection_rules( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_branch_protection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_branch_protection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_protection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_protection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.py b/clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.py deleted file mode 100644 index d41f9e572d8..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.py +++ /dev/null @@ -1,464 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.branch_protection_rule import BranchProtectionRule - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = BranchProtectionRule - - -request_body_branch_protection_rule = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_branch_protection_rule.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateBranchProtectionRule(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.pyi deleted file mode 100644 index 8864f14c287..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branch_protection/post.pyi +++ /dev/null @@ -1,449 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.branch_protection_rule import BranchProtectionRule - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = BranchProtectionRule - - -request_body_branch_protection_rule = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_branch_protection_rule_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_branch_protection_rule.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateBranchProtectionRule(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_branch_protection_rule( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_protection_rule_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches/__init__.py deleted file mode 100644 index b1423f22974..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches/get.py b/clients/python/lakefs_client/paths/repositories_repository_branches/get.py deleted file mode 100644 index dceccd07f2e..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches/get.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref_list import RefList - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = RefList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_branches_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_branches_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_branches_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_branches_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list branches - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListBranches(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_branches( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_branches( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_branches( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_branches( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_branches_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_branches_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches/get.pyi deleted file mode 100644 index cd3fc58f57d..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches/get.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref_list import RefList - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = RefList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_branches_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_branches_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_branches_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_branches_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list branches - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListBranches(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_branches( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_branches( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_branches( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_branches( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_branches_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_branches_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches/post.py deleted file mode 100644 index 5e341911b86..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches/post.py +++ /dev/null @@ -1,513 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.branch_creation import BranchCreation -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = BranchCreation - - -request_body_branch_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyTextHtml = schemas.StrSchema - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyTextHtml, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'text/html': api_client.MediaType( - schema=SchemaFor201ResponseBodyTextHtml), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'text/html', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_branch_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches/post.pyi deleted file mode 100644 index 91aa8e178bc..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches/post.pyi +++ /dev/null @@ -1,496 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.branch_creation import BranchCreation -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = BranchCreation - - -request_body_branch_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyTextHtml = schemas.StrSchema - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyTextHtml, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'text/html': api_client.MediaType( - schema=SchemaFor201ResponseBodyTextHtml), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'text/html', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_branch_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch/__init__.py deleted file mode 100644 index de17494eafa..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.py deleted file mode 100644 index 66038ed67f0..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.py +++ /dev/null @@ -1,393 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.pyi deleted file mode 100644 index 301aeae276b..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/delete.pyi +++ /dev/null @@ -1,377 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.py deleted file mode 100644 index 8ce89a1fb72..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Ref - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.pyi deleted file mode 100644 index e051324ef5c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/get.pyi +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Ref - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_branch_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_branch( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_branch_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.py deleted file mode 100644 index 27a3e5e4483..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.py +++ /dev/null @@ -1,474 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.reset_creation import ResetCreation -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ResetCreation - - -request_body_reset_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - reset branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_reset_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ResetBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._reset_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._reset_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.pyi deleted file mode 100644 index 34b680e6431..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch/put.pyi +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.reset_creation import ResetCreation -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ResetCreation - - -request_body_reset_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _reset_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - reset branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_reset_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ResetBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def reset_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._reset_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._reset_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/__init__.py deleted file mode 100644 index 8349efb7946..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_cherry_pick import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_CHERRYPICK \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.py deleted file mode 100644 index e1f3125fdf6..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.py +++ /dev/null @@ -1,522 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit import Commit -from lakefs_client.model.error import Error -from lakefs_client.model.cherry_pick_creation import CherryPickCreation - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = CherryPickCreation - - -request_body_cherry_pick_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = Commit - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Replay the changes from the given commit on the branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_cherry_pick_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CherryPick(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._cherry_pick_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._cherry_pick_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.pyi deleted file mode 100644 index aa32ee49034..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_cherry_pick/post.pyi +++ /dev/null @@ -1,505 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit import Commit -from lakefs_client.model.error import Error -from lakefs_client.model.cherry_pick_creation import CherryPickCreation - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = CherryPickCreation - - -request_body_cherry_pick_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = Commit - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _cherry_pick_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Replay the changes from the given commit on the branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_cherry_pick_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CherryPick(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def cherry_pick( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._cherry_pick_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._cherry_pick_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/__init__.py deleted file mode 100644 index ff03c3c73df..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_commits import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_COMMITS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.py deleted file mode 100644 index 5ff8b4b52e7..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit_list import CommitList -from lakefs_client.model.error import Error - -from . import path - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = CommitList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _log_branch_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _log_branch_commits_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _log_branch_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _log_branch_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LogBranchCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def log_branch_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def log_branch_commits( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def log_branch_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def log_branch_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_branch_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_branch_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.pyi deleted file mode 100644 index d879d5dfa0a..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/get.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit_list import CommitList -from lakefs_client.model.error import Error - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = CommitList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _log_branch_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _log_branch_commits_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _log_branch_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _log_branch_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LogBranchCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def log_branch_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def log_branch_commits( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def log_branch_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def log_branch_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_branch_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_branch_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.py deleted file mode 100644 index 5239c0c9044..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.py +++ /dev/null @@ -1,599 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit import Commit -from lakefs_client.model.commit_creation import CommitCreation -from lakefs_client.model.error import Error - -from . import path - -# Query params -SourceMetarangeSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'source_metarange': typing.Union[SourceMetarangeSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_source_metarange = api_client.QueryParameter( - name="source_metarange", - style=api_client.ParameterStyle.FORM, - schema=SourceMetarangeSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = CommitCreation - - -request_body_commit_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = Commit - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - '412': _response_for_412, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create commit - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_source_metarange, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_commit_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Commit(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._commit_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._commit_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.pyi deleted file mode 100644 index cadca3339ec..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_commits/post.pyi +++ /dev/null @@ -1,581 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit import Commit -from lakefs_client.model.commit_creation import CommitCreation -from lakefs_client.model.error import Error - -# Query params -SourceMetarangeSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'source_metarange': typing.Union[SourceMetarangeSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_source_metarange = api_client.QueryParameter( - name="source_metarange", - style=api_client.ParameterStyle.FORM, - schema=SourceMetarangeSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = CommitCreation - - -request_body_commit_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = Commit - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _commit_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create commit - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_source_metarange, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_commit_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Commit(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def commit( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._commit_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._commit_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/__init__.py deleted file mode 100644 index 54a86b555c8..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_diff import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_DIFF \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.py deleted file mode 100644 index 59914bc983c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.py +++ /dev/null @@ -1,471 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.diff_list import DiffList -from lakefs_client.model.error import Error - -from . import path - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -PrefixSchema = schemas.StrSchema -DelimiterSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'prefix': typing.Union[PrefixSchema, str, ], - 'delimiter': typing.Union[DelimiterSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_delimiter = api_client.QueryParameter( - name="delimiter", - style=api_client.ParameterStyle.FORM, - schema=DelimiterSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = DiffList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _diff_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _diff_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _diff_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _diff_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - diff branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_prefix, - request_query_delimiter, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DiffBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def diff_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def diff_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def diff_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def diff_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_branch_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_branch_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.pyi deleted file mode 100644 index 45e4f582675..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_diff/get.pyi +++ /dev/null @@ -1,452 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.diff_list import DiffList -from lakefs_client.model.error import Error - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -PrefixSchema = schemas.StrSchema -DelimiterSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'prefix': typing.Union[PrefixSchema, str, ], - 'delimiter': typing.Union[DelimiterSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_delimiter = api_client.QueryParameter( - name="delimiter", - style=api_client.ParameterStyle.FORM, - schema=DelimiterSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = DiffList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _diff_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _diff_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _diff_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _diff_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - diff branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_prefix, - request_query_delimiter, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DiffBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def diff_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def diff_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def diff_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def diff_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_branch_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_branch_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/__init__.py deleted file mode 100644 index a42096df04a..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_objects import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.py deleted file mode 100644 index e22261ebc3d..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.py +++ /dev/null @@ -1,448 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete object. Missing objects will not return a NotFound error. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.pyi deleted file mode 100644 index 36506ee551d..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/delete.pyi +++ /dev/null @@ -1,432 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete object. Missing objects will not return a NotFound error. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.py deleted file mode 100644 index 90b1191f6ff..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.py +++ /dev/null @@ -1,714 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -from . import path - -# Query params -PathSchema = schemas.StrSchema -StorageClassSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'storageClass': typing.Union[StorageClassSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_storage_class = api_client.QueryParameter( - name="storageClass", - style=api_client.ParameterStyle.FORM, - schema=StorageClassSchema, - explode=True, -) -# Header params - - -class IfNoneMatchSchema( - schemas.StrSchema -): - - - class MetaOapg: - regex=[{ - 'pattern': r'^\*$', # noqa: E501 - }] -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'If-None-Match': typing.Union[IfNoneMatchSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_if_none_match = api_client.HeaderParameter( - name="If-None-Match", - style=api_client.ParameterStyle.SIMPLE, - schema=IfNoneMatchSchema, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - content = schemas.BinarySchema - __annotations__ = { - "content": content, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["content", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content"]) -> typing.Union[MetaOapg.properties.content, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["content", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - content: typing.Union[MetaOapg.properties.content, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - content=content, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - '412': _response_for_412, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_object_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _upload_object_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _upload_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_object_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_object_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_storage_class, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_if_none_match, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_object( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def upload_object( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def upload_object( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_object( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_object( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_object_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_object_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.pyi deleted file mode 100644 index bc7c9b76dd3..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/post.pyi +++ /dev/null @@ -1,691 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -# Query params -PathSchema = schemas.StrSchema -StorageClassSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'storageClass': typing.Union[StorageClassSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_storage_class = api_client.QueryParameter( - name="storageClass", - style=api_client.ParameterStyle.FORM, - schema=StorageClassSchema, - explode=True, -) -# Header params - - -class IfNoneMatchSchema( - schemas.StrSchema -): - pass -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'If-None-Match': typing.Union[IfNoneMatchSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_if_none_match = api_client.HeaderParameter( - name="If-None-Match", - style=api_client.ParameterStyle.SIMPLE, - schema=IfNoneMatchSchema, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - content = schemas.BinarySchema - __annotations__ = { - "content": content, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["content", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content"]) -> typing.Union[MetaOapg.properties.content, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["content", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - content: typing.Union[MetaOapg.properties.content, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - content=content, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor201ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_object_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _upload_object_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _upload_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_object_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_object_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_storage_class, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_if_none_match, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_object( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def upload_object( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def upload_object( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_object( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_object( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_object_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_object_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.py deleted file mode 100644 index 4265b95484a..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.py +++ /dev/null @@ -1,580 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_stage_creation import ObjectStageCreation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -from . import path - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ObjectStageCreation - - -request_body_object_stage_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - stage an object's metadata for the given branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_object_stage_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class StageObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stage_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stage_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.pyi deleted file mode 100644 index bc4555ae5fc..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects/put.pyi +++ /dev/null @@ -1,563 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_stage_creation import ObjectStageCreation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ObjectStageCreation - - -request_body_object_stage_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _stage_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - stage an object's metadata for the given branch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_object_stage_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class StageObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def stage_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stage_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stage_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/__init__.py deleted file mode 100644 index fed5184b7cc..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_objects_copy import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_COPY \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.py deleted file mode 100644 index 3770a7b80c4..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.py +++ /dev/null @@ -1,560 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_copy_creation import ObjectCopyCreation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -from . import path - -# Query params -DestPathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'dest_path': typing.Union[DestPathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_dest_path = api_client.QueryParameter( - name="dest_path", - style=api_client.ParameterStyle.FORM, - schema=DestPathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ObjectCopyCreation - - -request_body_object_copy_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create a copy of an object - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_dest_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_object_copy_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.pyi deleted file mode 100644 index 48766b9e25f..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_copy/post.pyi +++ /dev/null @@ -1,544 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_copy_creation import ObjectCopyCreation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -# Query params -DestPathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'dest_path': typing.Union[DestPathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_dest_path = api_client.QueryParameter( - name="dest_path", - style=api_client.ParameterStyle.FORM, - schema=DestPathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = ObjectCopyCreation - - -request_body_object_copy_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _copy_object_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create a copy of an object - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_dest_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_object_copy_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CopyObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def copy_object( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._copy_object_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/__init__.py deleted file mode 100644 index 2a5fa868469..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_objects_delete import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_OBJECTS_DELETE \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.py deleted file mode 100644 index f274c494435..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.py +++ /dev/null @@ -1,502 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_error_list import ObjectErrorList -from lakefs_client.model.error import Error -from lakefs_client.model.path_list import PathList - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = PathList - - -request_body_path_list = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = ObjectErrorList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete objects. Missing objects will not return a NotFound error. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_path_list.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteObjects(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_objects_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_objects_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.pyi deleted file mode 100644 index 4d03c525eed..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_objects_delete/post.pyi +++ /dev/null @@ -1,486 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_error_list import ObjectErrorList -from lakefs_client.model.error import Error -from lakefs_client.model.path_list import PathList - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = PathList - - -request_body_path_list = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ObjectErrorList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_objects_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete objects. Missing objects will not return a NotFound error. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_path_list.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteObjects(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_objects( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_objects_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_objects_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/__init__.py deleted file mode 100644 index a2e0d53ca4c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_revert import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_REVERT \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.py deleted file mode 100644 index 00b9d0f8a93..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.py +++ /dev/null @@ -1,514 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.revert_creation import RevertCreation -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = RevertCreation - - -request_body_revert_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - revert - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_revert_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RevertBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revert_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revert_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.pyi deleted file mode 100644 index 9fe59ceb66b..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_revert/post.pyi +++ /dev/null @@ -1,497 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.revert_creation import RevertCreation -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = RevertCreation - - -request_body_revert_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _revert_branch_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - revert - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_revert_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RevertBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def revert_branch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revert_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._revert_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/__init__.py deleted file mode 100644 index 8fab8c4a76d..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_branch_staging_backing import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_BRANCH_STAGING_BACKING \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.py deleted file mode 100644 index 9c632c57683..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.py +++ /dev/null @@ -1,445 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.staging_location import StagingLocation -from lakefs_client.model.error import Error - -from . import path - -# Query params -PathSchema = schemas.StrSchema -PresignSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'presign': typing.Union[PresignSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = StagingLocation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_physical_address_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_physical_address_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_physical_address_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_physical_address_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get a physical address and a return token to write object to underlying storage - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_presign, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetPhysicalAddress(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_physical_address( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_physical_address( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_physical_address( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_physical_address( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_physical_address_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_physical_address_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.pyi deleted file mode 100644 index 537fadda33a..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/get.pyi +++ /dev/null @@ -1,430 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.staging_location import StagingLocation -from lakefs_client.model.error import Error - -# Query params -PathSchema = schemas.StrSchema -PresignSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'presign': typing.Union[PresignSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = StagingLocation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_physical_address_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_physical_address_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_physical_address_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_physical_address_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get a physical address and a return token to write object to underlying storage - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_presign, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetPhysicalAddress(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_physical_address( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_physical_address( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_physical_address( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_physical_address( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_physical_address_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_physical_address_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.py b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.py deleted file mode 100644 index b8a81de4e0c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.py +++ /dev/null @@ -1,581 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.staging_location import StagingLocation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats -from lakefs_client.model.staging_metadata import StagingMetadata - -from . import path - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = StagingMetadata - - -request_body_staging_metadata = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = StagingLocation - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - associate staging on this physical address with a path - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_staging_metadata.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LinkPhysicalAddress(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._link_physical_address_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._link_physical_address_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.pyi deleted file mode 100644 index 1727dd9e284..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_branch_staging_backing/put.pyi +++ /dev/null @@ -1,564 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.staging_location import StagingLocation -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats -from lakefs_client.model.staging_metadata import StagingMetadata - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = StagingMetadata - - -request_body_staging_metadata = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = StagingLocation - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _link_physical_address_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - associate staging on this physical address with a path - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_staging_metadata.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LinkPhysicalAddress(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def link_physical_address( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._link_physical_address_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._link_physical_address_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/__init__.py deleted file mode 100644 index c64e3b74511..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_metaranges import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_METARANGES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.py deleted file mode 100644 index 0154488a5b2..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.py +++ /dev/null @@ -1,513 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.meta_range_creation import MetaRangeCreation -from lakefs_client.model.meta_range_creation_response import MetaRangeCreationResponse -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = MetaRangeCreation - - -request_body_meta_range_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = MetaRangeCreationResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create a lakeFS metarange file from the given ranges - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_meta_range_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateMetaRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_meta_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_meta_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.pyi deleted file mode 100644 index 40de82add90..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_metaranges/post.pyi +++ /dev/null @@ -1,496 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.meta_range_creation import MetaRangeCreation -from lakefs_client.model.meta_range_creation_response import MetaRangeCreationResponse -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = MetaRangeCreation - - -request_body_meta_range_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = MetaRangeCreationResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_meta_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create a lakeFS metarange file from the given ranges - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_meta_range_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateMetaRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_meta_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_meta_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_meta_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/__init__.py deleted file mode 100644 index 5487749f332..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_branches_ranges import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_BRANCHES_RANGES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.py b/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.py deleted file mode 100644 index 5a706b006eb..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.py +++ /dev/null @@ -1,493 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse -from lakefs_client.model.stage_range_creation import StageRangeCreation -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = StageRangeCreation - - -request_body_stage_range_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = IngestRangeCreationResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create a lakeFS range file from the source uri - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_stage_range_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class IngestRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ingest_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ingest_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.pyi deleted file mode 100644 index 04ee1542905..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_branches_ranges/post.pyi +++ /dev/null @@ -1,477 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse -from lakefs_client.model.stage_range_creation import StageRangeCreation -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = StageRangeCreation - - -request_body_stage_range_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = IngestRangeCreationResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _ingest_range_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create a lakeFS range file from the source uri - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_stage_range_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class IngestRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def ingest_range( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ingest_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ingest_range_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/__init__.py deleted file mode 100644 index 700ca3d3242..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_commits_commit_id import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_COMMITS_COMMIT_ID \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.py b/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.py deleted file mode 100644 index e21fcaf52f1..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit import Commit -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -CommitIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'commitId': typing.Union[CommitIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_commit_id = api_client.PathParameter( - name="commitId", - style=api_client.ParameterStyle.SIMPLE, - schema=CommitIdSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Commit - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_commit_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_commit_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_commit_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_commit_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get commit - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_commit_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCommit(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_commit( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_commit( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_commit( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_commit( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_commit_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_commit_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.pyi deleted file mode 100644 index 3c034acd405..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_commits_commit_id/get.pyi +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit import Commit -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -CommitIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'commitId': typing.Union[CommitIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_commit_id = api_client.PathParameter( - name="commitId", - style=api_client.ParameterStyle.SIMPLE, - schema=CommitIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Commit - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_commit_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_commit_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_commit_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_commit_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get commit - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_commit_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCommit(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_commit( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_commit( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_commit( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_commit( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_commit_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_commit_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/__init__.py deleted file mode 100644 index 7088b28391a..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_gc_prepare_commits import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_GC_PREPARE_COMMITS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.py b/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.py deleted file mode 100644 index 1a97c204a04..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.py +++ /dev/null @@ -1,470 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.garbage_collection_prepare_response import GarbageCollectionPrepareResponse -from lakefs_client.model.garbage_collection_prepare_request import GarbageCollectionPrepareRequest - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = GarbageCollectionPrepareRequest - - -request_body_garbage_collection_prepare_request = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = GarbageCollectionPrepareResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _prepare_garbage_collection_commits_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - save lists of active and expired commits for garbage collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_garbage_collection_prepare_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PrepareGarbageCollectionCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def prepare_garbage_collection_commits( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def prepare_garbage_collection_commits( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def prepare_garbage_collection_commits( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def prepare_garbage_collection_commits( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def prepare_garbage_collection_commits( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_commits_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_commits_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.pyi deleted file mode 100644 index 01327b5ab96..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_commits/post.pyi +++ /dev/null @@ -1,455 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.garbage_collection_prepare_response import GarbageCollectionPrepareResponse -from lakefs_client.model.garbage_collection_prepare_request import GarbageCollectionPrepareRequest - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = GarbageCollectionPrepareRequest - - -request_body_garbage_collection_prepare_request = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor201ResponseBodyApplicationJson = GarbageCollectionPrepareResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _prepare_garbage_collection_commits_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _prepare_garbage_collection_commits_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - save lists of active and expired commits for garbage collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_garbage_collection_prepare_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PrepareGarbageCollectionCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def prepare_garbage_collection_commits( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def prepare_garbage_collection_commits( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def prepare_garbage_collection_commits( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def prepare_garbage_collection_commits( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def prepare_garbage_collection_commits( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_commits_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_commits_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/__init__.py deleted file mode 100644 index dda64995a6e..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_gc_prepare_uncommited import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_GC_PREPARE_UNCOMMITED \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.py b/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.py deleted file mode 100644 index 2cb874da1d3..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.py +++ /dev/null @@ -1,490 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse -from lakefs_client.model.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = PrepareGCUncommittedRequest - - -request_body_prepare_gc_uncommitted_request = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = PrepareGCUncommittedResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - save repository uncommitted metadata for garbage collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_prepare_gc_uncommitted_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PrepareGarbageCollectionUncommitted(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def prepare_garbage_collection_uncommitted( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_uncommitted_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_uncommitted_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.pyi deleted file mode 100644 index 7308bcf11c5..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_prepare_uncommited/post.pyi +++ /dev/null @@ -1,474 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse -from lakefs_client.model.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = PrepareGCUncommittedRequest - - -request_body_prepare_gc_uncommitted_request = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor201ResponseBodyApplicationJson = PrepareGCUncommittedResponse - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _prepare_garbage_collection_uncommitted_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - save repository uncommitted metadata for garbage collection - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_prepare_gc_uncommitted_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PrepareGarbageCollectionUncommitted(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def prepare_garbage_collection_uncommitted( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def prepare_garbage_collection_uncommitted( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_uncommitted_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._prepare_garbage_collection_uncommitted_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_gc_rules/__init__.py deleted file mode 100644 index 7d8667951a2..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_gc_rules import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_GC_RULES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.py b/clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.py deleted file mode 100644 index b49a787e46b..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.py +++ /dev/null @@ -1,363 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_garbage_collection_rules_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteGarbageCollectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_garbage_collection_rules( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.pyi b/clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.pyi deleted file mode 100644 index cb23ac53ddd..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/delete.pyi +++ /dev/null @@ -1,348 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_garbage_collection_rules_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteGarbageCollectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_garbage_collection_rules( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.py b/clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.py deleted file mode 100644 index 2f0c6028de7..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.py +++ /dev/null @@ -1,371 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = GarbageCollectionRules - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_garbage_collection_rules_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGarbageCollectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_garbage_collection_rules( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.pyi deleted file mode 100644 index 4318f9fd769..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/get.pyi +++ /dev/null @@ -1,356 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = GarbageCollectionRules - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_garbage_collection_rules_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_garbage_collection_rules_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetGarbageCollectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_garbage_collection_rules( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_garbage_collection_rules( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_garbage_collection_rules_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.py b/clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.py deleted file mode 100644 index 7cc574e4f96..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.py +++ /dev/null @@ -1,464 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = GarbageCollectionRules - - -request_body_garbage_collection_rules = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_garbage_collection_rules.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class SetGarbageCollectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._set_garbage_collection_rules_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._set_garbage_collection_rules_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.pyi deleted file mode 100644 index d369816ac63..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_gc_rules/post.pyi +++ /dev/null @@ -1,449 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = GarbageCollectionRules - - -request_body_garbage_collection_rules = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _set_garbage_collection_rules_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_garbage_collection_rules.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class SetGarbageCollectionRules(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def set_garbage_collection_rules( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._set_garbage_collection_rules_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._set_garbage_collection_rules_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/__init__.py deleted file mode 100644 index 85ce04b6da7..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_metadata_meta_range_meta_range import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_METADATA_META_RANGE_META_RANGE \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.py b/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.py deleted file mode 100644 index a09bde003cc..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.py +++ /dev/null @@ -1,396 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -MetaRangeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'meta_range': typing.Union[MetaRangeSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_meta_range = api_client.PathParameter( - name="meta_range", - style=api_client.ParameterStyle.SIMPLE, - schema=MetaRangeSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -LocationSchema = schemas.StrSchema -location_parameter = api_client.HeaderParameter( - name="Location", - style=api_client.ParameterStyle.SIMPLE, - schema=LocationSchema, -) -SchemaFor200ResponseBodyApplicationJson = StorageURI -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Location': LocationSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - location_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_meta_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_meta_range_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_meta_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_meta_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - return URI to a meta-range file - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_meta_range, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetMetaRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_meta_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_meta_range( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_meta_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_meta_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_meta_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_meta_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.pyi deleted file mode 100644 index 8ee39388a93..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_metadata_meta_range_meta_range/get.pyi +++ /dev/null @@ -1,376 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI - -# Path params -RepositorySchema = schemas.StrSchema -MetaRangeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'meta_range': typing.Union[MetaRangeSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_meta_range = api_client.PathParameter( - name="meta_range", - style=api_client.ParameterStyle.SIMPLE, - schema=MetaRangeSchema, - required=True, -) -LocationSchema = schemas.StrSchema -SchemaFor200ResponseBodyApplicationJson = StorageURI -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Location': LocationSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - location_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_meta_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_meta_range_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_meta_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_meta_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - return URI to a meta-range file - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_meta_range, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetMetaRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_meta_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_meta_range( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_meta_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_meta_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_meta_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_meta_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/__init__.py deleted file mode 100644 index f05f18ab5cd..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_metadata_range_range import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_METADATA_RANGE_RANGE \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.py b/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.py deleted file mode 100644 index 1bac79f5dc4..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.py +++ /dev/null @@ -1,396 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RangeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'range': typing.Union[RangeSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_range = api_client.PathParameter( - name="range", - style=api_client.ParameterStyle.SIMPLE, - schema=RangeSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -LocationSchema = schemas.StrSchema -location_parameter = api_client.HeaderParameter( - name="Location", - style=api_client.ParameterStyle.SIMPLE, - schema=LocationSchema, -) -SchemaFor200ResponseBodyApplicationJson = StorageURI -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Location': LocationSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - location_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_range_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - return URI to a range file - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_range, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_range( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.pyi deleted file mode 100644 index 2d7eed325c8..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_metadata_range_range/get.pyi +++ /dev/null @@ -1,376 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI - -# Path params -RepositorySchema = schemas.StrSchema -RangeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'range': typing.Union[RangeSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_range = api_client.PathParameter( - name="range", - style=api_client.ParameterStyle.SIMPLE, - schema=RangeSchema, - required=True, -) -LocationSchema = schemas.StrSchema -SchemaFor200ResponseBodyApplicationJson = StorageURI -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Location': LocationSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - location_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_range_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_range_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - return URI to a range file - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_range, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetRange(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_range( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_range( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_range_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/__init__.py deleted file mode 100644 index 4320b6b911a..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_otf_refs_left_ref_diff_right_ref import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_OTF_REFS_LEFT_REF_DIFF_RIGHT_REF \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.py b/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.py deleted file mode 100644 index d737a1c6454..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.py +++ /dev/null @@ -1,475 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.otf_diff_list import OtfDiffList -from lakefs_client.model.error import Error - -from . import path - -# Query params -TablePathSchema = schemas.StrSchema -TypeSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'table_path': typing.Union[TablePathSchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_table_path = api_client.QueryParameter( - name="table_path", - style=api_client.ParameterStyle.FORM, - schema=TablePathSchema, - required=True, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -LeftRefSchema = schemas.StrSchema -RightRefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'left_ref': typing.Union[LeftRefSchema, str, ], - 'right_ref': typing.Union[RightRefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_left_ref = api_client.PathParameter( - name="left_ref", - style=api_client.ParameterStyle.SIMPLE, - schema=LeftRefSchema, - required=True, -) -request_path_right_ref = api_client.PathParameter( - name="right_ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RightRefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = OtfDiffList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - '412': _response_for_412, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _otf_diff_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _otf_diff_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _otf_diff_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _otf_diff_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - perform otf diff - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_left_ref, - request_path_right_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_table_path, - request_query_type, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class OtfDiff(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def otf_diff( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def otf_diff( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def otf_diff( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def otf_diff( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._otf_diff_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._otf_diff_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.pyi deleted file mode 100644 index a61f6b2610b..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_otf_refs_left_ref_diff_right_ref/get.pyi +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.otf_diff_list import OtfDiffList -from lakefs_client.model.error import Error - -# Query params -TablePathSchema = schemas.StrSchema -TypeSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'table_path': typing.Union[TablePathSchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_table_path = api_client.QueryParameter( - name="table_path", - style=api_client.ParameterStyle.FORM, - schema=TablePathSchema, - required=True, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -LeftRefSchema = schemas.StrSchema -RightRefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'left_ref': typing.Union[LeftRefSchema, str, ], - 'right_ref': typing.Union[RightRefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_left_ref = api_client.PathParameter( - name="left_ref", - style=api_client.ParameterStyle.SIMPLE, - schema=LeftRefSchema, - required=True, -) -request_path_right_ref = api_client.PathParameter( - name="right_ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RightRefSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OtfDiffList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _otf_diff_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _otf_diff_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _otf_diff_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _otf_diff_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - perform otf diff - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_left_ref, - request_path_right_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_table_path, - request_query_type, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class OtfDiff(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def otf_diff( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def otf_diff( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def otf_diff( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def otf_diff( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._otf_diff_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._otf_diff_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/__init__.py deleted file mode 100644 index 24a1dc434ad..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_branch_symlink import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_BRANCH_SYMLINK \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.py b/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.py deleted file mode 100644 index edbc90082e8..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.py +++ /dev/null @@ -1,435 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI - -from . import path - -# Query params -LocationSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'location': typing.Union[LocationSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_location = api_client.QueryParameter( - name="location", - style=api_client.ParameterStyle.FORM, - schema=LocationSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = StorageURI - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_symlink_file_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_symlink_file_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_symlink_file_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_symlink_file_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - creates symlink files corresponding to the given directory - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_location, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateSymlinkFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_symlink_file( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_symlink_file( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_symlink_file( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_symlink_file( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_symlink_file_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_symlink_file_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.pyi deleted file mode 100644 index 0516fa05f09..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_branch_symlink/post.pyi +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.storage_uri import StorageURI - -# Query params -LocationSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'location': typing.Union[LocationSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_location = api_client.QueryParameter( - name="location", - style=api_client.ParameterStyle.FORM, - schema=LocationSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -BranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'branch': typing.Union[BranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_branch = api_client.PathParameter( - name="branch", - style=api_client.ParameterStyle.SIMPLE, - schema=BranchSchema, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = StorageURI - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_symlink_file_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_symlink_file_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_symlink_file_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_symlink_file_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - creates symlink files corresponding to the given directory - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_location, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateSymlinkFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_symlink_file( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_symlink_file( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_symlink_file( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_symlink_file( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_symlink_file_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_symlink_file_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_dump/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_dump/__init__.py deleted file mode 100644 index 95d2b88b948..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_dump/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_dump import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_DUMP \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.py b/clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.py deleted file mode 100644 index 867a4713b77..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.refs_dump import RefsDump -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = RefsDump - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _dump_refs_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _dump_refs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _dump_refs_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _dump_refs_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Dump repository refs (tags, commits, branches) to object store - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DumpRefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def dump_refs( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def dump_refs( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def dump_refs( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def dump_refs( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._dump_refs_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._dump_refs_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.pyi deleted file mode 100644 index 0e0c09da180..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_dump/put.pyi +++ /dev/null @@ -1,376 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.refs_dump import RefsDump -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = RefsDump - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _dump_refs_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _dump_refs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _dump_refs_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _dump_refs_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Dump repository refs (tags, commits, branches) to object store - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DumpRefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def dump_refs( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def dump_refs( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def dump_refs( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def dump_refs( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._dump_refs_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._dump_refs_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/__init__.py deleted file mode 100644 index bf264c1af55..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_left_ref_diff_right_ref import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_LEFT_REF_DIFF_RIGHT_REF \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.py b/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.py deleted file mode 100644 index 821d116a2ef..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.py +++ /dev/null @@ -1,509 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.diff_list import DiffList -from lakefs_client.model.error import Error - -from . import path - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -PrefixSchema = schemas.StrSchema -DelimiterSchema = schemas.StrSchema - - -class TypeSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "two_dot": "TWO_DOT", - "three_dot": "THREE_DOT", - } - - @schemas.classproperty - def TWO_DOT(cls): - return cls("two_dot") - - @schemas.classproperty - def THREE_DOT(cls): - return cls("three_dot") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'prefix': typing.Union[PrefixSchema, str, ], - 'delimiter': typing.Union[DelimiterSchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_delimiter = api_client.QueryParameter( - name="delimiter", - style=api_client.ParameterStyle.FORM, - schema=DelimiterSchema, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -LeftRefSchema = schemas.StrSchema -RightRefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'leftRef': typing.Union[LeftRefSchema, str, ], - 'rightRef': typing.Union[RightRefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_left_ref = api_client.PathParameter( - name="leftRef", - style=api_client.ParameterStyle.SIMPLE, - schema=LeftRefSchema, - required=True, -) -request_path_right_ref = api_client.PathParameter( - name="rightRef", - style=api_client.ParameterStyle.SIMPLE, - schema=RightRefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = DiffList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _diff_refs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _diff_refs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _diff_refs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _diff_refs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - diff references - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_left_ref, - request_path_right_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_prefix, - request_query_delimiter, - request_query_type, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DiffRefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def diff_refs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def diff_refs( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def diff_refs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def diff_refs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_refs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_refs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.pyi deleted file mode 100644 index fbaaa23096d..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_left_ref_diff_right_ref/get.pyi +++ /dev/null @@ -1,483 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.diff_list import DiffList -from lakefs_client.model.error import Error - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -PrefixSchema = schemas.StrSchema -DelimiterSchema = schemas.StrSchema - - -class TypeSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def TWO_DOT(cls): - return cls("two_dot") - - @schemas.classproperty - def THREE_DOT(cls): - return cls("three_dot") -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'prefix': typing.Union[PrefixSchema, str, ], - 'delimiter': typing.Union[DelimiterSchema, str, ], - 'type': typing.Union[TypeSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_delimiter = api_client.QueryParameter( - name="delimiter", - style=api_client.ParameterStyle.FORM, - schema=DelimiterSchema, - explode=True, -) -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -LeftRefSchema = schemas.StrSchema -RightRefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'leftRef': typing.Union[LeftRefSchema, str, ], - 'rightRef': typing.Union[RightRefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_left_ref = api_client.PathParameter( - name="leftRef", - style=api_client.ParameterStyle.SIMPLE, - schema=LeftRefSchema, - required=True, -) -request_path_right_ref = api_client.PathParameter( - name="rightRef", - style=api_client.ParameterStyle.SIMPLE, - schema=RightRefSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = DiffList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _diff_refs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _diff_refs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _diff_refs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _diff_refs_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - diff references - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_left_ref, - request_path_right_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_prefix, - request_query_delimiter, - request_query_type, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DiffRefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def diff_refs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def diff_refs( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def diff_refs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def diff_refs( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_refs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._diff_refs_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/__init__.py deleted file mode 100644 index 5dad97f2305..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_ref_commits import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_REF_COMMITS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.py deleted file mode 100644 index c174037e6bb..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.py +++ /dev/null @@ -1,524 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit_list import CommitList -from lakefs_client.model.error import Error - -from . import path - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 - - -class ObjectsSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ObjectsSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class PrefixesSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'PrefixesSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -LimitSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'objects': typing.Union[ObjectsSchema, list, tuple, ], - 'prefixes': typing.Union[PrefixesSchema, list, tuple, ], - 'limit': typing.Union[LimitSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_objects = api_client.QueryParameter( - name="objects", - style=api_client.ParameterStyle.FORM, - schema=ObjectsSchema, - explode=True, -) -request_query_prefixes = api_client.QueryParameter( - name="prefixes", - style=api_client.ParameterStyle.FORM, - schema=PrefixesSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = CommitList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _log_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _log_commits_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _log_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _log_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get commit log from ref. If both objects and prefixes are empty, return all commits. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_objects, - request_query_prefixes, - request_query_limit, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LogCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def log_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def log_commits( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def log_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def log_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.pyi deleted file mode 100644 index 64ef33e1e30..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_commits/get.pyi +++ /dev/null @@ -1,505 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.commit_list import CommitList -from lakefs_client.model.error import Error - -# Query params -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass - - -class ObjectsSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ObjectsSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class PrefixesSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'PrefixesSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -LimitSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'objects': typing.Union[ObjectsSchema, list, tuple, ], - 'prefixes': typing.Union[PrefixesSchema, list, tuple, ], - 'limit': typing.Union[LimitSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_objects = api_client.QueryParameter( - name="objects", - style=api_client.ParameterStyle.FORM, - schema=ObjectsSchema, - explode=True, -) -request_query_prefixes = api_client.QueryParameter( - name="prefixes", - style=api_client.ParameterStyle.FORM, - schema=PrefixesSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = CommitList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _log_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _log_commits_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _log_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _log_commits_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get commit log from ref. If both objects and prefixes are empty, return all commits. - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_after, - request_query_amount, - request_query_objects, - request_query_prefixes, - request_query_limit, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LogCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def log_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def log_commits( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def log_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def log_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._log_commits_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/__init__.py deleted file mode 100644 index b9da5dff852..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_ref_objects import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.py deleted file mode 100644 index 3af0246c4c3..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.py +++ /dev/null @@ -1,677 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Query params -PathSchema = schemas.StrSchema -PresignSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'presign': typing.Union[PresignSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -# Header params - - -class RangeSchema( - schemas.StrSchema -): - - - class MetaOapg: - regex=[{ - 'pattern': r'^bytes=((\d*-\d*,? ?)+)$', # noqa: E501 - }] -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'Range': typing.Union[RangeSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_range = api_client.HeaderParameter( - name="Range", - style=api_client.ParameterStyle.SIMPLE, - schema=RangeSchema, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -ContentLengthSchema = schemas.Int64Schema -content_length_parameter = api_client.HeaderParameter( - name="Content-Length", - style=api_client.ParameterStyle.SIMPLE, - schema=ContentLengthSchema, -) -LastModifiedSchema = schemas.StrSchema -last_modified_parameter = api_client.HeaderParameter( - name="Last-Modified", - style=api_client.ParameterStyle.SIMPLE, - schema=LastModifiedSchema, -) -ETagSchema = schemas.StrSchema -e_tag_parameter = api_client.HeaderParameter( - name="ETag", - style=api_client.ParameterStyle.SIMPLE, - schema=ETagSchema, -) -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Content-Length': ContentLengthSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, - headers=[ - content_length_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) -ContentLengthSchema = schemas.Int64Schema -content_length_parameter = api_client.HeaderParameter( - name="Content-Length", - style=api_client.ParameterStyle.SIMPLE, - schema=ContentLengthSchema, -) - - -class ContentRangeSchema( - schemas.StrSchema -): - - - class MetaOapg: - regex=[{ - 'pattern': r'^bytes=((\d*-\d*,? ?)+)$', # noqa: E501 - }] -content_range_parameter = api_client.HeaderParameter( - name="Content-Range", - style=api_client.ParameterStyle.SIMPLE, - schema=ContentRangeSchema, -) -LastModifiedSchema = schemas.StrSchema -last_modified_parameter = api_client.HeaderParameter( - name="Last-Modified", - style=api_client.ParameterStyle.SIMPLE, - schema=LastModifiedSchema, -) -ETagSchema = schemas.StrSchema -e_tag_parameter = api_client.HeaderParameter( - name="ETag", - style=api_client.ParameterStyle.SIMPLE, - schema=ETagSchema, -) -SchemaFor206ResponseBodyApplicationOctetStream = schemas.BinarySchema -ResponseHeadersFor206 = typing_extensions.TypedDict( - 'ResponseHeadersFor206', - { - 'Content-Length': ContentLengthSchema, - 'Content-Range': ContentRangeSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor206(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor206ResponseBodyApplicationOctetStream, - ] - headers: ResponseHeadersFor206 - - -_response_for_206 = api_client.OpenApiResponse( - response_cls=ApiResponseFor206, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor206ResponseBodyApplicationOctetStream), - }, - headers=[ - content_length_parameter, - content_range_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) -LocationSchema = schemas.StrSchema -location_parameter = api_client.HeaderParameter( - name="Location", - style=api_client.ParameterStyle.SIMPLE, - schema=LocationSchema, -) -ResponseHeadersFor302 = typing_extensions.TypedDict( - 'ResponseHeadersFor302', - { - 'Location': LocationSchema, - } -) - - -@dataclass -class ApiResponseFor302(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor302 - body: schemas.Unset = schemas.unset - - -_response_for_302 = api_client.OpenApiResponse( - response_cls=ApiResponseFor302, - headers=[ - location_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor410ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor410(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor410ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_410 = api_client.OpenApiResponse( - response_cls=ApiResponseFor410, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor410ResponseBodyApplicationJson), - }, -) -SchemaFor416ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor416(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor416ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_416 = api_client.OpenApiResponse( - response_cls=ApiResponseFor416, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor416ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '206': _response_for_206, - '302': _response_for_302, - '401': _response_for_401, - '404': _response_for_404, - '410': _response_for_410, - '416': _response_for_416, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/octet-stream', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get object content - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_presign, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_range, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.pyi deleted file mode 100644 index 0e9590db90d..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/get.pyi +++ /dev/null @@ -1,608 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Query params -PathSchema = schemas.StrSchema -PresignSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'presign': typing.Union[PresignSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -# Header params - - -class RangeSchema( - schemas.StrSchema -): - pass -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'Range': typing.Union[RangeSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_range = api_client.HeaderParameter( - name="Range", - style=api_client.ParameterStyle.SIMPLE, - schema=RangeSchema, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -ContentLengthSchema = schemas.Int64Schema -LastModifiedSchema = schemas.StrSchema -ETagSchema = schemas.StrSchema -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Content-Length': ContentLengthSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, - headers=[ - content_length_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) -ContentLengthSchema = schemas.Int64Schema - - -class ContentRangeSchema( - schemas.StrSchema -): - pass -LastModifiedSchema = schemas.StrSchema -ETagSchema = schemas.StrSchema -SchemaFor206ResponseBodyApplicationOctetStream = schemas.BinarySchema -ResponseHeadersFor206 = typing_extensions.TypedDict( - 'ResponseHeadersFor206', - { - 'Content-Length': ContentLengthSchema, - 'Content-Range': ContentRangeSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor206(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor206ResponseBodyApplicationOctetStream, - ] - headers: ResponseHeadersFor206 - - -_response_for_206 = api_client.OpenApiResponse( - response_cls=ApiResponseFor206, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor206ResponseBodyApplicationOctetStream), - }, - headers=[ - content_length_parameter, - content_range_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) -LocationSchema = schemas.StrSchema -ResponseHeadersFor302 = typing_extensions.TypedDict( - 'ResponseHeadersFor302', - { - 'Location': LocationSchema, - } -) - - -@dataclass -class ApiResponseFor302(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor302 - body: schemas.Unset = schemas.unset - - -_response_for_302 = api_client.OpenApiResponse( - response_cls=ApiResponseFor302, - headers=[ - location_parameter, - ] -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor410ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor410(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor410ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_410 = api_client.OpenApiResponse( - response_cls=ApiResponseFor410, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor410ResponseBodyApplicationJson), - }, -) -SchemaFor416ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor416(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor416ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_416 = api_client.OpenApiResponse( - response_cls=ApiResponseFor416, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor416ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/octet-stream', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get object content - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_presign, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_range, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.py deleted file mode 100644 index 5828d0924cc..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.py +++ /dev/null @@ -1,568 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from . import path - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Header params - - -class RangeSchema( - schemas.StrSchema -): - - - class MetaOapg: - regex=[{ - 'pattern': r'^bytes=((\d*-\d*,? ?)+)$', # noqa: E501 - }] -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'Range': typing.Union[RangeSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_range = api_client.HeaderParameter( - name="Range", - style=api_client.ParameterStyle.SIMPLE, - schema=RangeSchema, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -ContentLengthSchema = schemas.Int64Schema -content_length_parameter = api_client.HeaderParameter( - name="Content-Length", - style=api_client.ParameterStyle.SIMPLE, - schema=ContentLengthSchema, -) -LastModifiedSchema = schemas.StrSchema -last_modified_parameter = api_client.HeaderParameter( - name="Last-Modified", - style=api_client.ParameterStyle.SIMPLE, - schema=LastModifiedSchema, -) -ETagSchema = schemas.StrSchema -e_tag_parameter = api_client.HeaderParameter( - name="ETag", - style=api_client.ParameterStyle.SIMPLE, - schema=ETagSchema, -) -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Content-Length': ContentLengthSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor200 - body: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - headers=[ - content_length_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) -ContentLengthSchema = schemas.Int64Schema -content_length_parameter = api_client.HeaderParameter( - name="Content-Length", - style=api_client.ParameterStyle.SIMPLE, - schema=ContentLengthSchema, -) - - -class ContentRangeSchema( - schemas.StrSchema -): - - - class MetaOapg: - regex=[{ - 'pattern': r'^bytes=((\d*-\d*,? ?)+)$', # noqa: E501 - }] -content_range_parameter = api_client.HeaderParameter( - name="Content-Range", - style=api_client.ParameterStyle.SIMPLE, - schema=ContentRangeSchema, -) -LastModifiedSchema = schemas.StrSchema -last_modified_parameter = api_client.HeaderParameter( - name="Last-Modified", - style=api_client.ParameterStyle.SIMPLE, - schema=LastModifiedSchema, -) -ETagSchema = schemas.StrSchema -e_tag_parameter = api_client.HeaderParameter( - name="ETag", - style=api_client.ParameterStyle.SIMPLE, - schema=ETagSchema, -) -ResponseHeadersFor206 = typing_extensions.TypedDict( - 'ResponseHeadersFor206', - { - 'Content-Length': ContentLengthSchema, - 'Content-Range': ContentRangeSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor206(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor206 - body: schemas.Unset = schemas.unset - - -_response_for_206 = api_client.OpenApiResponse( - response_cls=ApiResponseFor206, - headers=[ - content_length_parameter, - content_range_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -@dataclass -class ApiResponseFor410(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_410 = api_client.OpenApiResponse( - response_cls=ApiResponseFor410, -) - - -@dataclass -class ApiResponseFor416(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_416 = api_client.OpenApiResponse( - response_cls=ApiResponseFor416, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - '200': _response_for_200, - '206': _response_for_206, - '401': _response_for_401, - '404': _response_for_404, - '410': _response_for_410, - '416': _response_for_416, - 'default': _response_for_default, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _head_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _head_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _head_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _head_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - check if object exists - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_range, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='head'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class HeadObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def head_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def head_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def head_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def head_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._head_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForhead(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def head( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def head( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def head( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def head( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._head_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.pyi deleted file mode 100644 index 01daba17668..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects/head.pyi +++ /dev/null @@ -1,505 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Header params - - -class RangeSchema( - schemas.StrSchema -): - pass -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'Range': typing.Union[RangeSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_range = api_client.HeaderParameter( - name="Range", - style=api_client.ParameterStyle.SIMPLE, - schema=RangeSchema, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -ContentLengthSchema = schemas.Int64Schema -LastModifiedSchema = schemas.StrSchema -ETagSchema = schemas.StrSchema -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'Content-Length': ContentLengthSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor200 - body: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - headers=[ - content_length_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) -ContentLengthSchema = schemas.Int64Schema - - -class ContentRangeSchema( - schemas.StrSchema -): - pass -LastModifiedSchema = schemas.StrSchema -ETagSchema = schemas.StrSchema -ResponseHeadersFor206 = typing_extensions.TypedDict( - 'ResponseHeadersFor206', - { - 'Content-Length': ContentLengthSchema, - 'Content-Range': ContentRangeSchema, - 'Last-Modified': LastModifiedSchema, - 'ETag': ETagSchema, - } -) - - -@dataclass -class ApiResponseFor206(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor206 - body: schemas.Unset = schemas.unset - - -_response_for_206 = api_client.OpenApiResponse( - response_cls=ApiResponseFor206, - headers=[ - content_length_parameter, - content_range_parameter, - last_modified_parameter, - e_tag_parameter, - ] -) - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -@dataclass -class ApiResponseFor410(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_410 = api_client.OpenApiResponse( - response_cls=ApiResponseFor410, -) - - -@dataclass -class ApiResponseFor416(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_416 = api_client.OpenApiResponse( - response_cls=ApiResponseFor416, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _head_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _head_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _head_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _head_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - check if object exists - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_range, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='head'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class HeadObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def head_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def head_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def head_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def head_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._head_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForhead(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def head( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - ]: ... - - @typing.overload - def head( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def head( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor206, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def head( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._head_object_oapg( - query_params=query_params, - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/__init__.py deleted file mode 100644 index f11fd575dba..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_ref_objects_ls import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_LS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.py deleted file mode 100644 index 50e524ac85f..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.py +++ /dev/null @@ -1,489 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_stats_list import ObjectStatsList -from lakefs_client.model.error import Error - -from . import path - -# Query params -UserMetadataSchema = schemas.BoolSchema -PresignSchema = schemas.BoolSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -DelimiterSchema = schemas.StrSchema -PrefixSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'user_metadata': typing.Union[UserMetadataSchema, bool, ], - 'presign': typing.Union[PresignSchema, bool, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'delimiter': typing.Union[DelimiterSchema, str, ], - 'prefix': typing.Union[PrefixSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_metadata = api_client.QueryParameter( - name="user_metadata", - style=api_client.ParameterStyle.FORM, - schema=UserMetadataSchema, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_delimiter = api_client.QueryParameter( - name="delimiter", - style=api_client.ParameterStyle.FORM, - schema=DelimiterSchema, - explode=True, -) -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = ObjectStatsList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_objects_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_objects_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_objects_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_objects_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list objects under a given prefix - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_user_metadata, - request_query_presign, - request_query_after, - request_query_amount, - request_query_delimiter, - request_query_prefix, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListObjects(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_objects( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_objects( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_objects( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_objects( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_objects_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_objects_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.pyi deleted file mode 100644 index a83342ccbfd..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_ls/get.pyi +++ /dev/null @@ -1,470 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.object_stats_list import ObjectStatsList -from lakefs_client.model.error import Error - -# Query params -UserMetadataSchema = schemas.BoolSchema -PresignSchema = schemas.BoolSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -DelimiterSchema = schemas.StrSchema -PrefixSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'user_metadata': typing.Union[UserMetadataSchema, bool, ], - 'presign': typing.Union[PresignSchema, bool, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - 'delimiter': typing.Union[DelimiterSchema, str, ], - 'prefix': typing.Union[PrefixSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_metadata = api_client.QueryParameter( - name="user_metadata", - style=api_client.ParameterStyle.FORM, - schema=UserMetadataSchema, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -request_query_delimiter = api_client.QueryParameter( - name="delimiter", - style=api_client.ParameterStyle.FORM, - schema=DelimiterSchema, - explode=True, -) -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ObjectStatsList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_objects_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_objects_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_objects_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_objects_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list objects under a given prefix - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_user_metadata, - request_query_presign, - request_query_after, - request_query_amount, - request_query_delimiter, - request_query_prefix, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListObjects(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_objects( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_objects( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_objects( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_objects( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_objects_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_objects_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/__init__.py deleted file mode 100644 index 07e2c63cbc1..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_ref_objects_stat import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_STAT \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.py deleted file mode 100644 index e606a481c5e..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.py +++ /dev/null @@ -1,467 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -from . import path - -# Query params -PathSchema = schemas.StrSchema -UserMetadataSchema = schemas.BoolSchema -PresignSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'user_metadata': typing.Union[UserMetadataSchema, bool, ], - 'presign': typing.Union[PresignSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_user_metadata = api_client.QueryParameter( - name="user_metadata", - style=api_client.ParameterStyle.FORM, - schema=UserMetadataSchema, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor410(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_410 = api_client.OpenApiResponse( - response_cls=ApiResponseFor410, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - '410': _response_for_410, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _stat_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _stat_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _stat_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _stat_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get object metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_user_metadata, - request_query_presign, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class StatObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def stat_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def stat_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def stat_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def stat_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stat_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stat_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.pyi deleted file mode 100644 index 213082e1433..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_stat/get.pyi +++ /dev/null @@ -1,451 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.object_stats import ObjectStats - -# Query params -PathSchema = schemas.StrSchema -UserMetadataSchema = schemas.BoolSchema -PresignSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'user_metadata': typing.Union[UserMetadataSchema, bool, ], - 'presign': typing.Union[PresignSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -request_query_user_metadata = api_client.QueryParameter( - name="user_metadata", - style=api_client.ParameterStyle.FORM, - schema=UserMetadataSchema, - explode=True, -) -request_query_presign = api_client.QueryParameter( - name="presign", - style=api_client.ParameterStyle.FORM, - schema=PresignSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = ObjectStats - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor410(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_410 = api_client.OpenApiResponse( - response_cls=ApiResponseFor410, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _stat_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _stat_object_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _stat_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _stat_object_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get object metadata - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - request_query_user_metadata, - request_query_presign, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class StatObject(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def stat_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def stat_object( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def stat_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def stat_object( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stat_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._stat_object_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/__init__.py deleted file mode 100644 index 3d34785f9e7..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_ref_objects_underlying_properties import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_REF_OBJECTS_UNDERLYING_PROPERTIES \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.py b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.py deleted file mode 100644 index 9c83b0c535b..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.py +++ /dev/null @@ -1,436 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.underlying_object_properties import UnderlyingObjectProperties -from lakefs_client.model.error import Error - -from . import path - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = UnderlyingObjectProperties - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_underlying_properties_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_underlying_properties_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_underlying_properties_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_underlying_properties_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get object properties on underlying storage - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUnderlyingProperties(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_underlying_properties( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_underlying_properties( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_underlying_properties( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_underlying_properties( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_underlying_properties_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_underlying_properties_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.pyi deleted file mode 100644 index 1f473aad110..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_ref_objects_underlying_properties/get.pyi +++ /dev/null @@ -1,421 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.underlying_object_properties import UnderlyingObjectProperties -from lakefs_client.model.error import Error - -# Query params -PathSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'path': typing.Union[PathSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_path = api_client.QueryParameter( - name="path", - style=api_client.ParameterStyle.FORM, - schema=PathSchema, - required=True, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RefSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'ref': typing.Union[RefSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_ref = api_client.PathParameter( - name="ref", - style=api_client.ParameterStyle.SIMPLE, - schema=RefSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = UnderlyingObjectProperties - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_underlying_properties_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_underlying_properties_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_underlying_properties_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_underlying_properties_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get object properties on underlying storage - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_ref, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_path, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUnderlyingProperties(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_underlying_properties( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_underlying_properties( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_underlying_properties( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_underlying_properties( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_underlying_properties_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_underlying_properties_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_restore/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_restore/__init__.py deleted file mode 100644 index 92b7f500955..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_restore/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_restore import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_RESTORE \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.py b/clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.py deleted file mode 100644 index efd37baa29e..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.py +++ /dev/null @@ -1,485 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.refs_dump import RefsDump -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = RefsDump - - -request_body_refs_dump = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Restore repository refs (tags, commits, branches) from object store - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_refs_dump.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RestoreRefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._restore_refs_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._restore_refs_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.pyi deleted file mode 100644 index fe200cd92f0..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_restore/put.pyi +++ /dev/null @@ -1,469 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.refs_dump import RefsDump -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = RefsDump - - -request_body_refs_dump = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _restore_refs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Restore repository refs (tags, commits, branches) from object store - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_refs_dump.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RestoreRefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def restore_refs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._restore_refs_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._restore_refs_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/__init__.py deleted file mode 100644 index 6424df47b19..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_refs_source_ref_merge_destination_branch import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_REFS_SOURCE_REF_MERGE_DESTINATION_BRANCH \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.py b/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.py deleted file mode 100644 index e3b518677a1..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.py +++ /dev/null @@ -1,410 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.find_merge_base_result import FindMergeBaseResult -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -SourceRefSchema = schemas.StrSchema -DestinationBranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'sourceRef': typing.Union[SourceRefSchema, str, ], - 'destinationBranch': typing.Union[DestinationBranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_source_ref = api_client.PathParameter( - name="sourceRef", - style=api_client.ParameterStyle.SIMPLE, - schema=SourceRefSchema, - required=True, -) -request_path_destination_branch = api_client.PathParameter( - name="destinationBranch", - style=api_client.ParameterStyle.SIMPLE, - schema=DestinationBranchSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = FindMergeBaseResult - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_merge_base_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _find_merge_base_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_merge_base_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_merge_base_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - find the merge base for 2 references - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_source_ref, - request_path_destination_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindMergeBase(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_merge_base( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def find_merge_base( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_merge_base( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_merge_base( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_merge_base_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_merge_base_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.pyi deleted file mode 100644 index db4d1ea3eb9..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/get.pyi +++ /dev/null @@ -1,394 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.find_merge_base_result import FindMergeBaseResult -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -SourceRefSchema = schemas.StrSchema -DestinationBranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'sourceRef': typing.Union[SourceRefSchema, str, ], - 'destinationBranch': typing.Union[DestinationBranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_source_ref = api_client.PathParameter( - name="sourceRef", - style=api_client.ParameterStyle.SIMPLE, - schema=SourceRefSchema, - required=True, -) -request_path_destination_branch = api_client.PathParameter( - name="destinationBranch", - style=api_client.ParameterStyle.SIMPLE, - schema=DestinationBranchSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = FindMergeBaseResult - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_merge_base_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _find_merge_base_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_merge_base_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_merge_base_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - find the merge base for 2 references - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_source_ref, - request_path_destination_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindMergeBase(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_merge_base( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def find_merge_base( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_merge_base( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_merge_base( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_merge_base_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_merge_base_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.py b/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.py deleted file mode 100644 index b99eaa362cf..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.py +++ /dev/null @@ -1,568 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.merge import Merge -from lakefs_client.model.error import Error -from lakefs_client.model.merge_result import MergeResult - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -SourceRefSchema = schemas.StrSchema -DestinationBranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'sourceRef': typing.Union[SourceRefSchema, str, ], - 'destinationBranch': typing.Union[DestinationBranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_source_ref = api_client.PathParameter( - name="sourceRef", - style=api_client.ParameterStyle.SIMPLE, - schema=SourceRefSchema, - required=True, -) -request_path_destination_branch = api_client.PathParameter( - name="destinationBranch", - style=api_client.ParameterStyle.SIMPLE, - schema=DestinationBranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = Merge - - -request_body_merge = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = MergeResult - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = MergeResult - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '401': _response_for_401, - '403': _response_for_403, - '404': _response_for_404, - '409': _response_for_409, - '412': _response_for_412, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _merge_into_branch_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _merge_into_branch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _merge_into_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _merge_into_branch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _merge_into_branch_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - merge references - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_source_ref, - request_path_destination_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_merge.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MergeIntoBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def merge_into_branch( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def merge_into_branch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def merge_into_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def merge_into_branch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def merge_into_branch( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._merge_into_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._merge_into_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.pyi deleted file mode 100644 index 8beb72a8f0c..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_refs_source_ref_merge_destination_branch/post.pyi +++ /dev/null @@ -1,549 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.merge import Merge -from lakefs_client.model.error import Error -from lakefs_client.model.merge_result import MergeResult - -# Path params -RepositorySchema = schemas.StrSchema -SourceRefSchema = schemas.StrSchema -DestinationBranchSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'sourceRef': typing.Union[SourceRefSchema, str, ], - 'destinationBranch': typing.Union[DestinationBranchSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_source_ref = api_client.PathParameter( - name="sourceRef", - style=api_client.ParameterStyle.SIMPLE, - schema=SourceRefSchema, - required=True, -) -request_path_destination_branch = api_client.PathParameter( - name="destinationBranch", - style=api_client.ParameterStyle.SIMPLE, - schema=DestinationBranchSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = Merge - - -request_body_merge = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = MergeResult - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor403ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor403(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor403ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_403 = api_client.OpenApiResponse( - response_cls=ApiResponseFor403, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor403ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = MergeResult - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _merge_into_branch_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _merge_into_branch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _merge_into_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _merge_into_branch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _merge_into_branch_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - merge references - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_source_ref, - request_path_destination_branch, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_merge.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class MergeIntoBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def merge_into_branch( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def merge_into_branch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def merge_into_branch( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def merge_into_branch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def merge_into_branch( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._merge_into_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._merge_into_branch_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_tags/__init__.py deleted file mode 100644 index 411da05951d..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_tags import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_TAGS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags/get.py b/clients/python/lakefs_client/paths/repositories_repository_tags/get.py deleted file mode 100644 index 0a2c4620e98..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags/get.py +++ /dev/null @@ -1,453 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref_list import RefList - -from . import path - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_maximum = 1000 - inclusive_minimum = -1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = RefList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_tags_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_tags( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_tags_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_tags_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_tags/get.pyi deleted file mode 100644 index 5af2519b2b2..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags/get.pyi +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref_list import RefList - -# Query params -PrefixSchema = schemas.StrSchema -AfterSchema = schemas.StrSchema - - -class AmountSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'prefix': typing.Union[PrefixSchema, str, ], - 'after': typing.Union[AfterSchema, str, ], - 'amount': typing.Union[AmountSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_prefix = api_client.QueryParameter( - name="prefix", - style=api_client.ParameterStyle.FORM, - schema=PrefixSchema, - explode=True, -) -request_query_after = api_client.QueryParameter( - name="after", - style=api_client.ParameterStyle.FORM, - schema=AfterSchema, - explode=True, -) -request_query_amount = api_client.QueryParameter( - name="amount", - style=api_client.ParameterStyle.FORM, - schema=AmountSchema, - explode=True, -) -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = RefList - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _list_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _list_tags_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _list_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _list_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - list tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_prefix, - request_query_after, - request_query_amount, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ListTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def list_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def list_tags( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def list_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def list_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_tags_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._list_tags_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags/post.py b/clients/python/lakefs_client/paths/repositories_repository_tags/post.py deleted file mode 100644 index e4ddcf1432b..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags/post.py +++ /dev/null @@ -1,513 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.tag_creation import TagCreation -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = TagCreation - - -request_body_tag_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor201ResponseBodyApplicationJson = Ref - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '201': _response_for_201, - '400': _response_for_400, - '401': _response_for_401, - '404': _response_for_404, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create tag - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_tag_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateTag(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_tag_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_tag_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags/post.pyi b/clients/python/lakefs_client/paths/repositories_repository_tags/post.pyi deleted file mode 100644 index 4f7d1bbb9cd..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags/post.pyi +++ /dev/null @@ -1,496 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.tag_creation import TagCreation -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref - -# Path params -RepositorySchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = TagCreation - - -request_body_tag_creation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor201ResponseBodyApplicationJson = Ref - - -@dataclass -class ApiResponseFor201(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor201ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_201 = api_client.OpenApiResponse( - response_cls=ApiResponseFor201, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor201ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_tag_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - create tag - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_tag_creation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateTag(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_tag( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_tag_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor201, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_tag_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/__init__.py b/clients/python/lakefs_client/paths/repositories_repository_tags_tag/__init__.py deleted file mode 100644 index c61914789aa..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.repositories_repository_tags_tag import Api - -from lakefs_client.paths import PathValues - -path = PathValues.REPOSITORIES_REPOSITORY_TAGS_TAG \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.py b/clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.py deleted file mode 100644 index 54513b49bc0..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -TagSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'tag': typing.Union[TagSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_tag = api_client.PathParameter( - name="tag", - style=api_client.ParameterStyle.SIMPLE, - schema=TagSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_tag_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete tag - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_tag, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteTag(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_tag( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.pyi b/clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.pyi deleted file mode 100644 index 8dab57cd717..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/delete.pyi +++ /dev/null @@ -1,358 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Path params -RepositorySchema = schemas.StrSchema -TagSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'tag': typing.Union[TagSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_tag = api_client.PathParameter( - name="tag", - style=api_client.ParameterStyle.SIMPLE, - schema=TagSchema, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_tag_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - delete tag - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_tag, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteTag(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_tag( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.py b/clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.py deleted file mode 100644 index 558580346c4..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref - -from . import path - -# Path params -RepositorySchema = schemas.StrSchema -TagSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'tag': typing.Union[TagSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_tag = api_client.PathParameter( - name="tag", - style=api_client.ParameterStyle.SIMPLE, - schema=TagSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = Ref - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_tag_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get tag - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_tag, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetTag(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_tag( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.pyi b/clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.pyi deleted file mode 100644 index b232d96b415..00000000000 --- a/clients/python/lakefs_client/paths/repositories_repository_tags_tag/get.pyi +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.ref import Ref - -# Path params -RepositorySchema = schemas.StrSchema -TagSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'repository': typing.Union[RepositorySchema, str, ], - 'tag': typing.Union[TagSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_repository = api_client.PathParameter( - name="repository", - style=api_client.ParameterStyle.SIMPLE, - schema=RepositorySchema, - required=True, -) -request_path_tag = api_client.PathParameter( - name="tag", - style=api_client.ParameterStyle.SIMPLE, - schema=TagSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Ref - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_tag_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_tag_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get tag - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_repository, - request_path_tag, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetTag(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_tag( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_tag( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_tag_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/setup_comm_prefs/__init__.py b/clients/python/lakefs_client/paths/setup_comm_prefs/__init__.py deleted file mode 100644 index f3bd79050ce..00000000000 --- a/clients/python/lakefs_client/paths/setup_comm_prefs/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.setup_comm_prefs import Api - -from lakefs_client.paths import PathValues - -path = PathValues.SETUP_COMM_PREFS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/setup_comm_prefs/post.py b/clients/python/lakefs_client/paths/setup_comm_prefs/post.py deleted file mode 100644 index 56e793f11e1..00000000000 --- a/clients/python/lakefs_client/paths/setup_comm_prefs/post.py +++ /dev/null @@ -1,408 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.comm_prefs_input import CommPrefsInput -from lakefs_client.model.error import Error -from lakefs_client.model.next_step import NextStep - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = CommPrefsInput - - -request_body_comm_prefs_input = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = NextStep - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '409': _response_for_409, - '412': _response_for_412, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - setup communications preferences - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_comm_prefs_input.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class SetupCommPrefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_comm_prefs_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_comm_prefs_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/setup_comm_prefs/post.pyi b/clients/python/lakefs_client/paths/setup_comm_prefs/post.pyi deleted file mode 100644 index 486b4d7ec5c..00000000000 --- a/clients/python/lakefs_client/paths/setup_comm_prefs/post.pyi +++ /dev/null @@ -1,400 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.comm_prefs_input import CommPrefsInput -from lakefs_client.model.error import Error -from lakefs_client.model.next_step import NextStep - -# body param -SchemaForRequestBodyApplicationJson = CommPrefsInput - - -request_body_comm_prefs_input = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = NextStep - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor412ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor412(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor412ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_412 = api_client.OpenApiResponse( - response_cls=ApiResponseFor412, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor412ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _setup_comm_prefs_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - setup communications preferences - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_comm_prefs_input.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class SetupCommPrefs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def setup_comm_prefs( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_comm_prefs_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_comm_prefs_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/setup_lakefs/__init__.py b/clients/python/lakefs_client/paths/setup_lakefs/__init__.py deleted file mode 100644 index 1ab4f54468d..00000000000 --- a/clients/python/lakefs_client/paths/setup_lakefs/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.setup_lakefs import Api - -from lakefs_client.paths import PathValues - -path = PathValues.SETUP_LAKEFS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/setup_lakefs/get.py b/clients/python/lakefs_client/paths/setup_lakefs/get.py deleted file mode 100644 index 72e20fe26f8..00000000000 --- a/clients/python/lakefs_client/paths/setup_lakefs/get.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.setup_state import SetupState - -from . import path - -SchemaFor200ResponseBodyApplicationJson = SetupState - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_setup_state_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_setup_state_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_setup_state_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_setup_state_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - check if the lakeFS installation is already set up - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSetupState(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_setup_state( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_setup_state( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_setup_state( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_setup_state( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_setup_state_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_setup_state_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/setup_lakefs/get.pyi b/clients/python/lakefs_client/paths/setup_lakefs/get.pyi deleted file mode 100644 index 77b293625c6..00000000000 --- a/clients/python/lakefs_client/paths/setup_lakefs/get.pyi +++ /dev/null @@ -1,264 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.setup_state import SetupState - -SchemaFor200ResponseBodyApplicationJson = SetupState - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_setup_state_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _get_setup_state_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_setup_state_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_setup_state_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - check if the lakeFS installation is already set up - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetSetupState(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_setup_state( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get_setup_state( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_setup_state( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_setup_state( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_setup_state_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_setup_state_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/setup_lakefs/post.py b/clients/python/lakefs_client/paths/setup_lakefs/post.py deleted file mode 100644 index 17493da9faf..00000000000 --- a/clients/python/lakefs_client/paths/setup_lakefs/post.py +++ /dev/null @@ -1,408 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.credentials_with_secret import CredentialsWithSecret -from lakefs_client.model.setup import Setup -from lakefs_client.model.error import Error - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Setup - - -request_body_setup = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = CredentialsWithSecret - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '409': _response_for_409, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - setup lakeFS and create a first user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_setup.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Setup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/setup_lakefs/post.pyi b/clients/python/lakefs_client/paths/setup_lakefs/post.pyi deleted file mode 100644 index cc9bb41d5e9..00000000000 --- a/clients/python/lakefs_client/paths/setup_lakefs/post.pyi +++ /dev/null @@ -1,400 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.credentials_with_secret import CredentialsWithSecret -from lakefs_client.model.setup import Setup -from lakefs_client.model.error import Error - -# body param -SchemaForRequestBodyApplicationJson = Setup - - -request_body_setup = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = CredentialsWithSecret - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor409ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor409(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor409ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_409 = api_client.OpenApiResponse( - response_cls=ApiResponseFor409, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor409ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _setup_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - setup lakeFS and create a first user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_setup.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Setup(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def setup( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._setup_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/statistics/__init__.py b/clients/python/lakefs_client/paths/statistics/__init__.py deleted file mode 100644 index 55baded9216..00000000000 --- a/clients/python/lakefs_client/paths/statistics/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.statistics import Api - -from lakefs_client.paths import PathValues - -path = PathValues.STATISTICS \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/statistics/post.py b/clients/python/lakefs_client/paths/statistics/post.py deleted file mode 100644 index 017d427d200..00000000000 --- a/clients/python/lakefs_client/paths/statistics/post.py +++ /dev/null @@ -1,408 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.stats_events_list import StatsEventsList - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = StatsEventsList - - -request_body_stats_events_list = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '204': _response_for_204, - '400': _response_for_400, - '401': _response_for_401, - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - post stats events, this endpoint is meant for internal use only - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_stats_events_list.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostStatsEvents(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_stats_events_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_stats_events_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/statistics/post.pyi b/clients/python/lakefs_client/paths/statistics/post.pyi deleted file mode 100644 index 8fbfd026eba..00000000000 --- a/clients/python/lakefs_client/paths/statistics/post.pyi +++ /dev/null @@ -1,393 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error -from lakefs_client.model.stats_events_list import StatsEventsList - -# body param -SchemaForRequestBodyApplicationJson = StatsEventsList - - -request_body_stats_events_list = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor204(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_204 = api_client.OpenApiResponse( - response_cls=ApiResponseFor204, -) -SchemaFor400ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor400ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor400ResponseBodyApplicationJson), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_stats_events_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - post stats events, this endpoint is meant for internal use only - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_stats_events_list.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostStatsEvents(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_stats_events( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_stats_events_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor204, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_stats_events_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/templates_template_location/__init__.py b/clients/python/lakefs_client/paths/templates_template_location/__init__.py deleted file mode 100644 index ed2c9210101..00000000000 --- a/clients/python/lakefs_client/paths/templates_template_location/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.templates_template_location import Api - -from lakefs_client.paths import PathValues - -path = PathValues.TEMPLATES_TEMPLATE_LOCATION \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/templates_template_location/get.py b/clients/python/lakefs_client/paths/templates_template_location/get.py deleted file mode 100644 index 373783e9330..00000000000 --- a/clients/python/lakefs_client/paths/templates_template_location/get.py +++ /dev/null @@ -1,476 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -from . import path - -# Query params - - -class ParamsSchema( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'ParamsSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'params': typing.Union[ParamsSchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_params = api_client.QueryParameter( - name="params", - style=api_client.ParameterStyle.FORM, - schema=ParamsSchema, - explode=True, -) -# Path params -TemplateLocationSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'template_location': typing.Union[TemplateLocationSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_template_location = api_client.PathParameter( - name="template_location", - style=api_client.ParameterStyle.SIMPLE, - schema=TemplateLocationSchema, - required=True, -) -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] - - -class SchemaFor200ResponseBody( - schemas.BinaryBase, - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'binary' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBody': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBody, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - '*/*': api_client.MediaType( - schema=SchemaFor200ResponseBody), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '401': _response_for_401, - '404': _response_for_404, - 'default': _response_for_default, -} -_all_accept_content_types = ( - '*/*', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _expand_template_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _expand_template_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _expand_template_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _expand_template_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_template_location, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_params, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ExpandTemplate(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def expand_template( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def expand_template( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def expand_template( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def expand_template( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._expand_template_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._expand_template_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/templates_template_location/get.pyi b/clients/python/lakefs_client/paths/templates_template_location/get.pyi deleted file mode 100644 index 4859647bb38..00000000000 --- a/clients/python/lakefs_client/paths/templates_template_location/get.pyi +++ /dev/null @@ -1,461 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.error import Error - -# Query params - - -class ParamsSchema( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'ParamsSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'params': typing.Union[ParamsSchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_params = api_client.QueryParameter( - name="params", - style=api_client.ParameterStyle.FORM, - schema=ParamsSchema, - explode=True, -) -# Path params -TemplateLocationSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'template_location': typing.Union[TemplateLocationSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_template_location = api_client.PathParameter( - name="template_location", - style=api_client.ParameterStyle.SIMPLE, - schema=TemplateLocationSchema, - required=True, -) - - -class SchemaFor200ResponseBody( - schemas.BinaryBase, - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'binary' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBody': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBody, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - '*/*': api_client.MediaType( - schema=SchemaFor200ResponseBody), - }, -) -SchemaFor401ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor401(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor401ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_401 = api_client.OpenApiResponse( - response_cls=ApiResponseFor401, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor401ResponseBodyApplicationJson), - }, -) -SchemaFor404ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -SchemaFor0ResponseBodyApplicationJson = Error - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - '*/*', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _expand_template_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _expand_template_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _expand_template_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _expand_template_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_template_location, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_params, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ExpandTemplate(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def expand_template( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def expand_template( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def expand_template( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def expand_template( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._expand_template_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._expand_template_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/user/__init__.py b/clients/python/lakefs_client/paths/user/__init__.py deleted file mode 100644 index cac07c260d0..00000000000 --- a/clients/python/lakefs_client/paths/user/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from lakefs_client.paths.user import Api - -from lakefs_client.paths import PathValues - -path = PathValues.USER \ No newline at end of file diff --git a/clients/python/lakefs_client/paths/user/get.py b/clients/python/lakefs_client/paths/user/get.py deleted file mode 100644 index ff17558bf61..00000000000 --- a/clients/python/lakefs_client/paths/user/get.py +++ /dev/null @@ -1,247 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.current_user import CurrentUser - -from . import path - -_auth = [ - 'basic_auth', - 'cookie_auth', - 'oidc_auth', - 'saml_auth', - 'jwt_token', -] -SchemaFor200ResponseBodyApplicationJson = CurrentUser - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_current_user_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_current_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_current_user_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_current_user_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get current user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCurrentUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_current_user( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_current_user( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_current_user( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_current_user( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_current_user_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_current_user_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/paths/user/get.pyi b/clients/python/lakefs_client/paths/user/get.pyi deleted file mode 100644 index 1cd02700906..00000000000 --- a/clients/python/lakefs_client/paths/user/get.pyi +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from lakefs_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from lakefs_client import schemas # noqa: F401 - -from lakefs_client.model.current_user import CurrentUser - -SchemaFor200ResponseBodyApplicationJson = CurrentUser - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_current_user_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_current_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_current_user_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_current_user_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - get current user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetCurrentUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_current_user( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_current_user( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_current_user( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_current_user( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_current_user_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_current_user_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/clients/python/lakefs_client/rest.py b/clients/python/lakefs_client/rest.py index 890914adfd3..ed38ad22e1a 100644 --- a/clients/python/lakefs_client/rest.py +++ b/clients/python/lakefs_client/rest.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,21 +8,39 @@ Generated by: https://openapi-generator.tech """ + +import io +import json import logging +import re import ssl from urllib.parse import urlencode -import typing -import certifi import urllib3 -from urllib3._collections import HTTPHeaderDict -from lakefs_client.exceptions import ApiException, ApiValueError +from lakefs_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError logger = logging.getLogger(__name__) +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + class RESTClientObject(object): def __init__(self, configuration, pools_size=4, maxsize=None): @@ -40,13 +56,6 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - addition_pool_args = {} if configuration.assert_hostname is not None: addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 @@ -69,7 +78,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, @@ -81,76 +90,78 @@ def __init__(self, configuration, pools_size=4, maxsize=None): num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, **addition_pool_args ) - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): """Perform requests. :param method: http request method :param url: http request url + :param query_params: query parameters in the url :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. """ method = method.upper() assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] - if fields and body: + if post_params and body: raise ApiValueError( - "body parameter cannot be used with fields parameter." + "body parameter cannot be used with post_params parameter." ) - fields = fields or {} + post_params = post_params or {} headers = headers or {} - if timeout: - if isinstance(timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if 'Content-Type' not in headers and body is None: + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' + if query_params: + url += '?' + urlencode(query_params) + if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): + request_body = None + if body is not None: + request_body = json.dumps(body) r = self.pool_manager.request( - method, - url, - preload_content=not stream, + method, url, + body=request_body, + preload_content=_preload_content, timeout=timeout, - headers=headers - ) + headers=headers) elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( method, url, - body=body, - fields=fields, + fields=post_params, encode_multipart=False, - preload_content=not stream, + preload_content=_preload_content, timeout=timeout, headers=headers) elif headers['Content-Type'] == 'multipart/form-data': @@ -160,9 +171,9 @@ def request( del headers['Content-Type'] r = self.pool_manager.request( method, url, - fields=fields, + fields=post_params, encode_multipart=True, - preload_content=not stream, + preload_content=_preload_content, timeout=timeout, headers=headers) # Pass a `string` parameter directly in the body to support @@ -173,7 +184,7 @@ def request( r = self.pool_manager.request( method, url, body=request_body, - preload_content=not stream, + preload_content=_preload_content, timeout=timeout, headers=headers) else: @@ -185,71 +196,98 @@ def request( # For `GET`, `HEAD` else: r = self.pool_manager.request(method, url, - preload_content=not stream, + fields=query_params, + preload_content=_preload_content, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) - if not stream: + if _preload_content: + r = RESTResponse(r) + # log response body logger.debug("response body: %s", r.data) + if not 200 <= r.status <= 299: + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + return r - def GET(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("GET", url, headers=headers, - stream=stream, - timeout=timeout, - fields=fields) + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) - def HEAD(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("HEAD", url, headers=headers, - stream=stream, - timeout=timeout, - fields=fields) + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) - def OPTIONS(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("OPTIONS", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def DELETE(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): return self.request("DELETE", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) - def POST(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("POST", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PUT(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PUT", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PATCH(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PATCH", url, headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/clients/python/lakefs_client/schemas.py b/clients/python/lakefs_client/schemas.py deleted file mode 100644 index a67beb8ed7c..00000000000 --- a/clients/python/lakefs_client/schemas.py +++ /dev/null @@ -1,2476 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -from collections import defaultdict -from datetime import date, datetime, timedelta # noqa: F401 -import functools -import decimal -import io -import re -import types -import typing -import uuid - -from dateutil.parser.isoparser import isoparser, _takes_ascii -import frozendict - -from lakefs_client.exceptions import ( - ApiTypeError, - ApiValueError, -) -from lakefs_client.configuration import ( - Configuration, -) - - -class Unset(object): - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset = Unset() - -none_type = type(None) -file_type = io.IOBase - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(_arg, (io.FileIO, io.BufferedReader)): - if _arg.closed: - raise ApiValueError('Invalid file state; file is closed and must be open') - _arg.close() - inst = super(FileIO, cls).__new__(cls, _arg.name) - super(FileIO, inst).__init__(_arg.name) - return inst - raise ApiValueError('FileIO must be passed _arg which contains the open file') - - def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): - pass - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is defaultdict(set) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k] = d[k] | v - - -class ValidationMetadata(frozendict.frozendict): - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - def __new__( - cls, - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), - from_server: bool = False, - configuration: typing.Optional[Configuration] = None, - seen_classes: typing.FrozenSet[typing.Type] = frozenset(), - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() - ): - """ - Args: - path_to_item: the path to the current data being instantiated. - For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) - This changes from location to location - from_server: whether or not this data came form the server - True when receiving server data - False when instantiating model with client side data not form the server - This does not change from location to location - configuration: the Configuration instance to use - This is needed because in Configuration: - - one can disable validation checking - This does not change from location to location - seen_classes: when deserializing data that matches multiple schemas, this is used to store - the schemas that have been traversed. This is used to stop processing when a cycle is seen. - This changes from location to location - validated_path_to_schemas: stores the already validated schema classes for a given path location - This does not change from location to location - """ - return super().__new__( - cls, - path_to_item=path_to_item, - from_server=from_server, - configuration=configuration, - seen_classes=seen_classes, - validated_path_to_schemas=validated_path_to_schemas - ) - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas = self.validated_path_to_schemas.get(self.path_to_item, set()) - validation_ran_earlier = validated_schemas and cls in validated_schemas - if validation_ran_earlier: - return True - if cls in self.seen_classes: - return True - return False - - @property - def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: - return self.get('path_to_item') - - @property - def from_server(self) -> bool: - return self.get('from_server') - - @property - def configuration(self) -> typing.Optional[Configuration]: - return self.get('configuration') - - @property - def seen_classes(self) -> typing.FrozenSet[typing.Type]: - return self.get('seen_classes') - - @property - def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: - return self.get('validated_path_to_schemas') - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -class Singleton: - """ - Enums and singletons are the same - The same instance is returned for a given key of (cls, _arg) - """ - _instances = {} - - def __new__(cls, _arg: typing.Any, **kwargs): - """ - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, _arg, str(_arg)) - if key not in cls._instances: - if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): - inst = super().__new__(cls) - cls._instances[key] = inst - else: - cls._instances[key] = super().__new__(cls, _arg) - return cls._instances[key] - - def __repr__(self): - if isinstance(self, NoneClass): - return f'<{self.__class__.__name__}: None>' - elif isinstance(self, BoolClass): - if bool(self): - return f'<{self.__class__.__name__}: True>' - return f'<{self.__class__.__name__}: False>' - return f'<{self.__class__.__name__}: {super().__repr__()}>' - - -class classproperty: - - def __init__(self, fget): - self.fget = fget - - def __get__(self, owner_self, owner_cls): - return self.fget(owner_cls) - - -class NoneClass(Singleton): - @classproperty - def NONE(cls): - return cls(None) - - def __bool__(self) -> bool: - return False - - -class BoolClass(Singleton): - @classproperty - def TRUE(cls): - return cls(True) - - @classproperty - def FALSE(cls): - return cls(False) - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -class MetaOapgTyped: - exclusive_maximum: typing.Union[int, float] - inclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - max_items: int - min_items: int - discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] - - - class properties: - # to hold object properties - pass - - additional_properties: typing.Optional[typing.Type['Schema']] - max_properties: int - min_properties: int - all_of: typing.List[typing.Type['Schema']] - one_of: typing.List[typing.Type['Schema']] - any_of: typing.List[typing.Type['Schema']] - not_schema: typing.Type['Schema'] - max_length: int - min_length: int - items: typing.Type['Schema'] - - -class Schema: - """ - the base class of all swagger/openapi schemas/models - """ - __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} - _types: typing.Set[typing.Type] - MetaOapg = MetaOapgTyped - - @staticmethod - def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - @staticmethod - def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: - if isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - return item_cls - - @classmethod - def __type_error_message( - cls, var_value=None, var_name=None, valid_classes=None, key_type=None - ): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - @classmethod - def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): - error_msg = cls.__type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - Schema _validate_oapg - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - - Returns: - path_to_schemas: a map of path to schemas - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - base_class = type(arg) - if base_class not in cls._types: - raise cls.__get_type_error( - arg, - validation_metadata.path_to_item, - cls._types, - key_type=False, - ) - - path_to_schemas = {validation_metadata.path_to_item: set()} - path_to_schemas[validation_metadata.path_to_item].add(cls) - path_to_schemas[validation_metadata.path_to_item].add(base_class) - return path_to_schemas - - @staticmethod - def _process_schema_classes_oapg( - schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] - ): - """ - Processes and mutates schema_classes - If a SomeSchema is a subclass of DictSchema then remove DictSchema because it is already included - """ - if len(schema_classes) < 2: - return - if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes: - schema_classes.remove(UnsetAnyTypeSchema) - x_schema = schema_type_classes & schema_classes - if not x_schema: - return - x_schema = x_schema.pop() - if any(c is not x_schema and issubclass(c, x_schema) for c in schema_classes): - # needed to not have a mro error in get_new_class - schema_classes.remove(x_schema) - - @classmethod - def __get_new_cls( - cls, - arg, - validation_metadata: ValidationMetadata - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: - """ - Make a new dynamic class and return an instance of that class - We are making an instance of cls, but instead of making cls - make a new class, new_cls - which includes dynamic bases including cls - return an instance of that new class - - Dict property + List Item Assignment Use cases: - 1. value is NOT an instance of the required schema class - the value is validated by _validate_oapg - _validate_oapg returns a key value pair - where the key is the path to the item, and the value will be the required manufactured class - made out of the matching schemas - 2. value is an instance of the correct schema type - the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type - for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas - and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned - because value is of the correct type, and validation was run earlier when the instance was created - """ - _path_to_schemas = {} - if validation_metadata.validation_ran_earlier(cls): - add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas = {} - for path, schema_classes in _path_to_schemas.items(): - """ - Use cases - 1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - needs Singleton added - 2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass - Singleton already added - 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - """ - cls._process_schema_classes_oapg(schema_classes) - enum_schema = any( - issubclass(this_cls, EnumBase) for this_cls in schema_classes) - inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) - chosen_schema_classes = schema_classes - inheritable_primitive_type - suffix = tuple(inheritable_primitive_type) - if enum_schema and suffix[0] not in {NoneClass, BoolClass}: - suffix = (Singleton,) + suffix - - used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix - mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) - path_to_schemas[path] = mfg_cls - - return path_to_schemas - - @classmethod - def _get_new_instance_without_conversion_oapg( - cls, - arg: typing.Any, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - # We have a Dynamic class and we are making an instance of it - if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): - properties = cls._get_properties_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, properties) - elif issubclass(cls, tuple) and issubclass(cls, ListBase): - items = cls._get_items_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, items) - """ - str = openapi str, date, and datetime - decimal.Decimal = openapi int and float - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return super(Schema, cls).__new__(cls, arg) - - @classmethod - def from_openapi_data_oapg( - cls, - arg: typing.Union[ - str, - date, - datetime, - int, - float, - decimal.Decimal, - bool, - None, - 'Schema', - dict, - frozendict.frozendict, - tuple, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - _configuration: typing.Optional[Configuration] - ): - """ - Schema from_openapi_data_oapg - """ - from_server = True - validated_path_to_schemas = {} - arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) - validation_metadata = ValidationMetadata( - from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) - path_to_schemas = cls.__get_new_cls(arg, validation_metadata) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion_oapg( - arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - - @staticmethod - def __remove_unsets(kwargs): - return {key: val for key, val in kwargs.items() if val is not unset} - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): - """ - Schema __new__ - - Args: - _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - _configuration: contains the Configuration that enables json schema validation keywords - like minItems, minLength etc - - Note: double underscores are used here because pycharm thinks that these variables - are instance properties if they are named normally :( - """ - __kwargs = cls.__remove_unsets(kwargs) - if not _args and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and _args and not isinstance(_args[0], dict): - __arg = _args[0] - else: - __arg = cls.__get_input_dict(*_args, **__kwargs) - __from_server = False - __validated_path_to_schemas = {} - __arg = cast_to_allowed_types( - __arg, __from_server, __validated_path_to_schemas) - __validation_metadata = ValidationMetadata( - configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) - __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) - __new_cls = __path_to_schemas[__validation_metadata.path_to_item] - return __new_cls._get_new_instance_without_conversion_oapg( - __arg, - __validation_metadata.path_to_item, - __path_to_schemas - ) - - def __init__( - self, - *_args: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset - ] - ): - """ - this is needed to fix 'Unexpected argument' warning in pycharm - this code does nothing because all Schema instances are immutable - this means that all input data is passed into and used in new, and after the new instance is made - no new attributes are assigned and init is not used - """ - pass - -""" -import itertools -data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') -type_to_cls = { - 'None': 'NoneClass', - 'FrozenDict': 'frozendict.frozendict', - 'Tuple': 'tuple', - 'Str': 'str', - 'Decimal': 'decimal.Decimal', - 'Bool': 'BoolClass' -} -cls_tuples = [v for v in itertools.combinations(data_types, 5)] -typed_classes = [f"class {''.join(cls_tuple)}Mixin({', '.join(type_to_cls[typ] for typ in cls_tuple)}):\n pass" for cls_tuple in cls_tuples] -for cls in typed_classes: - print(cls) -object_classes = [f"{''.join(cls_tuple)}Mixin = object" for cls_tuple in cls_tuples] -for cls in object_classes: - print(cls) -""" -if typing.TYPE_CHECKING: - # qty 1 - NoneMixin = NoneClass - FrozenDictMixin = frozendict.frozendict - TupleMixin = tuple - StrMixin = str - DecimalMixin = decimal.Decimal - BoolMixin = BoolClass - BytesMixin = bytes - FileMixin = FileIO - # qty 2 - class BinaryMixin(bytes, FileIO): - pass - class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): - pass - class NoneTupleMixin(NoneClass, tuple): - pass - class NoneStrMixin(NoneClass, str): - pass - class NoneDecimalMixin(NoneClass, decimal.Decimal): - pass - class NoneBoolMixin(NoneClass, BoolClass): - pass - class FrozenDictTupleMixin(frozendict.frozendict, tuple): - pass - class FrozenDictStrMixin(frozendict.frozendict, str): - pass - class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): - pass - class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): - pass - class TupleStrMixin(tuple, str): - pass - class TupleDecimalMixin(tuple, decimal.Decimal): - pass - class TupleBoolMixin(tuple, BoolClass): - pass - class StrDecimalMixin(str, decimal.Decimal): - pass - class StrBoolMixin(str, BoolClass): - pass - class DecimalBoolMixin(decimal.Decimal, BoolClass): - pass - # qty 3 - class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): - pass - class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): - pass - class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): - pass - class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): - pass - class NoneTupleStrMixin(NoneClass, tuple, str): - pass - class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): - pass - class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): - pass - class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): - pass - class NoneStrBoolMixin(NoneClass, str, BoolClass): - pass - class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): - pass - class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): - pass - class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): - pass - class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): - pass - class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): - pass - class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalMixin(tuple, str, decimal.Decimal): - pass - class TupleStrBoolMixin(tuple, str, BoolClass): - pass - class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): - pass - class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): - pass - # qty 4 - class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): - pass - class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): - pass - class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): - pass - class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): - pass - class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): - pass - class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): - pass - class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): - pass - class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): - pass - class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): - pass - class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): - pass - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): - pass - class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): - pass -else: - # qty 1 - class NoneMixin: - _types = {NoneClass} - class FrozenDictMixin: - _types = {frozendict.frozendict} - class TupleMixin: - _types = {tuple} - class StrMixin: - _types = {str} - class DecimalMixin: - _types = {decimal.Decimal} - class BoolMixin: - _types = {BoolClass} - class BytesMixin: - _types = {bytes} - class FileMixin: - _types = {FileIO} - # qty 2 - class BinaryMixin: - _types = {bytes, FileIO} - class NoneFrozenDictMixin: - _types = {NoneClass, frozendict.frozendict} - class NoneTupleMixin: - _types = {NoneClass, tuple} - class NoneStrMixin: - _types = {NoneClass, str} - class NoneDecimalMixin: - _types = {NoneClass, decimal.Decimal} - class NoneBoolMixin: - _types = {NoneClass, BoolClass} - class FrozenDictTupleMixin: - _types = {frozendict.frozendict, tuple} - class FrozenDictStrMixin: - _types = {frozendict.frozendict, str} - class FrozenDictDecimalMixin: - _types = {frozendict.frozendict, decimal.Decimal} - class FrozenDictBoolMixin: - _types = {frozendict.frozendict, BoolClass} - class TupleStrMixin: - _types = {tuple, str} - class TupleDecimalMixin: - _types = {tuple, decimal.Decimal} - class TupleBoolMixin: - _types = {tuple, BoolClass} - class StrDecimalMixin: - _types = {str, decimal.Decimal} - class StrBoolMixin: - _types = {str, BoolClass} - class DecimalBoolMixin: - _types = {decimal.Decimal, BoolClass} - # qty 3 - class NoneFrozenDictTupleMixin: - _types = {NoneClass, frozendict.frozendict, tuple} - class NoneFrozenDictStrMixin: - _types = {NoneClass, frozendict.frozendict, str} - class NoneFrozenDictDecimalMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal} - class NoneFrozenDictBoolMixin: - _types = {NoneClass, frozendict.frozendict, BoolClass} - class NoneTupleStrMixin: - _types = {NoneClass, tuple, str} - class NoneTupleDecimalMixin: - _types = {NoneClass, tuple, decimal.Decimal} - class NoneTupleBoolMixin: - _types = {NoneClass, tuple, BoolClass} - class NoneStrDecimalMixin: - _types = {NoneClass, str, decimal.Decimal} - class NoneStrBoolMixin: - _types = {NoneClass, str, BoolClass} - class NoneDecimalBoolMixin: - _types = {NoneClass, decimal.Decimal, BoolClass} - class FrozenDictTupleStrMixin: - _types = {frozendict.frozendict, tuple, str} - class FrozenDictTupleDecimalMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal} - class FrozenDictTupleBoolMixin: - _types = {frozendict.frozendict, tuple, BoolClass} - class FrozenDictStrDecimalMixin: - _types = {frozendict.frozendict, str, decimal.Decimal} - class FrozenDictStrBoolMixin: - _types = {frozendict.frozendict, str, BoolClass} - class FrozenDictDecimalBoolMixin: - _types = {frozendict.frozendict, decimal.Decimal, BoolClass} - class TupleStrDecimalMixin: - _types = {tuple, str, decimal.Decimal} - class TupleStrBoolMixin: - _types = {tuple, str, BoolClass} - class TupleDecimalBoolMixin: - _types = {tuple, decimal.Decimal, BoolClass} - class StrDecimalBoolMixin: - _types = {str, decimal.Decimal, BoolClass} - # qty 4 - class NoneFrozenDictTupleStrMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str} - class NoneFrozenDictTupleDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} - class NoneFrozenDictTupleBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} - class NoneFrozenDictStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} - class NoneFrozenDictStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, BoolClass} - class NoneFrozenDictDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalMixin: - _types = {NoneClass, tuple, str, decimal.Decimal} - class NoneTupleStrBoolMixin: - _types = {NoneClass, tuple, str, BoolClass} - class NoneTupleDecimalBoolMixin: - _types = {NoneClass, tuple, decimal.Decimal, BoolClass} - class NoneStrDecimalBoolMixin: - _types = {NoneClass, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal} - class FrozenDictTupleStrBoolMixin: - _types = {frozendict.frozendict, tuple, str, BoolClass} - class FrozenDictTupleDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class FrozenDictStrDecimalBoolMixin: - _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} - class TupleStrDecimalBoolMixin: - _types = {tuple, str, decimal.Decimal, BoolClass} - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} - class NoneFrozenDictTupleStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} - class NoneFrozenDictTupleDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class NoneFrozenDictStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalBoolMixin: - _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} - - -class ValidatorBase: - @staticmethod - def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - Note: the suffix _oapg stands for openapi python (experimental) generator and - it has been added to prevent collisions with other methods and properties - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - @staticmethod - def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class EnumBase: - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - EnumBase _validate_oapg - Validates that arg is in the enum's allowed values - """ - try: - cls.MetaOapg.enum_value_to_name[arg] - except KeyError: - raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class BoolBase: - def is_true_oapg(self) -> bool: - """ - A replacement for x is True - True if the instance is a BoolClass True Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) - - def is_false_oapg(self) -> bool: - """ - A replacement for x is False - True if the instance is a BoolClass False Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) is False - - -class NoneBase: - def is_none_oapg(self) -> bool: - """ - A replacement for x is None - True if the instance is a NoneClass None Singleton - """ - if issubclass(self.__class__, NoneClass): - return True - return False - - -class StrBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_str_oapg(self) -> str: - return self - - @property - def as_date_oapg(self) -> date: - raise Exception('not implemented') - - @property - def as_datetime_oapg(self) -> datetime: - raise Exception('not implemented') - - @property - def as_decimal_oapg(self) -> decimal.Decimal: - raise Exception('not implemented') - - @property - def as_uuid_oapg(self) -> uuid.UUID: - raise Exception('not implemented') - - @classmethod - def __check_str_validations( - cls, - arg: str, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_length') and - len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=cls.MetaOapg.max_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_length') and - len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=cls.MetaOapg.min_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'regex')): - for regex_dict in cls.MetaOapg.regex: - flags = regex_dict.get('flags', 0) - if not re.search(regex_dict['pattern'], arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - StrBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, str): - cls.__check_str_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class UUIDBase: - @property - @functools.lru_cache() - def as_uuid_oapg(self) -> uuid.UUID: - return uuid.UUID(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - uuid.UUID(arg) - return True - except ValueError: - raise ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - UUIDBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class CustomIsoparser(isoparser): - - @_takes_ascii - def parse_isodatetime(self, dt_str): - components, pos = self._parse_isodate(dt_str) - if len(dt_str) > pos: - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - components += self._parse_isotime(dt_str[pos + 1:]) - else: - raise ValueError('String contains unknown ISO components') - - if len(components) > 3 and components[3] == 24: - components[3] = 0 - return datetime(*components) + timedelta(days=1) - - if len(components) <= 3: - raise ValueError('Value is not a datetime') - - return datetime(*components) - - @_takes_ascii - def parse_isodate(self, datestr): - components, pos = self._parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return date(*components) - - -DEFAULT_ISOPARSER = CustomIsoparser() - - -class DateBase: - @property - @functools.lru_cache() - def as_date_oapg(self) -> date: - return DEFAULT_ISOPARSER.parse_isodate(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodate(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - DateBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DateTimeBase: - @property - @functools.lru_cache() - def as_datetime_oapg(self) -> datetime: - return DEFAULT_ISOPARSER.parse_isodatetime(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodatetime(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DateTimeBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DecimalBase: - """ - A class for storing decimals that are sent over the wire as strings - These schemas must remain based on StrBase rather than NumberBase - because picking base classes must be deterministic - """ - - @property - @functools.lru_cache() - def as_decimal_oapg(self) -> decimal.Decimal: - return decimal.Decimal(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - decimal.Decimal(arg) - return True - except decimal.InvalidOperation: - raise ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DecimalBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class NumberBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - """ - Note: for some numbers like 9.0 they could be represented as an - integer but our code chooses to store them as - >>> Decimal('9.0').as_tuple() - DecimalTuple(sign=0, digits=(9, 0), exponent=-1) - so we can tell that the value came from a float and convert it back to a float - during later serialization - """ - if self.as_tuple().exponent < 0: - # this could be represented as an integer but should be represented as a float - # because that's what it was serialized from - raise ApiValueError(f'{self} is not an integer') - self._as_int = int(self) - return self._as_int - - @property - def as_float_oapg(self) -> float: - try: - return self._as_float - except AttributeError: - if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not a float') - self._as_float = float(self) - return self._as_float - - @classmethod - def __check_numeric_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if cls._is_json_validation_enabled_oapg('multipleOf', - validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): - multiple_of_value = cls.MetaOapg.multiple_of - if (not (float(arg) / multiple_of_value).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of_value, - path_to_item=validation_metadata.path_to_item - ) - - checking_max_or_min_values = any( - hasattr(cls.MetaOapg, validation_key) for validation_key in { - 'exclusive_maximum', - 'inclusive_maximum', - 'exclusive_minimum', - 'inclusive_minimum', - } - ) - if not checking_max_or_min_values: - return - - if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_maximum') and - arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_maximum') and - arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=cls.MetaOapg.inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_minimum') and - arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_minimum') and - arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=cls.MetaOapg.inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - NumberBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, decimal.Decimal): - cls.__check_numeric_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class ListBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @classmethod - def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for items are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - list_items: the input list of items - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - - # if we have definitions for an items schema, use it - # otherwise accept anything - item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) - item_cls = cls._get_class_oapg(item_cls) - path_to_schemas = {} - for i, value in enumerate(list_items): - item_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=validation_metadata.path_to_item+(i,), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate_oapg( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_tuple_validations( - cls, arg, - validation_metadata: ValidationMetadata): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_items') and - len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=cls.MetaOapg.max_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_items') and - len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=cls.MetaOapg.min_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): - unique_items = set(arg) - if len(arg) > len(unique_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - ListBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, tuple): - cls.__check_tuple_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, tuple): - return _path_to_schemas - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_items_oapg( - cls: 'Schema', - arg: typing.List[typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - ''' - ListBase _get_items_oapg - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion_oapg( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return cast_items - - -class Discriminable: - MetaOapg: MetaOapgTyped - - @classmethod - def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): - if not args or args and disc_property_name not in args[0]: - # The input data does not contain the discriminator property - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - @classmethod - def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - if not hasattr(cls.MetaOapg, 'discriminator'): - return None - disc = cls.MetaOapg.discriminator() - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not hasattr(cls, 'MetaOapg'): - return None - elif not ( - hasattr(cls.MetaOapg, 'all_of') or - hasattr(cls.MetaOapg, 'one_of') or - hasattr(cls.MetaOapg, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls.MetaOapg, 'all_of'): - for allof_cls in cls.MetaOapg.all_of(): - discriminated_cls = allof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'one_of'): - for oneof_cls in cls.MetaOapg.one_of(): - discriminated_cls = oneof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'any_of'): - for anyof_cls in cls.MetaOapg.any_of(): - discriminated_cls = anyof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -class DictBase(Discriminable, ValidatorBase): - - @classmethod - def __validate_arg_presence(cls, arg): - """ - Ensures that: - - all required arguments are passed in - - the input variable names are valid - - present in properties or - - accepted because additionalProperties exists - Exceptions will be raised if: - - invalid arguments were passed in - - a var_name is invalid if additional_properties == NotAnyTypeSchema - and var_name not in properties.__annotations__ - - required properties were not passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - seen_required_properties = set() - invalid_arguments = [] - required_property_names = getattr(cls.MetaOapg, 'required', set()) - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name in arg: - if property_name in required_property_names: - seen_required_properties.add(property_name) - elif property_name in property_annotations: - continue - elif additional_properties is not NotAnyTypeSchema: - continue - else: - invalid_arguments.append(property_name) - missing_required_arguments = list(required_property_names - seen_required_properties) - if missing_required_arguments: - missing_required_arguments.sort() - raise ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - if invalid_arguments: - invalid_arguments.sort() - raise ApiTypeError( - "{} was passed {} invalid argument{}: {}".format( - cls.__name__, - len(invalid_arguments), - "s" if len(invalid_arguments) > 1 else "", - invalid_arguments - ) - ) - - @classmethod - def __validate_args(cls, arg, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for properties are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - path_to_schemas = {} - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name, value in arg.items(): - path_to_item = validation_metadata.path_to_item+(property_name,) - if property_name in property_annotations: - schema = property_annotations[property_name] - elif additional_properties is not NotAnyTypeSchema: - if additional_properties is UnsetAnyTypeSchema: - """ - If additionalProperties is unset and this path_to_item does not yet have - any validations on it, validate it. - If it already has validations on it, skip this validation. - """ - if path_to_item in path_to_schemas: - continue - schema = additional_properties - else: - raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( - value, cls, validation_metadata.path_to_item+(property_name,) - )) - schema = cls._get_class_oapg(schema) - arg_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=path_to_item, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_dict_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_properties') and - len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=cls.MetaOapg.max_properties, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_properties') and - len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=cls.MetaOapg.min_properties, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DictBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, frozendict.frozendict): - cls.__check_dict_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, frozendict.frozendict): - return _path_to_schemas - cls.__validate_arg_presence(arg) - other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - try: - discriminator = cls.MetaOapg.discriminator() - except AttributeError: - return _path_to_schemas - # discriminator exists - disc_prop_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if updated_vm.validation_ran_earlier(discriminated_cls): - add_deeper_validated_schemas(updated_vm, _path_to_schemas) - return _path_to_schemas - other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_properties_oapg( - cls, - arg: typing.Dict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - """ - DictBase _get_properties_oapg, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion_oapg( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return dict_items - - def __setattr__(self, name: str, value: typing.Any): - if not isinstance(self, FileIO): - raise AttributeError('property setting not supported on immutable instances') - - def __getattr__(self, name: str): - """ - for instance.name access - Properties are only type hinted for required properties - so that hasattr(instance, 'optionalProp') is False when that key is not present - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - if name not in self.__class__.__annotations__: - raise AttributeError(f"{self} has no attribute '{name}'") - try: - value = self[name] - return value - except KeyError as ex: - raise AttributeError(str(ex)) - - def __getitem__(self, name: str): - """ - dict_instance[name] accessor - key errors thrown - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - return super().__getitem__(name) - - def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: - # dict_instance[name] accessor - if not isinstance(self, frozendict.frozendict): - raise NotImplementedError() - try: - return super().__getitem__(name) - except KeyError: - return unset - - -def cast_to_allowed_types( - arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), -) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - if isinstance(arg, Schema): - # store the already run validations - schema_classes = set() - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) - validated_path_to_schemas[path_to_item] = schema_classes - - type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - return str(arg) - elif isinstance(arg, (dict, frozendict.frozendict)): - return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) - elif isinstance(arg, (bool, BoolClass)): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - if arg: - return BoolClass.TRUE - return BoolClass.FALSE - elif isinstance(arg, int): - return decimal.Decimal(arg) - elif isinstance(arg, float): - decimal_from_float = decimal.Decimal(arg) - if decimal_from_float.as_integer_ratio()[1] == 1: - # 9.0 -> Decimal('9.0') - # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return decimal.Decimal(str(decimal_from_float)+'.0') - return decimal_from_float - elif isinstance(arg, (tuple, list)): - return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) - elif isinstance(arg, (none_type, NoneClass)): - return NoneClass.NONE - elif isinstance(arg, (date, datetime)): - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, decimal.Decimal): - return decimal.Decimal(arg) - elif isinstance(arg, bytes): - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - return FileIO(arg) - raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class ComposedBase(Discriminable): - - @classmethod - def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): - path_to_schemas = defaultdict(set) - for allof_cls in cls.MetaOapg.all_of(): - if validation_metadata.validation_ran_earlier(allof_cls): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __get_oneof_class( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata, - ): - oneof_classes = [] - path_to_schemas = defaultdict(set) - for oneof_cls in cls.MetaOapg.one_of(): - if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(oneof_cls) - continue - if validation_metadata.validation_ran_earlier(oneof_cls): - oneof_classes.append(oneof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and oneof_cls is discriminated_cls: - raise ex - continue - oneof_classes.append(oneof_cls) - if not oneof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the oneOf schemas matched the input data.".format(cls) - ) - elif len(oneof_classes) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. Multiple " - "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) - ) - # exactly one class matches - return path_to_schemas - - @classmethod - def __get_anyof_classes( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata - ): - anyof_classes = [] - path_to_schemas = defaultdict(set) - for anyof_cls in cls.MetaOapg.any_of(): - if validation_metadata.validation_ran_earlier(anyof_cls): - anyof_classes.append(anyof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and anyof_cls is discriminated_cls: - raise ex - continue - anyof_classes.append(anyof_cls) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - ComposedBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - # validation checking on types, validations, and enums - path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - - # process composed schema - discriminator = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): - discriminator = cls.MetaOapg.discriminator() - discriminated_cls = None - if discriminator and arg and isinstance(arg, frozendict.frozendict): - disc_property_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) - # get discriminated_cls by looking at the dict in the current class - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( - arg[disc_property_name], - cls.__name__, - disc_property_name, - list(discriminator[disc_property_name].keys()), - updated_vm.path_to_item + (disc_property_name,) - ) - ) - - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): - other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): - other_path_to_schemas = cls.__get_oneof_class( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): - other_path_to_schemas = cls.__get_anyof_classes( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - not_cls = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): - not_cls = cls.MetaOapg.not_schema - not_cls = cls._get_class_oapg(not_cls) - if not_cls: - other_path_to_schemas = None - not_exception = ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_cls.__name__, - ) - ) - if updated_vm.validation_ran_earlier(not_cls): - raise not_exception - - try: - other_path_to_schemas = not_cls._validate_oapg(arg, validation_metadata=updated_vm) - except (ApiValueError, ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - - if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): - # TODO use an exception from this package here - add_deeper_validated_schemas(updated_vm, path_to_schemas) - assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] - return path_to_schemas - - -# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase -class ComposedSchema( - ComposedBase, - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolMixin -): - @classmethod - def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): - if not args: - if not kwargs: - raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) - args = (kwargs, ) - return super().from_openapi_data_oapg(args[0], _configuration=_configuration) - - -class ListSchema( - ListBase, - Schema, - TupleMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NoneSchema( - NoneBase, - Schema, - NoneMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: None, **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NumberSchema( - NumberBase, - Schema, - DecimalMixin -): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class IntBase: - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - self._as_int = int(self) - return self._as_int - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - - denominator = arg.as_integer_ratio()[-1] - if denominator != 1: - raise ApiValueError( - "Invalid value '{}' for type integer at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - IntBase _validate_oapg - TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class IntSchema(IntBase, NumberSchema): - - @classmethod - def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class Int32Base: - __inclusive_minimum = decimal.Decimal(-2147483648) - __inclusive_maximum = decimal.Decimal(2147483647) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int32Schema( - Int32Base, - IntSchema -): - pass - - -class Int64Base: - __inclusive_minimum = decimal.Decimal(-9223372036854775808) - __inclusive_maximum = decimal.Decimal(9223372036854775807) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int64Schema( - Int64Base, - IntSchema -): - pass - - -class Float32Base: - __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) - __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Float32Schema( - Float32Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class Float64Base: - __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) - __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - -class Float64Schema( - Float64Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - # todo check format - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class StrSchema( - StrBase, - Schema, - StrMixin -): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class UUIDSchema(UUIDBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateSchema(DateBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateTimeSchema(DateTimeBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DecimalSchema(DecimalBase, StrSchema): - - def __new__(cls, _arg: str, **kwargs: Configuration): - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().__new__(cls, _arg, **kwargs) - - -class BytesSchema( - Schema, - BytesMixin -): - """ - this class will subclass bytes and is immutable - """ - def __new__(cls, _arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class FileSchema( - Schema, - FileMixin -): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class BinaryBase: - pass - - -class BinarySchema( - ComposedBase, - BinaryBase, - Schema, - BinaryMixin -): - class MetaOapg: - @staticmethod - def one_of(): - return [ - BytesSchema, - FileSchema, - ] - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, _arg) - - -class BoolSchema( - BoolBase, - Schema, - BoolMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, _arg, **kwargs) - - -class AnyTypeSchema( - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolFileBytesMixin -): - # Python representation of a schema defined as true or {} - pass - - -class UnsetAnyTypeSchema(AnyTypeSchema): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - - -class NotAnyTypeSchema( - ComposedSchema, -): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - - class MetaOapg: - not_schema = AnyTypeSchema - - def __new__( - cls, - *_args, - _configuration: typing.Optional[Configuration] = None, - ) -> 'NotAnyTypeSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - -class DictSchema( - DictBase, - Schema, - FrozenDictMixin -): - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *_args, **kwargs) - - -schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} - - -@functools.lru_cache() -def get_new_class( - class_name: str, - bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] -) -> typing.Type[Schema]: - """ - Returns a new class that is made with the subclass bases - """ - new_cls: typing.Type[Schema] = type(class_name, bases, {}) - return new_cls - - -LOG_CACHE_USAGE = False - - -def log_cache_usage(cache_fn): - if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/clients/python/requirements.txt b/clients/python/requirements.txt index 3cb6612669d..96947f60408 100644 --- a/clients/python/requirements.txt +++ b/clients/python/requirements.txt @@ -1,6 +1,3 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -python-dateutil ~= 2.7.0 +python_dateutil >= 2.5.3 setuptools >= 21.0.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 1.26.7 +urllib3 >= 1.25.3 diff --git a/clients/python/setup.py b/clients/python/setup.py index 09e1249edcb..cae2d6936c0 100644 --- a/clients/python/setup.py +++ b/clients/python/setup.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + from setuptools import setup, find_packages # noqa: H301 NAME = "lakefs-client" @@ -22,14 +21,13 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "certifi >= 14.5.14", - "frozendict ~= 2.3.4", - "python-dateutil ~= 2.7.0", - "setuptools >= 21.0.0", - "typing_extensions ~= 4.3.0", - "urllib3 ~= 1.26.7", + "urllib3 >= 1.25.3", + "python-dateutil", ] +with open('README.md') as f: + long_description = f.read() + setup( name=NAME, version=VERSION, @@ -38,12 +36,11 @@ author_email="services@treeverse.io", url="https://github.com/treeverse/lakeFS/tree/master/clients/python", keywords=["OpenAPI", "OpenAPI-Generator", "lakeFS API"], - python_requires=">=3.7", + python_requires=">=3.6", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="Apache 2.0", - long_description="""\ - lakeFS HTTP API # noqa: E501 - """ + long_description=long_description, + long_description_content_type='text/markdown' ) diff --git a/clients/python/test-requirements.txt b/clients/python/test-requirements.txt index 2d88b034192..bb4f22bb7a6 100644 --- a/clients/python/test-requirements.txt +++ b/clients/python/test-requirements.txt @@ -1,3 +1 @@ -pytest~=4.6.7 # needed for python 3.4 pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 diff --git a/clients/python/test/test_models/test_access_key_credentials.py b/clients/python/test/test_access_key_credentials.py similarity index 59% rename from clients/python/test/test_models/test_access_key_credentials.py rename to clients/python/test/test_access_key_credentials.py index fbc608d16b6..738b9cadfcd 100644 --- a/clients/python/test/test_models/test_access_key_credentials.py +++ b/clients/python/test/test_access_key_credentials.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.access_key_credentials import AccessKeyCredentials -from lakefs_client import configuration class TestAccessKeyCredentials(unittest.TestCase): """AccessKeyCredentials unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessKeyCredentials(self): + """Test AccessKeyCredentials""" + # FIXME: construct object with mandatory attributes with example values + # model = AccessKeyCredentials() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_action_run.py b/clients/python/test/test_action_run.py similarity index 59% rename from clients/python/test/test_models/test_action_run.py rename to clients/python/test/test_action_run.py index 98cc7829bd8..7d5eb3ac29e 100644 --- a/clients/python/test/test_models/test_action_run.py +++ b/clients/python/test/test_action_run.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.action_run import ActionRun -from lakefs_client import configuration class TestActionRun(unittest.TestCase): """ActionRun unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionRun(self): + """Test ActionRun""" + # FIXME: construct object with mandatory attributes with example values + # model = ActionRun() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_action_run_list.py b/clients/python/test/test_action_run_list.py new file mode 100644 index 00000000000..789b5aadec5 --- /dev/null +++ b/clients/python/test/test_action_run_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.action_run import ActionRun +from lakefs_client.model.pagination import Pagination +globals()['ActionRun'] = ActionRun +globals()['Pagination'] = Pagination +from lakefs_client.model.action_run_list import ActionRunList + + +class TestActionRunList(unittest.TestCase): + """ActionRunList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionRunList(self): + """Test ActionRunList""" + # FIXME: construct object with mandatory attributes with example values + # model = ActionRunList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_actions_api.py b/clients/python/test/test_actions_api.py new file mode 100644 index 00000000000..cc3757ecabe --- /dev/null +++ b/clients/python/test/test_actions_api.py @@ -0,0 +1,57 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.actions_api import ActionsApi # noqa: E501 + + +class TestActionsApi(unittest.TestCase): + """ActionsApi unit test stubs""" + + def setUp(self): + self.api = ActionsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_run(self): + """Test case for get_run + + get a run # noqa: E501 + """ + pass + + def test_get_run_hook_output(self): + """Test case for get_run_hook_output + + get run hook output # noqa: E501 + """ + pass + + def test_list_repository_runs(self): + """Test case for list_repository_runs + + list runs # noqa: E501 + """ + pass + + def test_list_run_hooks(self): + """Test case for list_run_hooks + + list run hooks # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_auth_api.py b/clients/python/test/test_auth_api.py new file mode 100644 index 00000000000..04428563b47 --- /dev/null +++ b/clients/python/test/test_auth_api.py @@ -0,0 +1,253 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.auth_api import AuthApi # noqa: E501 + + +class TestAuthApi(unittest.TestCase): + """AuthApi unit test stubs""" + + def setUp(self): + self.api = AuthApi() # noqa: E501 + + def tearDown(self): + pass + + def test_add_group_membership(self): + """Test case for add_group_membership + + add group membership # noqa: E501 + """ + pass + + def test_attach_policy_to_group(self): + """Test case for attach_policy_to_group + + attach policy to group # noqa: E501 + """ + pass + + def test_attach_policy_to_user(self): + """Test case for attach_policy_to_user + + attach policy to user # noqa: E501 + """ + pass + + def test_create_credentials(self): + """Test case for create_credentials + + create credentials # noqa: E501 + """ + pass + + def test_create_group(self): + """Test case for create_group + + create group # noqa: E501 + """ + pass + + def test_create_policy(self): + """Test case for create_policy + + create policy # noqa: E501 + """ + pass + + def test_create_user(self): + """Test case for create_user + + create user # noqa: E501 + """ + pass + + def test_delete_credentials(self): + """Test case for delete_credentials + + delete credentials # noqa: E501 + """ + pass + + def test_delete_group(self): + """Test case for delete_group + + delete group # noqa: E501 + """ + pass + + def test_delete_group_membership(self): + """Test case for delete_group_membership + + delete group membership # noqa: E501 + """ + pass + + def test_delete_policy(self): + """Test case for delete_policy + + delete policy # noqa: E501 + """ + pass + + def test_delete_user(self): + """Test case for delete_user + + delete user # noqa: E501 + """ + pass + + def test_detach_policy_from_group(self): + """Test case for detach_policy_from_group + + detach policy from group # noqa: E501 + """ + pass + + def test_detach_policy_from_user(self): + """Test case for detach_policy_from_user + + detach policy from user # noqa: E501 + """ + pass + + def test_forgot_password(self): + """Test case for forgot_password + + forgot password request initiates the password reset process # noqa: E501 + """ + pass + + def test_get_auth_capabilities(self): + """Test case for get_auth_capabilities + + list authentication capabilities supported # noqa: E501 + """ + pass + + def test_get_credentials(self): + """Test case for get_credentials + + get credentials # noqa: E501 + """ + pass + + def test_get_current_user(self): + """Test case for get_current_user + + get current user # noqa: E501 + """ + pass + + def test_get_group(self): + """Test case for get_group + + get group # noqa: E501 + """ + pass + + def test_get_policy(self): + """Test case for get_policy + + get policy # noqa: E501 + """ + pass + + def test_get_user(self): + """Test case for get_user + + get user # noqa: E501 + """ + pass + + def test_list_group_members(self): + """Test case for list_group_members + + list group members # noqa: E501 + """ + pass + + def test_list_group_policies(self): + """Test case for list_group_policies + + list group policies # noqa: E501 + """ + pass + + def test_list_groups(self): + """Test case for list_groups + + list groups # noqa: E501 + """ + pass + + def test_list_policies(self): + """Test case for list_policies + + list policies # noqa: E501 + """ + pass + + def test_list_user_credentials(self): + """Test case for list_user_credentials + + list user credentials # noqa: E501 + """ + pass + + def test_list_user_groups(self): + """Test case for list_user_groups + + list user groups # noqa: E501 + """ + pass + + def test_list_user_policies(self): + """Test case for list_user_policies + + list user policies # noqa: E501 + """ + pass + + def test_list_users(self): + """Test case for list_users + + list users # noqa: E501 + """ + pass + + def test_login(self): + """Test case for login + + perform a login # noqa: E501 + """ + pass + + def test_update_password(self): + """Test case for update_password + + Update user password by reset_password token # noqa: E501 + """ + pass + + def test_update_policy(self): + """Test case for update_policy + + update policy # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_auth_capabilities.py b/clients/python/test/test_auth_capabilities.py similarity index 59% rename from clients/python/test/test_models/test_auth_capabilities.py rename to clients/python/test/test_auth_capabilities.py index 00c81e958f0..06c5de04c25 100644 --- a/clients/python/test/test_models/test_auth_capabilities.py +++ b/clients/python/test/test_auth_capabilities.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.auth_capabilities import AuthCapabilities -from lakefs_client import configuration class TestAuthCapabilities(unittest.TestCase): """AuthCapabilities unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuthCapabilities(self): + """Test AuthCapabilities""" + # FIXME: construct object with mandatory attributes with example values + # model = AuthCapabilities() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_authentication_token.py b/clients/python/test/test_authentication_token.py similarity index 59% rename from clients/python/test/test_models/test_authentication_token.py rename to clients/python/test/test_authentication_token.py index 59399d7f011..ed8736a6b36 100644 --- a/clients/python/test/test_models/test_authentication_token.py +++ b/clients/python/test/test_authentication_token.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.authentication_token import AuthenticationToken -from lakefs_client import configuration class TestAuthenticationToken(unittest.TestCase): """AuthenticationToken unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuthenticationToken(self): + """Test AuthenticationToken""" + # FIXME: construct object with mandatory attributes with example values + # model = AuthenticationToken() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_branch_creation.py b/clients/python/test/test_branch_creation.py similarity index 59% rename from clients/python/test/test_models/test_branch_creation.py rename to clients/python/test/test_branch_creation.py index ef5dd40688f..f5569d86a30 100644 --- a/clients/python/test/test_models/test_branch_creation.py +++ b/clients/python/test/test_branch_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.branch_creation import BranchCreation -from lakefs_client import configuration class TestBranchCreation(unittest.TestCase): """BranchCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranchCreation(self): + """Test BranchCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = BranchCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_branch_protection_rule.py b/clients/python/test/test_branch_protection_rule.py similarity index 59% rename from clients/python/test/test_models/test_branch_protection_rule.py rename to clients/python/test/test_branch_protection_rule.py index 880439b7ae5..89a94776552 100644 --- a/clients/python/test/test_models/test_branch_protection_rule.py +++ b/clients/python/test/test_branch_protection_rule.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.branch_protection_rule import BranchProtectionRule -from lakefs_client import configuration class TestBranchProtectionRule(unittest.TestCase): """BranchProtectionRule unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranchProtectionRule(self): + """Test BranchProtectionRule""" + # FIXME: construct object with mandatory attributes with example values + # model = BranchProtectionRule() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_branches_api.py b/clients/python/test/test_branches_api.py new file mode 100644 index 00000000000..98a943078c1 --- /dev/null +++ b/clients/python/test/test_branches_api.py @@ -0,0 +1,85 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.branches_api import BranchesApi # noqa: E501 + + +class TestBranchesApi(unittest.TestCase): + """BranchesApi unit test stubs""" + + def setUp(self): + self.api = BranchesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_cherry_pick(self): + """Test case for cherry_pick + + Replay the changes from the given commit on the branch # noqa: E501 + """ + pass + + def test_create_branch(self): + """Test case for create_branch + + create branch # noqa: E501 + """ + pass + + def test_delete_branch(self): + """Test case for delete_branch + + delete branch # noqa: E501 + """ + pass + + def test_diff_branch(self): + """Test case for diff_branch + + diff branch # noqa: E501 + """ + pass + + def test_get_branch(self): + """Test case for get_branch + + get branch # noqa: E501 + """ + pass + + def test_list_branches(self): + """Test case for list_branches + + list branches # noqa: E501 + """ + pass + + def test_reset_branch(self): + """Test case for reset_branch + + reset branch # noqa: E501 + """ + pass + + def test_revert_branch(self): + """Test case for revert_branch + + revert # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_cherry_pick_creation.py b/clients/python/test/test_cherry_pick_creation.py similarity index 59% rename from clients/python/test/test_models/test_cherry_pick_creation.py rename to clients/python/test/test_cherry_pick_creation.py index cb2aa092ef7..a725c5e37ff 100644 --- a/clients/python/test/test_models/test_cherry_pick_creation.py +++ b/clients/python/test/test_cherry_pick_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.cherry_pick_creation import CherryPickCreation -from lakefs_client import configuration class TestCherryPickCreation(unittest.TestCase): """CherryPickCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCherryPickCreation(self): + """Test CherryPickCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = CherryPickCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_comm_prefs_input.py b/clients/python/test/test_comm_prefs_input.py similarity index 59% rename from clients/python/test/test_models/test_comm_prefs_input.py rename to clients/python/test/test_comm_prefs_input.py index e2ae1aad682..82117e1ee62 100644 --- a/clients/python/test/test_models/test_comm_prefs_input.py +++ b/clients/python/test/test_comm_prefs_input.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.comm_prefs_input import CommPrefsInput -from lakefs_client import configuration class TestCommPrefsInput(unittest.TestCase): """CommPrefsInput unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommPrefsInput(self): + """Test CommPrefsInput""" + # FIXME: construct object with mandatory attributes with example values + # model = CommPrefsInput() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_commit.py b/clients/python/test/test_commit.py similarity index 59% rename from clients/python/test/test_models/test_commit.py rename to clients/python/test/test_commit.py index e96a9e163f3..1943ee355fb 100644 --- a/clients/python/test/test_models/test_commit.py +++ b/clients/python/test/test_commit.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.commit import Commit -from lakefs_client import configuration class TestCommit(unittest.TestCase): """Commit unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommit(self): + """Test Commit""" + # FIXME: construct object with mandatory attributes with example values + # model = Commit() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_commit_creation.py b/clients/python/test/test_commit_creation.py similarity index 59% rename from clients/python/test/test_models/test_commit_creation.py rename to clients/python/test/test_commit_creation.py index 87a3011ab67..f4a6aa4f84e 100644 --- a/clients/python/test/test_models/test_commit_creation.py +++ b/clients/python/test/test_commit_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.commit_creation import CommitCreation -from lakefs_client import configuration class TestCommitCreation(unittest.TestCase): """CommitCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitCreation(self): + """Test CommitCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = CommitCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_commit_list.py b/clients/python/test/test_commit_list.py new file mode 100644 index 00000000000..e930eaaac1d --- /dev/null +++ b/clients/python/test/test_commit_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.commit import Commit +from lakefs_client.model.pagination import Pagination +globals()['Commit'] = Commit +globals()['Pagination'] = Pagination +from lakefs_client.model.commit_list import CommitList + + +class TestCommitList(unittest.TestCase): + """CommitList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitList(self): + """Test CommitList""" + # FIXME: construct object with mandatory attributes with example values + # model = CommitList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_commits_api.py b/clients/python/test/test_commits_api.py new file mode 100644 index 00000000000..947cbf1d035 --- /dev/null +++ b/clients/python/test/test_commits_api.py @@ -0,0 +1,50 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.commits_api import CommitsApi # noqa: E501 + + +class TestCommitsApi(unittest.TestCase): + """CommitsApi unit test stubs""" + + def setUp(self): + self.api = CommitsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_commit(self): + """Test case for commit + + create commit # noqa: E501 + """ + pass + + def test_get_commit(self): + """Test case for get_commit + + get commit # noqa: E501 + """ + pass + + def test_log_branch_commits(self): + """Test case for log_branch_commits + + get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_config_api.py b/clients/python/test/test_config_api.py new file mode 100644 index 00000000000..785af74460c --- /dev/null +++ b/clients/python/test/test_config_api.py @@ -0,0 +1,68 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.config_api import ConfigApi # noqa: E501 + + +class TestConfigApi(unittest.TestCase): + """ConfigApi unit test stubs""" + + def setUp(self): + self.api = ConfigApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_garbage_collection_config(self): + """Test case for get_garbage_collection_config + + """ + pass + + def test_get_lake_fs_version(self): + """Test case for get_lake_fs_version + + """ + pass + + def test_get_setup_state(self): + """Test case for get_setup_state + + check if the lakeFS installation is already set up # noqa: E501 + """ + pass + + def test_get_storage_config(self): + """Test case for get_storage_config + + """ + pass + + def test_setup(self): + """Test case for setup + + setup lakeFS and create a first user # noqa: E501 + """ + pass + + def test_setup_comm_prefs(self): + """Test case for setup_comm_prefs + + setup communications preferences # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_credentials.py b/clients/python/test/test_credentials.py similarity index 59% rename from clients/python/test/test_models/test_credentials.py rename to clients/python/test/test_credentials.py index c8128edcdcc..84706d357ca 100644 --- a/clients/python/test/test_models/test_credentials.py +++ b/clients/python/test/test_credentials.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.credentials import Credentials -from lakefs_client import configuration class TestCredentials(unittest.TestCase): """Credentials unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCredentials(self): + """Test Credentials""" + # FIXME: construct object with mandatory attributes with example values + # model = Credentials() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_credentials_list.py b/clients/python/test/test_credentials_list.py new file mode 100644 index 00000000000..dcc5c5fe2eb --- /dev/null +++ b/clients/python/test/test_credentials_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.credentials import Credentials +from lakefs_client.model.pagination import Pagination +globals()['Credentials'] = Credentials +globals()['Pagination'] = Pagination +from lakefs_client.model.credentials_list import CredentialsList + + +class TestCredentialsList(unittest.TestCase): + """CredentialsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCredentialsList(self): + """Test CredentialsList""" + # FIXME: construct object with mandatory attributes with example values + # model = CredentialsList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_credentials_with_secret.py b/clients/python/test/test_credentials_with_secret.py similarity index 59% rename from clients/python/test/test_models/test_credentials_with_secret.py rename to clients/python/test/test_credentials_with_secret.py index 6fae0a0a30a..5d012362050 100644 --- a/clients/python/test/test_models/test_credentials_with_secret.py +++ b/clients/python/test/test_credentials_with_secret.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.credentials_with_secret import CredentialsWithSecret -from lakefs_client import configuration class TestCredentialsWithSecret(unittest.TestCase): """CredentialsWithSecret unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCredentialsWithSecret(self): + """Test CredentialsWithSecret""" + # FIXME: construct object with mandatory attributes with example values + # model = CredentialsWithSecret() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_current_user.py b/clients/python/test/test_current_user.py similarity index 54% rename from clients/python/test/test_models/test_current_user.py rename to clients/python/test/test_current_user.py index 70c935a3250..6da198c845b 100644 --- a/clients/python/test/test_models/test_current_user.py +++ b/clients/python/test/test_current_user.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.user import User +globals()['User'] = User from lakefs_client.model.current_user import CurrentUser -from lakefs_client import configuration class TestCurrentUser(unittest.TestCase): """CurrentUser unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCurrentUser(self): + """Test CurrentUser""" + # FIXME: construct object with mandatory attributes with example values + # model = CurrentUser() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_diff.py b/clients/python/test/test_diff.py similarity index 59% rename from clients/python/test/test_models/test_diff.py rename to clients/python/test/test_diff.py index c7d1905ceea..c55086cc90e 100644 --- a/clients/python/test/test_models/test_diff.py +++ b/clients/python/test/test_diff.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.diff import Diff -from lakefs_client import configuration class TestDiff(unittest.TestCase): """Diff unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDiff(self): + """Test Diff""" + # FIXME: construct object with mandatory attributes with example values + # model = Diff() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_diff_list.py b/clients/python/test/test_diff_list.py new file mode 100644 index 00000000000..1216bbb5b72 --- /dev/null +++ b/clients/python/test/test_diff_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.diff import Diff +from lakefs_client.model.pagination import Pagination +globals()['Diff'] = Diff +globals()['Pagination'] = Pagination +from lakefs_client.model.diff_list import DiffList + + +class TestDiffList(unittest.TestCase): + """DiffList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDiffList(self): + """Test DiffList""" + # FIXME: construct object with mandatory attributes with example values + # model = DiffList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_error.py b/clients/python/test/test_error.py similarity index 59% rename from clients/python/test/test_models/test_error.py rename to clients/python/test/test_error.py index 410ce49092e..3888fb09065 100644 --- a/clients/python/test/test_models/test_error.py +++ b/clients/python/test/test_error.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.error import Error -from lakefs_client import configuration class TestError(unittest.TestCase): """Error unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testError(self): + """Test Error""" + # FIXME: construct object with mandatory attributes with example values + # model = Error() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_experimental_api.py b/clients/python/test/test_experimental_api.py new file mode 100644 index 00000000000..076639a0a43 --- /dev/null +++ b/clients/python/test/test_experimental_api.py @@ -0,0 +1,36 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.experimental_api import ExperimentalApi # noqa: E501 + + +class TestExperimentalApi(unittest.TestCase): + """ExperimentalApi unit test stubs""" + + def setUp(self): + self.api = ExperimentalApi() # noqa: E501 + + def tearDown(self): + pass + + def test_otf_diff(self): + """Test case for otf_diff + + perform otf diff # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_find_merge_base_result.py b/clients/python/test/test_find_merge_base_result.py similarity index 59% rename from clients/python/test/test_models/test_find_merge_base_result.py rename to clients/python/test/test_find_merge_base_result.py index 01142018d37..642ee57b08d 100644 --- a/clients/python/test/test_models/test_find_merge_base_result.py +++ b/clients/python/test/test_find_merge_base_result.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.find_merge_base_result import FindMergeBaseResult -from lakefs_client import configuration class TestFindMergeBaseResult(unittest.TestCase): """FindMergeBaseResult unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFindMergeBaseResult(self): + """Test FindMergeBaseResult""" + # FIXME: construct object with mandatory attributes with example values + # model = FindMergeBaseResult() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_forgot_password_request.py b/clients/python/test/test_forgot_password_request.py similarity index 59% rename from clients/python/test/test_models/test_forgot_password_request.py rename to clients/python/test/test_forgot_password_request.py index 0129e42a30b..217daa1fb2c 100644 --- a/clients/python/test/test_models/test_forgot_password_request.py +++ b/clients/python/test/test_forgot_password_request.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.forgot_password_request import ForgotPasswordRequest -from lakefs_client import configuration class TestForgotPasswordRequest(unittest.TestCase): """ForgotPasswordRequest unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testForgotPasswordRequest(self): + """Test ForgotPasswordRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = ForgotPasswordRequest() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_garbage_collection_config.py b/clients/python/test/test_garbage_collection_config.py similarity index 59% rename from clients/python/test/test_models/test_garbage_collection_config.py rename to clients/python/test/test_garbage_collection_config.py index 82d7c9ff802..f0097d880f4 100644 --- a/clients/python/test/test_models/test_garbage_collection_config.py +++ b/clients/python/test/test_garbage_collection_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig -from lakefs_client import configuration class TestGarbageCollectionConfig(unittest.TestCase): """GarbageCollectionConfig unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGarbageCollectionConfig(self): + """Test GarbageCollectionConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = GarbageCollectionConfig() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_garbage_collection_prepare_request.py b/clients/python/test/test_garbage_collection_prepare_request.py similarity index 59% rename from clients/python/test/test_models/test_garbage_collection_prepare_request.py rename to clients/python/test/test_garbage_collection_prepare_request.py index 3c7707db1c5..f8d6443e44b 100644 --- a/clients/python/test/test_models/test_garbage_collection_prepare_request.py +++ b/clients/python/test/test_garbage_collection_prepare_request.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.garbage_collection_prepare_request import GarbageCollectionPrepareRequest -from lakefs_client import configuration class TestGarbageCollectionPrepareRequest(unittest.TestCase): """GarbageCollectionPrepareRequest unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGarbageCollectionPrepareRequest(self): + """Test GarbageCollectionPrepareRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = GarbageCollectionPrepareRequest() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_garbage_collection_prepare_response.py b/clients/python/test/test_garbage_collection_prepare_response.py similarity index 59% rename from clients/python/test/test_models/test_garbage_collection_prepare_response.py rename to clients/python/test/test_garbage_collection_prepare_response.py index 1b96087e9f1..1755a0c993f 100644 --- a/clients/python/test/test_models/test_garbage_collection_prepare_response.py +++ b/clients/python/test/test_garbage_collection_prepare_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.garbage_collection_prepare_response import GarbageCollectionPrepareResponse -from lakefs_client import configuration class TestGarbageCollectionPrepareResponse(unittest.TestCase): """GarbageCollectionPrepareResponse unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGarbageCollectionPrepareResponse(self): + """Test GarbageCollectionPrepareResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = GarbageCollectionPrepareResponse() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_garbage_collection_rule.py b/clients/python/test/test_garbage_collection_rule.py similarity index 59% rename from clients/python/test/test_models/test_garbage_collection_rule.py rename to clients/python/test/test_garbage_collection_rule.py index 464f330705d..da4b70b86ca 100644 --- a/clients/python/test/test_models/test_garbage_collection_rule.py +++ b/clients/python/test/test_garbage_collection_rule.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.garbage_collection_rule import GarbageCollectionRule -from lakefs_client import configuration class TestGarbageCollectionRule(unittest.TestCase): """GarbageCollectionRule unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGarbageCollectionRule(self): + """Test GarbageCollectionRule""" + # FIXME: construct object with mandatory attributes with example values + # model = GarbageCollectionRule() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_garbage_collection_rules.py b/clients/python/test/test_garbage_collection_rules.py similarity index 50% rename from clients/python/test/test_models/test_garbage_collection_rules.py rename to clients/python/test/test_garbage_collection_rules.py index 12992b3ea63..45eba4a7ad7 100644 --- a/clients/python/test/test_models/test_garbage_collection_rules.py +++ b/clients/python/test/test_garbage_collection_rules.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.garbage_collection_rule import GarbageCollectionRule +globals()['GarbageCollectionRule'] = GarbageCollectionRule from lakefs_client.model.garbage_collection_rules import GarbageCollectionRules -from lakefs_client import configuration class TestGarbageCollectionRules(unittest.TestCase): """GarbageCollectionRules unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGarbageCollectionRules(self): + """Test GarbageCollectionRules""" + # FIXME: construct object with mandatory attributes with example values + # model = GarbageCollectionRules() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_group.py b/clients/python/test/test_group.py similarity index 59% rename from clients/python/test/test_models/test_group.py rename to clients/python/test/test_group.py index 219ed0b5767..1c080213de6 100644 --- a/clients/python/test/test_models/test_group.py +++ b/clients/python/test/test_group.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.group import Group -from lakefs_client import configuration class TestGroup(unittest.TestCase): """Group unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroup(self): + """Test Group""" + # FIXME: construct object with mandatory attributes with example values + # model = Group() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_group_creation.py b/clients/python/test/test_group_creation.py similarity index 59% rename from clients/python/test/test_models/test_group_creation.py rename to clients/python/test/test_group_creation.py index a85b8da53e4..1d20bf9825b 100644 --- a/clients/python/test/test_models/test_group_creation.py +++ b/clients/python/test/test_group_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.group_creation import GroupCreation -from lakefs_client import configuration class TestGroupCreation(unittest.TestCase): """GroupCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroupCreation(self): + """Test GroupCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = GroupCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_group_list.py b/clients/python/test/test_group_list.py new file mode 100644 index 00000000000..baeffd55e25 --- /dev/null +++ b/clients/python/test/test_group_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.group import Group +from lakefs_client.model.pagination import Pagination +globals()['Group'] = Group +globals()['Pagination'] = Pagination +from lakefs_client.model.group_list import GroupList + + +class TestGroupList(unittest.TestCase): + """GroupList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroupList(self): + """Test GroupList""" + # FIXME: construct object with mandatory attributes with example values + # model = GroupList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_health_check_api.py b/clients/python/test/test_health_check_api.py new file mode 100644 index 00000000000..2fedc9cf05f --- /dev/null +++ b/clients/python/test/test_health_check_api.py @@ -0,0 +1,35 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.health_check_api import HealthCheckApi # noqa: E501 + + +class TestHealthCheckApi(unittest.TestCase): + """HealthCheckApi unit test stubs""" + + def setUp(self): + self.api = HealthCheckApi() # noqa: E501 + + def tearDown(self): + pass + + def test_health_check(self): + """Test case for health_check + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_hook_run.py b/clients/python/test/test_hook_run.py similarity index 59% rename from clients/python/test/test_models/test_hook_run.py rename to clients/python/test/test_hook_run.py index c8164a283bf..092506f2958 100644 --- a/clients/python/test/test_models/test_hook_run.py +++ b/clients/python/test/test_hook_run.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.hook_run import HookRun -from lakefs_client import configuration class TestHookRun(unittest.TestCase): """HookRun unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHookRun(self): + """Test HookRun""" + # FIXME: construct object with mandatory attributes with example values + # model = HookRun() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_hook_run_list.py b/clients/python/test/test_hook_run_list.py new file mode 100644 index 00000000000..fbb277deb9c --- /dev/null +++ b/clients/python/test/test_hook_run_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.hook_run import HookRun +from lakefs_client.model.pagination import Pagination +globals()['HookRun'] = HookRun +globals()['Pagination'] = Pagination +from lakefs_client.model.hook_run_list import HookRunList + + +class TestHookRunList(unittest.TestCase): + """HookRunList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHookRunList(self): + """Test HookRunList""" + # FIXME: construct object with mandatory attributes with example values + # model = HookRunList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_import_api.py b/clients/python/test/test_import_api.py new file mode 100644 index 00000000000..0e5bb96092e --- /dev/null +++ b/clients/python/test/test_import_api.py @@ -0,0 +1,43 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.import_api import ImportApi # noqa: E501 + + +class TestImportApi(unittest.TestCase): + """ImportApi unit test stubs""" + + def setUp(self): + self.api = ImportApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_meta_range(self): + """Test case for create_meta_range + + create a lakeFS metarange file from the given ranges # noqa: E501 + """ + pass + + def test_ingest_range(self): + """Test case for ingest_range + + create a lakeFS range file from the source uri # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_import_pagination.py b/clients/python/test/test_import_pagination.py similarity index 59% rename from clients/python/test/test_models/test_import_pagination.py rename to clients/python/test/test_import_pagination.py index 3871fc5f06c..f65f829c102 100644 --- a/clients/python/test/test_models/test_import_pagination.py +++ b/clients/python/test/test_import_pagination.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.import_pagination import ImportPagination -from lakefs_client import configuration class TestImportPagination(unittest.TestCase): """ImportPagination unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testImportPagination(self): + """Test ImportPagination""" + # FIXME: construct object with mandatory attributes with example values + # model = ImportPagination() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_ingest_range_creation_response.py b/clients/python/test/test_ingest_range_creation_response.py new file mode 100644 index 00000000000..6d3fb9326ae --- /dev/null +++ b/clients/python/test/test_ingest_range_creation_response.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.import_pagination import ImportPagination +from lakefs_client.model.range_metadata import RangeMetadata +globals()['ImportPagination'] = ImportPagination +globals()['RangeMetadata'] = RangeMetadata +from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse + + +class TestIngestRangeCreationResponse(unittest.TestCase): + """IngestRangeCreationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIngestRangeCreationResponse(self): + """Test IngestRangeCreationResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = IngestRangeCreationResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_inline_object1.py b/clients/python/test/test_inline_object1.py new file mode 100644 index 00000000000..786a4834fa7 --- /dev/null +++ b/clients/python/test/test_inline_object1.py @@ -0,0 +1,36 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.inline_object1 import InlineObject1 + + +class TestInlineObject1(unittest.TestCase): + """InlineObject1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineObject1(self): + """Test InlineObject1""" + # FIXME: construct object with mandatory attributes with example values + # model = InlineObject1() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_login_config.py b/clients/python/test/test_login_config.py similarity index 59% rename from clients/python/test/test_models/test_login_config.py rename to clients/python/test/test_login_config.py index d21c7849192..bd3ff0b5900 100644 --- a/clients/python/test/test_models/test_login_config.py +++ b/clients/python/test/test_login_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.login_config import LoginConfig -from lakefs_client import configuration class TestLoginConfig(unittest.TestCase): """LoginConfig unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLoginConfig(self): + """Test LoginConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = LoginConfig() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_login_information.py b/clients/python/test/test_login_information.py similarity index 59% rename from clients/python/test/test_models/test_login_information.py rename to clients/python/test/test_login_information.py index 6e4f225abf0..db7d1b52add 100644 --- a/clients/python/test/test_models/test_login_information.py +++ b/clients/python/test/test_login_information.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.login_information import LoginInformation -from lakefs_client import configuration class TestLoginInformation(unittest.TestCase): """LoginInformation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLoginInformation(self): + """Test LoginInformation""" + # FIXME: construct object with mandatory attributes with example values + # model = LoginInformation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_merge.py b/clients/python/test/test_merge.py similarity index 59% rename from clients/python/test/test_models/test_merge.py rename to clients/python/test/test_merge.py index f1bb5e460db..92f97bd4b6b 100644 --- a/clients/python/test/test_models/test_merge.py +++ b/clients/python/test/test_merge.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.merge import Merge -from lakefs_client import configuration class TestMerge(unittest.TestCase): """Merge unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMerge(self): + """Test Merge""" + # FIXME: construct object with mandatory attributes with example values + # model = Merge() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_merge_result.py b/clients/python/test/test_merge_result.py similarity index 50% rename from clients/python/test/test_models/test_merge_result.py rename to clients/python/test/test_merge_result.py index 656e405c459..d7ed70ce13a 100644 --- a/clients/python/test/test_models/test_merge_result.py +++ b/clients/python/test/test_merge_result.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.merge_result_summary import MergeResultSummary +globals()['MergeResultSummary'] = MergeResultSummary from lakefs_client.model.merge_result import MergeResult -from lakefs_client import configuration class TestMergeResult(unittest.TestCase): """MergeResult unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergeResult(self): + """Test MergeResult""" + # FIXME: construct object with mandatory attributes with example values + # model = MergeResult() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_merge_result_summary.py b/clients/python/test/test_merge_result_summary.py similarity index 59% rename from clients/python/test/test_models/test_merge_result_summary.py rename to clients/python/test/test_merge_result_summary.py index b7198c5e463..2864cc8971b 100644 --- a/clients/python/test/test_models/test_merge_result_summary.py +++ b/clients/python/test/test_merge_result_summary.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.merge_result_summary import MergeResultSummary -from lakefs_client import configuration class TestMergeResultSummary(unittest.TestCase): """MergeResultSummary unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergeResultSummary(self): + """Test MergeResultSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = MergeResultSummary() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_meta_range_creation.py b/clients/python/test/test_meta_range_creation.py similarity index 52% rename from clients/python/test/test_models/test_meta_range_creation.py rename to clients/python/test/test_meta_range_creation.py index 7eea1fb8407..e6bec54d95f 100644 --- a/clients/python/test/test_models/test_meta_range_creation.py +++ b/clients/python/test/test_meta_range_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.range_metadata import RangeMetadata +globals()['RangeMetadata'] = RangeMetadata from lakefs_client.model.meta_range_creation import MetaRangeCreation -from lakefs_client import configuration class TestMetaRangeCreation(unittest.TestCase): """MetaRangeCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMetaRangeCreation(self): + """Test MetaRangeCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = MetaRangeCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_meta_range_creation_response.py b/clients/python/test/test_meta_range_creation_response.py similarity index 59% rename from clients/python/test/test_models/test_meta_range_creation_response.py rename to clients/python/test/test_meta_range_creation_response.py index bba46e93032..31b23d976a5 100644 --- a/clients/python/test/test_models/test_meta_range_creation_response.py +++ b/clients/python/test/test_meta_range_creation_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.meta_range_creation_response import MetaRangeCreationResponse -from lakefs_client import configuration class TestMetaRangeCreationResponse(unittest.TestCase): """MetaRangeCreationResponse unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMetaRangeCreationResponse(self): + """Test MetaRangeCreationResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = MetaRangeCreationResponse() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_metadata_api.py b/clients/python/test/test_metadata_api.py new file mode 100644 index 00000000000..a4f276d8574 --- /dev/null +++ b/clients/python/test/test_metadata_api.py @@ -0,0 +1,50 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.metadata_api import MetadataApi # noqa: E501 + + +class TestMetadataApi(unittest.TestCase): + """MetadataApi unit test stubs""" + + def setUp(self): + self.api = MetadataApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_symlink_file(self): + """Test case for create_symlink_file + + creates symlink files corresponding to the given directory # noqa: E501 + """ + pass + + def test_get_meta_range(self): + """Test case for get_meta_range + + return URI to a meta-range file # noqa: E501 + """ + pass + + def test_get_range(self): + """Test case for get_range + + return URI to a range file # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/__init__.py b/clients/python/test/test_models/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_models/test_action_run_list.py b/clients/python/test/test_models/test_action_run_list.py deleted file mode 100644 index f8016b26395..00000000000 --- a/clients/python/test/test_models/test_action_run_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.action_run_list import ActionRunList -from lakefs_client import configuration - - -class TestActionRunList(unittest.TestCase): - """ActionRunList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_commit_list.py b/clients/python/test/test_models/test_commit_list.py deleted file mode 100644 index 6354052bb9c..00000000000 --- a/clients/python/test/test_models/test_commit_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.commit_list import CommitList -from lakefs_client import configuration - - -class TestCommitList(unittest.TestCase): - """CommitList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_credentials_list.py b/clients/python/test/test_models/test_credentials_list.py deleted file mode 100644 index 42a32665617..00000000000 --- a/clients/python/test/test_models/test_credentials_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.credentials_list import CredentialsList -from lakefs_client import configuration - - -class TestCredentialsList(unittest.TestCase): - """CredentialsList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_diff_list.py b/clients/python/test/test_models/test_diff_list.py deleted file mode 100644 index a45d96d009c..00000000000 --- a/clients/python/test/test_models/test_diff_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.diff_list import DiffList -from lakefs_client import configuration - - -class TestDiffList(unittest.TestCase): - """DiffList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_group_list.py b/clients/python/test/test_models/test_group_list.py deleted file mode 100644 index 9f7323126ff..00000000000 --- a/clients/python/test/test_models/test_group_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.group_list import GroupList -from lakefs_client import configuration - - -class TestGroupList(unittest.TestCase): - """GroupList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_hook_run_list.py b/clients/python/test/test_models/test_hook_run_list.py deleted file mode 100644 index f2e2f566e11..00000000000 --- a/clients/python/test/test_models/test_hook_run_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.hook_run_list import HookRunList -from lakefs_client import configuration - - -class TestHookRunList(unittest.TestCase): - """HookRunList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_ingest_range_creation_response.py b/clients/python/test/test_models/test_ingest_range_creation_response.py deleted file mode 100644 index d0325da22dc..00000000000 --- a/clients/python/test/test_models/test_ingest_range_creation_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.ingest_range_creation_response import IngestRangeCreationResponse -from lakefs_client import configuration - - -class TestIngestRangeCreationResponse(unittest.TestCase): - """IngestRangeCreationResponse unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_object_stats_list.py b/clients/python/test/test_models/test_object_stats_list.py deleted file mode 100644 index 28f3f19c707..00000000000 --- a/clients/python/test/test_models/test_object_stats_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.object_stats_list import ObjectStatsList -from lakefs_client import configuration - - -class TestObjectStatsList(unittest.TestCase): - """ObjectStatsList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_policy_list.py b/clients/python/test/test_models/test_policy_list.py deleted file mode 100644 index 7e3c67fa474..00000000000 --- a/clients/python/test/test_models/test_policy_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.policy_list import PolicyList -from lakefs_client import configuration - - -class TestPolicyList(unittest.TestCase): - """PolicyList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_ref_list.py b/clients/python/test/test_models/test_ref_list.py deleted file mode 100644 index 3655f32ae33..00000000000 --- a/clients/python/test/test_models/test_ref_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.ref_list import RefList -from lakefs_client import configuration - - -class TestRefList(unittest.TestCase): - """RefList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_repository_list.py b/clients/python/test/test_models/test_repository_list.py deleted file mode 100644 index 4be9cbc355e..00000000000 --- a/clients/python/test/test_models/test_repository_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.repository_list import RepositoryList -from lakefs_client import configuration - - -class TestRepositoryList(unittest.TestCase): - """RepositoryList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_setup.py b/clients/python/test/test_models/test_setup.py deleted file mode 100644 index 42ea9650b74..00000000000 --- a/clients/python/test/test_models/test_setup.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.setup import Setup -from lakefs_client import configuration - - -class TestSetup(unittest.TestCase): - """Setup unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_user_list.py b/clients/python/test/test_models/test_user_list.py deleted file mode 100644 index 4da948d3d34..00000000000 --- a/clients/python/test/test_models/test_user_list.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - lakeFS API - - lakeFS HTTP API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: services@treeverse.io - Generated by: https://openapi-generator.tech -""" - -import unittest - -import lakefs_client -from lakefs_client.model.user_list import UserList -from lakefs_client import configuration - - -class TestUserList(unittest.TestCase): - """UserList unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_next_step.py b/clients/python/test/test_next_step.py similarity index 59% rename from clients/python/test/test_models/test_next_step.py rename to clients/python/test/test_next_step.py index eb9289f46e4..3e240a41801 100644 --- a/clients/python/test/test_models/test_next_step.py +++ b/clients/python/test/test_next_step.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.next_step import NextStep -from lakefs_client import configuration class TestNextStep(unittest.TestCase): """NextStep unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNextStep(self): + """Test NextStep""" + # FIXME: construct object with mandatory attributes with example values + # model = NextStep() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_object_copy_creation.py b/clients/python/test/test_object_copy_creation.py similarity index 59% rename from clients/python/test/test_models/test_object_copy_creation.py rename to clients/python/test/test_object_copy_creation.py index 38a6910ba35..89fe306237c 100644 --- a/clients/python/test/test_models/test_object_copy_creation.py +++ b/clients/python/test/test_object_copy_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.object_copy_creation import ObjectCopyCreation -from lakefs_client import configuration class TestObjectCopyCreation(unittest.TestCase): """ObjectCopyCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectCopyCreation(self): + """Test ObjectCopyCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectCopyCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_object_error.py b/clients/python/test/test_object_error.py similarity index 59% rename from clients/python/test/test_models/test_object_error.py rename to clients/python/test/test_object_error.py index 6b463f017ff..918d34db4bb 100644 --- a/clients/python/test/test_models/test_object_error.py +++ b/clients/python/test/test_object_error.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.object_error import ObjectError -from lakefs_client import configuration class TestObjectError(unittest.TestCase): """ObjectError unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectError(self): + """Test ObjectError""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectError() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_object_error_list.py b/clients/python/test/test_object_error_list.py similarity index 52% rename from clients/python/test/test_models/test_object_error_list.py rename to clients/python/test/test_object_error_list.py index 27848518384..a6f6a0c176a 100644 --- a/clients/python/test/test_models/test_object_error_list.py +++ b/clients/python/test/test_object_error_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.object_error import ObjectError +globals()['ObjectError'] = ObjectError from lakefs_client.model.object_error_list import ObjectErrorList -from lakefs_client import configuration class TestObjectErrorList(unittest.TestCase): """ObjectErrorList unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectErrorList(self): + """Test ObjectErrorList""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectErrorList() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_object_stage_creation.py b/clients/python/test/test_object_stage_creation.py similarity index 50% rename from clients/python/test/test_models/test_object_stage_creation.py rename to clients/python/test/test_object_stage_creation.py index a3959cf8cda..3c8afc15ea9 100644 --- a/clients/python/test/test_models/test_object_stage_creation.py +++ b/clients/python/test/test_object_stage_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.object_user_metadata import ObjectUserMetadata +globals()['ObjectUserMetadata'] = ObjectUserMetadata from lakefs_client.model.object_stage_creation import ObjectStageCreation -from lakefs_client import configuration class TestObjectStageCreation(unittest.TestCase): """ObjectStageCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectStageCreation(self): + """Test ObjectStageCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectStageCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_object_stats.py b/clients/python/test/test_object_stats.py similarity index 50% rename from clients/python/test/test_models/test_object_stats.py rename to clients/python/test/test_object_stats.py index f0e4f8695da..3c7f0dbce25 100644 --- a/clients/python/test/test_models/test_object_stats.py +++ b/clients/python/test/test_object_stats.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.object_user_metadata import ObjectUserMetadata +globals()['ObjectUserMetadata'] = ObjectUserMetadata from lakefs_client.model.object_stats import ObjectStats -from lakefs_client import configuration class TestObjectStats(unittest.TestCase): """ObjectStats unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectStats(self): + """Test ObjectStats""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectStats() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_object_stats_list.py b/clients/python/test/test_object_stats_list.py new file mode 100644 index 00000000000..81b1126b367 --- /dev/null +++ b/clients/python/test/test_object_stats_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.object_stats import ObjectStats +from lakefs_client.model.pagination import Pagination +globals()['ObjectStats'] = ObjectStats +globals()['Pagination'] = Pagination +from lakefs_client.model.object_stats_list import ObjectStatsList + + +class TestObjectStatsList(unittest.TestCase): + """ObjectStatsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectStatsList(self): + """Test ObjectStatsList""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectStatsList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_object_user_metadata.py b/clients/python/test/test_object_user_metadata.py similarity index 59% rename from clients/python/test/test_models/test_object_user_metadata.py rename to clients/python/test/test_object_user_metadata.py index 68d1496d0e0..e949d757859 100644 --- a/clients/python/test/test_models/test_object_user_metadata.py +++ b/clients/python/test/test_object_user_metadata.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.object_user_metadata import ObjectUserMetadata -from lakefs_client import configuration class TestObjectUserMetadata(unittest.TestCase): """ObjectUserMetadata unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectUserMetadata(self): + """Test ObjectUserMetadata""" + # FIXME: construct object with mandatory attributes with example values + # model = ObjectUserMetadata() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_objects_api.py b/clients/python/test/test_objects_api.py new file mode 100644 index 00000000000..5b5bdba88ea --- /dev/null +++ b/clients/python/test/test_objects_api.py @@ -0,0 +1,98 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.objects_api import ObjectsApi # noqa: E501 + + +class TestObjectsApi(unittest.TestCase): + """ObjectsApi unit test stubs""" + + def setUp(self): + self.api = ObjectsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_copy_object(self): + """Test case for copy_object + + create a copy of an object # noqa: E501 + """ + pass + + def test_delete_object(self): + """Test case for delete_object + + delete object. Missing objects will not return a NotFound error. # noqa: E501 + """ + pass + + def test_delete_objects(self): + """Test case for delete_objects + + delete objects. Missing objects will not return a NotFound error. # noqa: E501 + """ + pass + + def test_get_object(self): + """Test case for get_object + + get object content # noqa: E501 + """ + pass + + def test_get_underlying_properties(self): + """Test case for get_underlying_properties + + get object properties on underlying storage # noqa: E501 + """ + pass + + def test_head_object(self): + """Test case for head_object + + check if object exists # noqa: E501 + """ + pass + + def test_list_objects(self): + """Test case for list_objects + + list objects under a given prefix # noqa: E501 + """ + pass + + def test_stage_object(self): + """Test case for stage_object + + stage an object's metadata for the given branch # noqa: E501 + """ + pass + + def test_stat_object(self): + """Test case for stat_object + + get object metadata # noqa: E501 + """ + pass + + def test_upload_object(self): + """Test case for upload_object + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_otf_diff_api.py b/clients/python/test/test_otf_diff_api.py new file mode 100644 index 00000000000..c2cd0ded805 --- /dev/null +++ b/clients/python/test/test_otf_diff_api.py @@ -0,0 +1,36 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.otf_diff_api import OtfDiffApi # noqa: E501 + + +class TestOtfDiffApi(unittest.TestCase): + """OtfDiffApi unit test stubs""" + + def setUp(self): + self.api = OtfDiffApi() # noqa: E501 + + def tearDown(self): + pass + + def test_otf_diff(self): + """Test case for otf_diff + + perform otf diff # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_otf_diff_entry.py b/clients/python/test/test_otf_diff_entry.py similarity index 59% rename from clients/python/test/test_models/test_otf_diff_entry.py rename to clients/python/test/test_otf_diff_entry.py index a38db64b32d..4cd38eff60a 100644 --- a/clients/python/test/test_models/test_otf_diff_entry.py +++ b/clients/python/test/test_otf_diff_entry.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.otf_diff_entry import OtfDiffEntry -from lakefs_client import configuration class TestOtfDiffEntry(unittest.TestCase): """OtfDiffEntry unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOtfDiffEntry(self): + """Test OtfDiffEntry""" + # FIXME: construct object with mandatory attributes with example values + # model = OtfDiffEntry() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_otf_diff_list.py b/clients/python/test/test_otf_diff_list.py similarity index 51% rename from clients/python/test/test_models/test_otf_diff_list.py rename to clients/python/test/test_otf_diff_list.py index 235cd4744a5..c55647f93f0 100644 --- a/clients/python/test/test_models/test_otf_diff_list.py +++ b/clients/python/test/test_otf_diff_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.otf_diff_entry import OtfDiffEntry +globals()['OtfDiffEntry'] = OtfDiffEntry from lakefs_client.model.otf_diff_list import OtfDiffList -from lakefs_client import configuration class TestOtfDiffList(unittest.TestCase): """OtfDiffList unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOtfDiffList(self): + """Test OtfDiffList""" + # FIXME: construct object with mandatory attributes with example values + # model = OtfDiffList() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_pagination.py b/clients/python/test/test_pagination.py similarity index 59% rename from clients/python/test/test_models/test_pagination.py rename to clients/python/test/test_pagination.py index 65d225cf511..fa13a9587c1 100644 --- a/clients/python/test/test_models/test_pagination.py +++ b/clients/python/test/test_pagination.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.pagination import Pagination -from lakefs_client import configuration class TestPagination(unittest.TestCase): """Pagination unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPagination(self): + """Test Pagination""" + # FIXME: construct object with mandatory attributes with example values + # model = Pagination() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_path_list.py b/clients/python/test/test_path_list.py similarity index 59% rename from clients/python/test/test_models/test_path_list.py rename to clients/python/test/test_path_list.py index 8dfec63ea99..8cfd4f5ab79 100644 --- a/clients/python/test/test_models/test_path_list.py +++ b/clients/python/test/test_path_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.path_list import PathList -from lakefs_client import configuration class TestPathList(unittest.TestCase): """PathList unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPathList(self): + """Test PathList""" + # FIXME: construct object with mandatory attributes with example values + # model = PathList() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_paths/__init__.py b/clients/python/test/test_paths/__init__.py deleted file mode 100644 index 1309632d3d5..00000000000 --- a/clients/python/test/test_paths/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -import json -import typing - -import urllib3 -from urllib3._collections import HTTPHeaderDict - - -class ApiTestMixin: - json_content_type = 'application/json' - user_agent = 'OpenAPI-Generator/1.0.0/python' - - @classmethod - def assert_pool_manager_request_called_with( - cls, - mock_request, - url: str, - method: str = 'POST', - body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = None, - accept_content_type: typing.Optional[str] = None, - stream: bool = False, - ): - headers = { - 'User-Agent': cls.user_agent - } - if accept_content_type: - headers['Accept'] = accept_content_type - if content_type: - headers['Content-Type'] = content_type - kwargs = dict( - headers=HTTPHeaderDict(headers), - preload_content=not stream, - timeout=None, - ) - if content_type and method != 'GET': - kwargs['body'] = body - mock_request.assert_called_with( - method, - url, - **kwargs - ) - - @staticmethod - def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: - return {'content-type': content_type} - - @classmethod - def response( - cls, - body: typing.Union[str, bytes], - status: int = 200, - content_type: str = json_content_type, - headers: typing.Optional[typing.Dict[str, str]] = None, - preload_content: bool = True - ) -> urllib3.HTTPResponse: - if headers is None: - headers = {} - headers.update(cls.headers_for_content_type(content_type)) - return urllib3.HTTPResponse( - body, - headers=headers, - status=status, - preload_content=preload_content - ) - - @staticmethod - def json_bytes(in_data: typing.Any) -> bytes: - return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/clients/python/test/test_paths/test_auth_capabilities/__init__.py b/clients/python/test/test_paths/test_auth_capabilities/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_capabilities/test_get.py b/clients/python/test/test_paths/test_auth_capabilities/test_get.py deleted file mode 100644 index 0963198db91..00000000000 --- a/clients/python/test/test_paths/test_auth_capabilities/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_capabilities import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthCapabilities(ApiTestMixin, unittest.TestCase): - """ - AuthCapabilities unit test stubs - list authentication capabilities supported # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups/__init__.py b/clients/python/test/test_paths/test_auth_groups/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_groups/test_get.py b/clients/python/test/test_paths/test_auth_groups/test_get.py deleted file mode 100644 index 31f5a7b74a2..00000000000 --- a/clients/python/test/test_paths/test_auth_groups/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroups(ApiTestMixin, unittest.TestCase): - """ - AuthGroups unit test stubs - list groups # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups/test_post.py b/clients/python/test/test_paths/test_auth_groups/test_post.py deleted file mode 100644 index b68368fdb6d..00000000000 --- a/clients/python/test/test_paths/test_auth_groups/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroups(ApiTestMixin, unittest.TestCase): - """ - AuthGroups unit test stubs - create group # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id/__init__.py b/clients/python/test/test_paths/test_auth_groups_group_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_groups_group_id/test_delete.py b/clients/python/test/test_paths/test_auth_groups_group_id/test_delete.py deleted file mode 100644 index 14c98b3e7a6..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupId(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupId unit test stubs - delete group # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id/test_get.py b/clients/python/test/test_paths/test_auth_groups_group_id/test_get.py deleted file mode 100644 index a65c4255ba8..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupId(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupId unit test stubs - get group # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_members/__init__.py b/clients/python/test/test_paths/test_auth_groups_group_id_members/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_members/test_get.py b/clients/python/test/test_paths/test_auth_groups_group_id_members/test_get.py deleted file mode 100644 index 30417aa523f..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id_members/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id_members import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupIdMembers(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupIdMembers unit test stubs - list group members # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/__init__.py b/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_delete.py b/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_delete.py deleted file mode 100644 index 544b84b418c..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id_members_user_id import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupIdMembersUserId(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupIdMembersUserId unit test stubs - delete group membership # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_put.py b/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_put.py deleted file mode 100644 index 4e3e6e26eb7..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id_members_user_id/test_put.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id_members_user_id import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupIdMembersUserId(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupIdMembersUserId unit test stubs - add group membership # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_policies/__init__.py b/clients/python/test/test_paths/test_auth_groups_group_id_policies/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_policies/test_get.py b/clients/python/test/test_paths/test_auth_groups_group_id_policies/test_get.py deleted file mode 100644 index 98e89564a6f..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id_policies/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id_policies import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupIdPolicies(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupIdPolicies unit test stubs - list group policies # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/__init__.py b/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_delete.py b/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_delete.py deleted file mode 100644 index 29e102224da..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id_policies_policy_id import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupIdPoliciesPolicyId(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupIdPoliciesPolicyId unit test stubs - detach policy from group # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_put.py b/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_put.py deleted file mode 100644 index ec9f6773fba..00000000000 --- a/clients/python/test/test_paths/test_auth_groups_group_id_policies_policy_id/test_put.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_groups_group_id_policies_policy_id import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthGroupsGroupIdPoliciesPolicyId(ApiTestMixin, unittest.TestCase): - """ - AuthGroupsGroupIdPoliciesPolicyId unit test stubs - attach policy to group # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_login/__init__.py b/clients/python/test/test_paths/test_auth_login/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_login/test_post.py b/clients/python/test/test_paths/test_auth_login/test_post.py deleted file mode 100644 index bf9ed4dbe99..00000000000 --- a/clients/python/test/test_paths/test_auth_login/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_login import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthLogin(ApiTestMixin, unittest.TestCase): - """ - AuthLogin unit test stubs - perform a login # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_password/__init__.py b/clients/python/test/test_paths/test_auth_password/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_password/test_post.py b/clients/python/test/test_paths/test_auth_password/test_post.py deleted file mode 100644 index c82f154404c..00000000000 --- a/clients/python/test/test_paths/test_auth_password/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_password import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthPassword(ApiTestMixin, unittest.TestCase): - """ - AuthPassword unit test stubs - Update user password by reset_password token # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_password_forgot/__init__.py b/clients/python/test/test_paths/test_auth_password_forgot/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_password_forgot/test_post.py b/clients/python/test/test_paths/test_auth_password_forgot/test_post.py deleted file mode 100644 index 8bad2a7dcf0..00000000000 --- a/clients/python/test/test_paths/test_auth_password_forgot/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_password_forgot import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthPasswordForgot(ApiTestMixin, unittest.TestCase): - """ - AuthPasswordForgot unit test stubs - forgot password request initiates the password reset process # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_policies/__init__.py b/clients/python/test/test_paths/test_auth_policies/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_policies/test_get.py b/clients/python/test/test_paths/test_auth_policies/test_get.py deleted file mode 100644 index 82323aa23af..00000000000 --- a/clients/python/test/test_paths/test_auth_policies/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_policies import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthPolicies(ApiTestMixin, unittest.TestCase): - """ - AuthPolicies unit test stubs - list policies # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_policies/test_post.py b/clients/python/test/test_paths/test_auth_policies/test_post.py deleted file mode 100644 index 7596bf38939..00000000000 --- a/clients/python/test/test_paths/test_auth_policies/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_policies import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthPolicies(ApiTestMixin, unittest.TestCase): - """ - AuthPolicies unit test stubs - create policy # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_policies_policy_id/__init__.py b/clients/python/test/test_paths/test_auth_policies_policy_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_policies_policy_id/test_delete.py b/clients/python/test/test_paths/test_auth_policies_policy_id/test_delete.py deleted file mode 100644 index 4c507085f2c..00000000000 --- a/clients/python/test/test_paths/test_auth_policies_policy_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_policies_policy_id import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthPoliciesPolicyId(ApiTestMixin, unittest.TestCase): - """ - AuthPoliciesPolicyId unit test stubs - delete policy # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_policies_policy_id/test_get.py b/clients/python/test/test_paths/test_auth_policies_policy_id/test_get.py deleted file mode 100644 index 27b96231f9d..00000000000 --- a/clients/python/test/test_paths/test_auth_policies_policy_id/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_policies_policy_id import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthPoliciesPolicyId(ApiTestMixin, unittest.TestCase): - """ - AuthPoliciesPolicyId unit test stubs - get policy # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_policies_policy_id/test_put.py b/clients/python/test/test_paths/test_auth_policies_policy_id/test_put.py deleted file mode 100644 index 5010393884a..00000000000 --- a/clients/python/test/test_paths/test_auth_policies_policy_id/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_policies_policy_id import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthPoliciesPolicyId(ApiTestMixin, unittest.TestCase): - """ - AuthPoliciesPolicyId unit test stubs - update policy # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users/__init__.py b/clients/python/test/test_paths/test_auth_users/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_users/test_get.py b/clients/python/test/test_paths/test_auth_users/test_get.py deleted file mode 100644 index fde74fb9882..00000000000 --- a/clients/python/test/test_paths/test_auth_users/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsers(ApiTestMixin, unittest.TestCase): - """ - AuthUsers unit test stubs - list users # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users/test_post.py b/clients/python/test/test_paths/test_auth_users/test_post.py deleted file mode 100644 index c629e0719d8..00000000000 --- a/clients/python/test/test_paths/test_auth_users/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsers(ApiTestMixin, unittest.TestCase): - """ - AuthUsers unit test stubs - create user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id/__init__.py b/clients/python/test/test_paths/test_auth_users_user_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_users_user_id/test_delete.py b/clients/python/test/test_paths/test_auth_users_user_id/test_delete.py deleted file mode 100644 index c2fb398fcbb..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserId(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserId unit test stubs - delete user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id/test_get.py b/clients/python/test/test_paths/test_auth_users_user_id/test_get.py deleted file mode 100644 index ce98105764b..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserId(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserId unit test stubs - get user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_credentials/__init__.py b/clients/python/test/test_paths/test_auth_users_user_id_credentials/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_users_user_id_credentials/test_get.py b/clients/python/test/test_paths/test_auth_users_user_id_credentials/test_get.py deleted file mode 100644 index 100ec1a3571..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_credentials/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_credentials import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdCredentials(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdCredentials unit test stubs - list user credentials # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_credentials/test_post.py b/clients/python/test/test_paths/test_auth_users_user_id_credentials/test_post.py deleted file mode 100644 index 4b5c0eade59..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_credentials/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_credentials import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdCredentials(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdCredentials unit test stubs - create credentials # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/__init__.py b/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_delete.py b/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_delete.py deleted file mode 100644 index bb51dcf0ec5..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_credentials_access_key_id import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdCredentialsAccessKeyId(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdCredentialsAccessKeyId unit test stubs - delete credentials # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_get.py b/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_get.py deleted file mode 100644 index b91318872d6..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_credentials_access_key_id/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_credentials_access_key_id import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdCredentialsAccessKeyId(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdCredentialsAccessKeyId unit test stubs - get credentials # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_groups/__init__.py b/clients/python/test/test_paths/test_auth_users_user_id_groups/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_users_user_id_groups/test_get.py b/clients/python/test/test_paths/test_auth_users_user_id_groups/test_get.py deleted file mode 100644 index 1fdad627c78..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_groups/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_groups import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdGroups(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdGroups unit test stubs - list user groups # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_policies/__init__.py b/clients/python/test/test_paths/test_auth_users_user_id_policies/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_users_user_id_policies/test_get.py b/clients/python/test/test_paths/test_auth_users_user_id_policies/test_get.py deleted file mode 100644 index a1b1f7969ba..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_policies/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_policies import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdPolicies(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdPolicies unit test stubs - list user policies # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/__init__.py b/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_delete.py b/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_delete.py deleted file mode 100644 index c38e1c0fc73..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_policies_policy_id import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdPoliciesPolicyId(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdPoliciesPolicyId unit test stubs - detach policy from user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_put.py b/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_put.py deleted file mode 100644 index b89a8b3be34..00000000000 --- a/clients/python/test/test_paths/test_auth_users_user_id_policies_policy_id/test_put.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.auth_users_user_id_policies_policy_id import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAuthUsersUserIdPoliciesPolicyId(ApiTestMixin, unittest.TestCase): - """ - AuthUsersUserIdPoliciesPolicyId unit test stubs - attach policy to user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_config_garbage_collection/__init__.py b/clients/python/test/test_paths/test_config_garbage_collection/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_config_garbage_collection/test_get.py b/clients/python/test/test_paths/test_config_garbage_collection/test_get.py deleted file mode 100644 index e4b2593f487..00000000000 --- a/clients/python/test/test_paths/test_config_garbage_collection/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.config_garbage_collection import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestConfigGarbageCollection(ApiTestMixin, unittest.TestCase): - """ - ConfigGarbageCollection unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_config_storage/__init__.py b/clients/python/test/test_paths/test_config_storage/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_config_storage/test_get.py b/clients/python/test/test_paths/test_config_storage/test_get.py deleted file mode 100644 index 94c2321ebb2..00000000000 --- a/clients/python/test/test_paths/test_config_storage/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.config_storage import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestConfigStorage(ApiTestMixin, unittest.TestCase): - """ - ConfigStorage unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_config_version/__init__.py b/clients/python/test/test_paths/test_config_version/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_config_version/test_get.py b/clients/python/test/test_paths/test_config_version/test_get.py deleted file mode 100644 index 8c6f02ba32c..00000000000 --- a/clients/python/test/test_paths/test_config_version/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.config_version import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestConfigVersion(ApiTestMixin, unittest.TestCase): - """ - ConfigVersion unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_healthcheck/__init__.py b/clients/python/test/test_paths/test_healthcheck/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_healthcheck/test_get.py b/clients/python/test/test_paths/test_healthcheck/test_get.py deleted file mode 100644 index 31906e82a3b..00000000000 --- a/clients/python/test/test_paths/test_healthcheck/test_get.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.healthcheck import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestHealthcheck(ApiTestMixin, unittest.TestCase): - """ - Healthcheck unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories/__init__.py b/clients/python/test/test_paths/test_repositories/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories/test_get.py b/clients/python/test/test_paths/test_repositories/test_get.py deleted file mode 100644 index db2c6239973..00000000000 --- a/clients/python/test/test_paths/test_repositories/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositories(ApiTestMixin, unittest.TestCase): - """ - Repositories unit test stubs - list repositories # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories/test_post.py b/clients/python/test/test_paths/test_repositories/test_post.py deleted file mode 100644 index 98226f5e5b0..00000000000 --- a/clients/python/test/test_paths/test_repositories/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositories(ApiTestMixin, unittest.TestCase): - """ - Repositories unit test stubs - create repository # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository/__init__.py b/clients/python/test/test_paths/test_repositories_repository/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository/test_delete.py b/clients/python/test/test_paths/test_repositories_repository/test_delete.py deleted file mode 100644 index 4f8bab53a84..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepository(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepository unit test stubs - delete repository # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository/test_get.py b/clients/python/test/test_paths/test_repositories_repository/test_get.py deleted file mode 100644 index 2111f81afab..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepository(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepository unit test stubs - get repository # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs/__init__.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs/test_get.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs/test_get.py deleted file mode 100644 index 9824051eb21..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_actions_runs/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_actions_runs import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryActionsRuns(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryActionsRuns unit test stubs - list runs # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id/__init__.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id/test_get.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id/test_get.py deleted file mode 100644 index 7d878a4337f..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_actions_runs_run_id import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryActionsRunsRunId(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryActionsRunsRunId unit test stubs - get a run # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks/__init__.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks/test_get.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks/test_get.py deleted file mode 100644 index 7814818fcbe..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryActionsRunsRunIdHooks(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryActionsRunsRunIdHooks unit test stubs - list run hooks # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/__init__.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/test_get.py b/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/test_get.py deleted file mode 100644 index 5b2673a4c93..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_actions_runs_run_id_hooks_hook_run_id_output/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_actions_runs_run_id_hooks_hook_run_id_output import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryActionsRunsRunIdHooksHookRunIdOutput(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryActionsRunsRunIdHooksHookRunIdOutput unit test stubs - get run hook output # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branch_protection/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branch_protection/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_delete.py b/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_delete.py deleted file mode 100644 index dfe4b90aa3b..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branch_protection import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchProtection(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchProtection unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_get.py b/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_get.py deleted file mode 100644 index fe5c3185adb..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branch_protection import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchProtection(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchProtection unit test stubs - get branch protection rules # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_post.py deleted file mode 100644 index 5feb41d6801..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branch_protection/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branch_protection import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchProtection(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchProtection unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches/test_get.py b/clients/python/test/test_paths/test_repositories_repository_branches/test_get.py deleted file mode 100644 index 1510315050a..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranches(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranches unit test stubs - list branches # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches/test_post.py deleted file mode 100644 index 16eb12a4336..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranches(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranches unit test stubs - create branch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_delete.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_delete.py deleted file mode 100644 index 644ce27952e..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranch(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranch unit test stubs - delete branch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_get.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_get.py deleted file mode 100644 index 3963da2744f..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranch(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranch unit test stubs - get branch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_put.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_put.py deleted file mode 100644 index 4b2a23f3469..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch/test_put.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranch(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranch unit test stubs - reset branch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_cherry_pick/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_cherry_pick/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_cherry_pick/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_cherry_pick/test_post.py deleted file mode 100644 index 71f6222514e..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_cherry_pick/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_cherry_pick import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchCherryPick(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchCherryPick unit test stubs - Replay the changes from the given commit on the branch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_get.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_get.py deleted file mode 100644 index e2425417859..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_commits import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchCommits(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchCommits unit test stubs - get commit log from branch. Deprecated: replaced by logCommits by passing branch name as ref # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_post.py deleted file mode 100644 index e93a6682908..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_commits/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_commits import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchCommits(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchCommits unit test stubs - create commit # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_diff/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_diff/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_diff/test_get.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_diff/test_get.py deleted file mode 100644 index 1194e59e580..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_diff/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_diff import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchDiff(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchDiff unit test stubs - diff branch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_delete.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_delete.py deleted file mode 100644 index 90baa35826f..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_objects import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchObjects(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchObjects unit test stubs - delete object. Missing objects will not return a NotFound error. # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_post.py deleted file mode 100644 index 2cb77f6cfe2..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_objects import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchObjects(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchObjects unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_put.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_put.py deleted file mode 100644 index 5a389bd9dfa..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_objects import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchObjects(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchObjects unit test stubs - stage an object's metadata for the given branch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_copy/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_copy/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_copy/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_copy/test_post.py deleted file mode 100644 index 9bff921cd7b..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_copy/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_objects_copy import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchObjectsCopy(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchObjectsCopy unit test stubs - create a copy of an object # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_delete/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_delete/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_delete/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_delete/test_post.py deleted file mode 100644 index c64d144c48c..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_objects_delete/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_objects_delete import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchObjectsDelete(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchObjectsDelete unit test stubs - delete objects. Missing objects will not return a NotFound error. # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_revert/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_revert/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_revert/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_revert/test_post.py deleted file mode 100644 index 013c50c3103..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_revert/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_revert import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchRevert(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchRevert unit test stubs - revert # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_get.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_get.py deleted file mode 100644 index e753ec07d8e..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_staging_backing import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchStagingBacking(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchStagingBacking unit test stubs - get a physical address and a return token to write object to underlying storage # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_put.py b/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_put.py deleted file mode 100644 index 781923455d7..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_branch_staging_backing/test_put.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_branch_staging_backing import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesBranchStagingBacking(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesBranchStagingBacking unit test stubs - associate staging on this physical address with a path # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_metaranges/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_metaranges/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_metaranges/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_metaranges/test_post.py deleted file mode 100644 index 57411ef127b..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_metaranges/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_metaranges import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesMetaranges(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesMetaranges unit test stubs - create a lakeFS metarange file from the given ranges # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_ranges/__init__.py b/clients/python/test/test_paths/test_repositories_repository_branches_ranges/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_branches_ranges/test_post.py b/clients/python/test/test_paths/test_repositories_repository_branches_ranges/test_post.py deleted file mode 100644 index cd612f470c8..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_branches_ranges/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_branches_ranges import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryBranchesRanges(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryBranchesRanges unit test stubs - create a lakeFS range file from the source uri # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_commits_commit_id/__init__.py b/clients/python/test/test_paths/test_repositories_repository_commits_commit_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_commits_commit_id/test_get.py b/clients/python/test/test_paths/test_repositories_repository_commits_commit_id/test_get.py deleted file mode 100644 index 41c4f429f35..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_commits_commit_id/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_commits_commit_id import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryCommitsCommitId(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryCommitsCommitId unit test stubs - get commit # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_prepare_commits/__init__.py b/clients/python/test/test_paths/test_repositories_repository_gc_prepare_commits/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_prepare_commits/test_post.py b/clients/python/test/test_paths/test_repositories_repository_gc_prepare_commits/test_post.py deleted file mode 100644 index 5b355c0c7d2..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_gc_prepare_commits/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_gc_prepare_commits import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryGcPrepareCommits(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryGcPrepareCommits unit test stubs - save lists of active and expired commits for garbage collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_prepare_uncommited/__init__.py b/clients/python/test/test_paths/test_repositories_repository_gc_prepare_uncommited/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_prepare_uncommited/test_post.py b/clients/python/test/test_paths/test_repositories_repository_gc_prepare_uncommited/test_post.py deleted file mode 100644 index ffd3c645532..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_gc_prepare_uncommited/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_gc_prepare_uncommited import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryGcPrepareUncommited(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryGcPrepareUncommited unit test stubs - save repository uncommitted metadata for garbage collection # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_rules/__init__.py b/clients/python/test/test_paths/test_repositories_repository_gc_rules/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_delete.py b/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_delete.py deleted file mode 100644 index bc3c679c767..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_delete.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_gc_rules import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryGcRules(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryGcRules unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_get.py b/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_get.py deleted file mode 100644 index 6790f0981ab..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_gc_rules import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryGcRules(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryGcRules unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_post.py b/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_post.py deleted file mode 100644 index d76b23dc912..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_gc_rules/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_gc_rules import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryGcRules(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryGcRules unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_metadata_meta_range_meta_range/__init__.py b/clients/python/test/test_paths/test_repositories_repository_metadata_meta_range_meta_range/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_metadata_meta_range_meta_range/test_get.py b/clients/python/test/test_paths/test_repositories_repository_metadata_meta_range_meta_range/test_get.py deleted file mode 100644 index 80284a43045..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_metadata_meta_range_meta_range/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_metadata_meta_range_meta_range import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryMetadataMetaRangeMetaRange(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryMetadataMetaRangeMetaRange unit test stubs - return URI to a meta-range file # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_metadata_range_range/__init__.py b/clients/python/test/test_paths/test_repositories_repository_metadata_range_range/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_metadata_range_range/test_get.py b/clients/python/test/test_paths/test_repositories_repository_metadata_range_range/test_get.py deleted file mode 100644 index 2331551bb3c..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_metadata_range_range/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_metadata_range_range import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryMetadataRangeRange(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryMetadataRangeRange unit test stubs - return URI to a range file # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_otf_refs_left_ref_diff_right_ref/__init__.py b/clients/python/test/test_paths/test_repositories_repository_otf_refs_left_ref_diff_right_ref/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_otf_refs_left_ref_diff_right_ref/test_get.py b/clients/python/test/test_paths/test_repositories_repository_otf_refs_left_ref_diff_right_ref/test_get.py deleted file mode 100644 index d0a6f5db351..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_otf_refs_left_ref_diff_right_ref/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_otf_refs_left_ref_diff_right_ref import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryOtfRefsLeftRefDiffRightRef(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryOtfRefsLeftRefDiffRightRef unit test stubs - perform otf diff # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_branch_symlink/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_branch_symlink/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_branch_symlink/test_post.py b/clients/python/test/test_paths/test_repositories_repository_refs_branch_symlink/test_post.py deleted file mode 100644 index a6a2358b5a5..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_branch_symlink/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_branch_symlink import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsBranchSymlink(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsBranchSymlink unit test stubs - creates symlink files corresponding to the given directory # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_dump/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_dump/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_dump/test_put.py b/clients/python/test/test_paths/test_repositories_repository_refs_dump/test_put.py deleted file mode 100644 index 86fe7cd7d03..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_dump/test_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_dump import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsDump(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsDump unit test stubs - Dump repository refs (tags, commits, branches) to object store # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_left_ref_diff_right_ref/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_left_ref_diff_right_ref/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_left_ref_diff_right_ref/test_get.py b/clients/python/test/test_paths/test_repositories_repository_refs_left_ref_diff_right_ref/test_get.py deleted file mode 100644 index 8694d260675..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_left_ref_diff_right_ref/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_left_ref_diff_right_ref import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsLeftRefDiffRightRef(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsLeftRefDiffRightRef unit test stubs - diff references # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_commits/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_commits/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_commits/test_get.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_commits/test_get.py deleted file mode 100644 index 98552ce5c56..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_ref_commits/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_ref_commits import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsRefCommits(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsRefCommits unit test stubs - get commit log from ref. If both objects and prefixes are empty, return all commits. # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_get.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_get.py deleted file mode 100644 index f765ccdb3ae..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_ref_objects import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsRefObjects(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsRefObjects unit test stubs - get object content # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_head.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_head.py deleted file mode 100644 index 1880d854419..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects/test_head.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_ref_objects import head # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsRefObjects(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsRefObjects unit test stubs - check if object exists # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = head.ApiForhead(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_ls/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_ls/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_ls/test_get.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_ls/test_get.py deleted file mode 100644 index 1e1c2b8b4c3..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_ls/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_ref_objects_ls import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsRefObjectsLs(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsRefObjectsLs unit test stubs - list objects under a given prefix # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_stat/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_stat/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_stat/test_get.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_stat/test_get.py deleted file mode 100644 index c867938e074..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_stat/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_ref_objects_stat import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsRefObjectsStat(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsRefObjectsStat unit test stubs - get object metadata # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_underlying_properties/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_underlying_properties/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_underlying_properties/test_get.py b/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_underlying_properties/test_get.py deleted file mode 100644 index 2a029531388..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_ref_objects_underlying_properties/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_ref_objects_underlying_properties import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsRefObjectsUnderlyingProperties(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsRefObjectsUnderlyingProperties unit test stubs - get object properties on underlying storage # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_restore/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_restore/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_restore/test_put.py b/clients/python/test/test_paths/test_repositories_repository_refs_restore/test_put.py deleted file mode 100644 index 62de3660550..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_restore/test_put.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_restore import put # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsRestore(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsRestore unit test stubs - Restore repository refs (tags, commits, branches) from object store # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/__init__.py b/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_get.py b/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_get.py deleted file mode 100644 index 9eeb9930eb9..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_source_ref_merge_destination_branch import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsSourceRefMergeDestinationBranch(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsSourceRefMergeDestinationBranch unit test stubs - find the merge base for 2 references # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_post.py b/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_post.py deleted file mode 100644 index 468fee3f2a5..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_refs_source_ref_merge_destination_branch/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_refs_source_ref_merge_destination_branch import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryRefsSourceRefMergeDestinationBranch(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryRefsSourceRefMergeDestinationBranch unit test stubs - merge references # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_tags/__init__.py b/clients/python/test/test_paths/test_repositories_repository_tags/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_tags/test_get.py b/clients/python/test/test_paths/test_repositories_repository_tags/test_get.py deleted file mode 100644 index 61d16cd8bc9..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_tags/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_tags import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryTags(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryTags unit test stubs - list tags # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_tags/test_post.py b/clients/python/test/test_paths/test_repositories_repository_tags/test_post.py deleted file mode 100644 index ce707f09125..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_tags/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_tags import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryTags(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryTags unit test stubs - create tag # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 201 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_tags_tag/__init__.py b/clients/python/test/test_paths/test_repositories_repository_tags_tag/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_repositories_repository_tags_tag/test_delete.py b/clients/python/test/test_paths/test_repositories_repository_tags_tag/test_delete.py deleted file mode 100644 index 782cdcffe3e..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_tags_tag/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_tags_tag import delete # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryTagsTag(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryTagsTag unit test stubs - delete tag # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_repositories_repository_tags_tag/test_get.py b/clients/python/test/test_paths/test_repositories_repository_tags_tag/test_get.py deleted file mode 100644 index 4d1ddd2c6ee..00000000000 --- a/clients/python/test/test_paths/test_repositories_repository_tags_tag/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.repositories_repository_tags_tag import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRepositoriesRepositoryTagsTag(ApiTestMixin, unittest.TestCase): - """ - RepositoriesRepositoryTagsTag unit test stubs - get tag # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_setup_comm_prefs/__init__.py b/clients/python/test/test_paths/test_setup_comm_prefs/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_setup_comm_prefs/test_post.py b/clients/python/test/test_paths/test_setup_comm_prefs/test_post.py deleted file mode 100644 index 788507e314b..00000000000 --- a/clients/python/test/test_paths/test_setup_comm_prefs/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.setup_comm_prefs import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestSetupCommPrefs(ApiTestMixin, unittest.TestCase): - """ - SetupCommPrefs unit test stubs - setup communications preferences # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_setup_lakefs/__init__.py b/clients/python/test/test_paths/test_setup_lakefs/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_setup_lakefs/test_get.py b/clients/python/test/test_paths/test_setup_lakefs/test_get.py deleted file mode 100644 index 60a4a6ac36d..00000000000 --- a/clients/python/test/test_paths/test_setup_lakefs/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.setup_lakefs import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestSetupLakefs(ApiTestMixin, unittest.TestCase): - """ - SetupLakefs unit test stubs - check if the lakeFS installation is already set up # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_setup_lakefs/test_post.py b/clients/python/test/test_paths/test_setup_lakefs/test_post.py deleted file mode 100644 index 20166a72589..00000000000 --- a/clients/python/test/test_paths/test_setup_lakefs/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.setup_lakefs import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestSetupLakefs(ApiTestMixin, unittest.TestCase): - """ - SetupLakefs unit test stubs - setup lakeFS and create a first user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_statistics/__init__.py b/clients/python/test/test_paths/test_statistics/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_statistics/test_post.py b/clients/python/test/test_paths/test_statistics/test_post.py deleted file mode 100644 index d69e505141d..00000000000 --- a/clients/python/test/test_paths/test_statistics/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.statistics import post # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestStatistics(ApiTestMixin, unittest.TestCase): - """ - Statistics unit test stubs - post stats events, this endpoint is meant for internal use only # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 204 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_templates_template_location/__init__.py b/clients/python/test/test_paths/test_templates_template_location/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_templates_template_location/test_get.py b/clients/python/test/test_paths/test_templates_template_location/test_get.py deleted file mode 100644 index 80c8eb6c6af..00000000000 --- a/clients/python/test/test_paths/test_templates_template_location/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.templates_template_location import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestTemplatesTemplateLocation(ApiTestMixin, unittest.TestCase): - """ - TemplatesTemplateLocation unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_paths/test_user/__init__.py b/clients/python/test/test_paths/test_user/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clients/python/test/test_paths/test_user/test_get.py b/clients/python/test/test_paths/test_user/test_get.py deleted file mode 100644 index 635a5694dea..00000000000 --- a/clients/python/test/test_paths/test_user/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import lakefs_client -from lakefs_client.paths.user import get # noqa: E501 -from lakefs_client import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUser(ApiTestMixin, unittest.TestCase): - """ - User unit test stubs - get current user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/python/test/test_models/test_policy.py b/clients/python/test/test_policy.py similarity index 52% rename from clients/python/test/test_models/test_policy.py rename to clients/python/test/test_policy.py index fcbfcc93b61..dd590bd9e3d 100644 --- a/clients/python/test/test_models/test_policy.py +++ b/clients/python/test/test_policy.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.statement import Statement +globals()['Statement'] = Statement from lakefs_client.model.policy import Policy -from lakefs_client import configuration class TestPolicy(unittest.TestCase): """Policy unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPolicy(self): + """Test Policy""" + # FIXME: construct object with mandatory attributes with example values + # model = Policy() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_policy_list.py b/clients/python/test/test_policy_list.py new file mode 100644 index 00000000000..7cd67aa6b96 --- /dev/null +++ b/clients/python/test/test_policy_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.pagination import Pagination +from lakefs_client.model.policy import Policy +globals()['Pagination'] = Pagination +globals()['Policy'] = Policy +from lakefs_client.model.policy_list import PolicyList + + +class TestPolicyList(unittest.TestCase): + """PolicyList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPolicyList(self): + """Test PolicyList""" + # FIXME: construct object with mandatory attributes with example values + # model = PolicyList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_prepare_gc_uncommitted_request.py b/clients/python/test/test_prepare_gc_uncommitted_request.py similarity index 59% rename from clients/python/test/test_models/test_prepare_gc_uncommitted_request.py rename to clients/python/test/test_prepare_gc_uncommitted_request.py index e426864f7ce..58e1464b103 100644 --- a/clients/python/test/test_models/test_prepare_gc_uncommitted_request.py +++ b/clients/python/test/test_prepare_gc_uncommitted_request.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.prepare_gc_uncommitted_request import PrepareGCUncommittedRequest -from lakefs_client import configuration class TestPrepareGCUncommittedRequest(unittest.TestCase): """PrepareGCUncommittedRequest unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPrepareGCUncommittedRequest(self): + """Test PrepareGCUncommittedRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = PrepareGCUncommittedRequest() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_prepare_gc_uncommitted_response.py b/clients/python/test/test_prepare_gc_uncommitted_response.py similarity index 59% rename from clients/python/test/test_models/test_prepare_gc_uncommitted_response.py rename to clients/python/test/test_prepare_gc_uncommitted_response.py index 11d0c20c57a..aaa6c61d938 100644 --- a/clients/python/test/test_models/test_prepare_gc_uncommitted_response.py +++ b/clients/python/test/test_prepare_gc_uncommitted_response.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.prepare_gc_uncommitted_response import PrepareGCUncommittedResponse -from lakefs_client import configuration class TestPrepareGCUncommittedResponse(unittest.TestCase): """PrepareGCUncommittedResponse unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPrepareGCUncommittedResponse(self): + """Test PrepareGCUncommittedResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = PrepareGCUncommittedResponse() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_range_metadata.py b/clients/python/test/test_range_metadata.py similarity index 59% rename from clients/python/test/test_models/test_range_metadata.py rename to clients/python/test/test_range_metadata.py index 914e5142c60..cad131bda27 100644 --- a/clients/python/test/test_models/test_range_metadata.py +++ b/clients/python/test/test_range_metadata.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.range_metadata import RangeMetadata -from lakefs_client import configuration class TestRangeMetadata(unittest.TestCase): """RangeMetadata unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRangeMetadata(self): + """Test RangeMetadata""" + # FIXME: construct object with mandatory attributes with example values + # model = RangeMetadata() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_ref.py b/clients/python/test/test_ref.py similarity index 59% rename from clients/python/test/test_models/test_ref.py rename to clients/python/test/test_ref.py index d474e29ce56..2a7325127b7 100644 --- a/clients/python/test/test_models/test_ref.py +++ b/clients/python/test/test_ref.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.ref import Ref -from lakefs_client import configuration class TestRef(unittest.TestCase): """Ref unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRef(self): + """Test Ref""" + # FIXME: construct object with mandatory attributes with example values + # model = Ref() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_ref_list.py b/clients/python/test/test_ref_list.py new file mode 100644 index 00000000000..e1ffbebafe2 --- /dev/null +++ b/clients/python/test/test_ref_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.pagination import Pagination +from lakefs_client.model.ref import Ref +globals()['Pagination'] = Pagination +globals()['Ref'] = Ref +from lakefs_client.model.ref_list import RefList + + +class TestRefList(unittest.TestCase): + """RefList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRefList(self): + """Test RefList""" + # FIXME: construct object with mandatory attributes with example values + # model = RefList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_refs_api.py b/clients/python/test/test_refs_api.py new file mode 100644 index 00000000000..0d471cf8912 --- /dev/null +++ b/clients/python/test/test_refs_api.py @@ -0,0 +1,71 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.refs_api import RefsApi # noqa: E501 + + +class TestRefsApi(unittest.TestCase): + """RefsApi unit test stubs""" + + def setUp(self): + self.api = RefsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_diff_refs(self): + """Test case for diff_refs + + diff references # noqa: E501 + """ + pass + + def test_dump_refs(self): + """Test case for dump_refs + + Dump repository refs (tags, commits, branches) to object store # noqa: E501 + """ + pass + + def test_find_merge_base(self): + """Test case for find_merge_base + + find the merge base for 2 references # noqa: E501 + """ + pass + + def test_log_commits(self): + """Test case for log_commits + + get commit log from ref. If both objects and prefixes are empty, return all commits. # noqa: E501 + """ + pass + + def test_merge_into_branch(self): + """Test case for merge_into_branch + + merge references # noqa: E501 + """ + pass + + def test_restore_refs(self): + """Test case for restore_refs + + Restore repository refs (tags, commits, branches) from object store # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_refs_dump.py b/clients/python/test/test_refs_dump.py similarity index 59% rename from clients/python/test/test_models/test_refs_dump.py rename to clients/python/test/test_refs_dump.py index a562774e746..218ff21525f 100644 --- a/clients/python/test/test_models/test_refs_dump.py +++ b/clients/python/test/test_refs_dump.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.refs_dump import RefsDump -from lakefs_client import configuration class TestRefsDump(unittest.TestCase): """RefsDump unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRefsDump(self): + """Test RefsDump""" + # FIXME: construct object with mandatory attributes with example values + # model = RefsDump() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_repositories_api.py b/clients/python/test/test_repositories_api.py new file mode 100644 index 00000000000..e537dec096b --- /dev/null +++ b/clients/python/test/test_repositories_api.py @@ -0,0 +1,76 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.repositories_api import RepositoriesApi # noqa: E501 + + +class TestRepositoriesApi(unittest.TestCase): + """RepositoriesApi unit test stubs""" + + def setUp(self): + self.api = RepositoriesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_branch_protection_rule(self): + """Test case for create_branch_protection_rule + + """ + pass + + def test_create_repository(self): + """Test case for create_repository + + create repository # noqa: E501 + """ + pass + + def test_delete_branch_protection_rule(self): + """Test case for delete_branch_protection_rule + + """ + pass + + def test_delete_repository(self): + """Test case for delete_repository + + delete repository # noqa: E501 + """ + pass + + def test_get_branch_protection_rules(self): + """Test case for get_branch_protection_rules + + get branch protection rules # noqa: E501 + """ + pass + + def test_get_repository(self): + """Test case for get_repository + + get repository # noqa: E501 + """ + pass + + def test_list_repositories(self): + """Test case for list_repositories + + list repositories # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_repository.py b/clients/python/test/test_repository.py similarity index 59% rename from clients/python/test/test_models/test_repository.py rename to clients/python/test/test_repository.py index 478b6a35d58..cde2e95c7d5 100644 --- a/clients/python/test/test_models/test_repository.py +++ b/clients/python/test/test_repository.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.repository import Repository -from lakefs_client import configuration class TestRepository(unittest.TestCase): """Repository unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepository(self): + """Test Repository""" + # FIXME: construct object with mandatory attributes with example values + # model = Repository() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_repository_creation.py b/clients/python/test/test_repository_creation.py similarity index 59% rename from clients/python/test/test_models/test_repository_creation.py rename to clients/python/test/test_repository_creation.py index 070717b94de..d7341bad297 100644 --- a/clients/python/test/test_models/test_repository_creation.py +++ b/clients/python/test/test_repository_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.repository_creation import RepositoryCreation -from lakefs_client import configuration class TestRepositoryCreation(unittest.TestCase): """RepositoryCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepositoryCreation(self): + """Test RepositoryCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = RepositoryCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_repository_list.py b/clients/python/test/test_repository_list.py new file mode 100644 index 00000000000..451db732006 --- /dev/null +++ b/clients/python/test/test_repository_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.pagination import Pagination +from lakefs_client.model.repository import Repository +globals()['Pagination'] = Pagination +globals()['Repository'] = Repository +from lakefs_client.model.repository_list import RepositoryList + + +class TestRepositoryList(unittest.TestCase): + """RepositoryList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepositoryList(self): + """Test RepositoryList""" + # FIXME: construct object with mandatory attributes with example values + # model = RepositoryList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_reset_creation.py b/clients/python/test/test_reset_creation.py similarity index 59% rename from clients/python/test/test_models/test_reset_creation.py rename to clients/python/test/test_reset_creation.py index 340e57395e6..4a1e2b01054 100644 --- a/clients/python/test/test_models/test_reset_creation.py +++ b/clients/python/test/test_reset_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.reset_creation import ResetCreation -from lakefs_client import configuration class TestResetCreation(unittest.TestCase): """ResetCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResetCreation(self): + """Test ResetCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = ResetCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_retention_api.py b/clients/python/test/test_retention_api.py new file mode 100644 index 00000000000..36c5ed80ba9 --- /dev/null +++ b/clients/python/test/test_retention_api.py @@ -0,0 +1,61 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.retention_api import RetentionApi # noqa: E501 + + +class TestRetentionApi(unittest.TestCase): + """RetentionApi unit test stubs""" + + def setUp(self): + self.api = RetentionApi() # noqa: E501 + + def tearDown(self): + pass + + def test_delete_garbage_collection_rules(self): + """Test case for delete_garbage_collection_rules + + """ + pass + + def test_get_garbage_collection_rules(self): + """Test case for get_garbage_collection_rules + + """ + pass + + def test_prepare_garbage_collection_commits(self): + """Test case for prepare_garbage_collection_commits + + save lists of active and expired commits for garbage collection # noqa: E501 + """ + pass + + def test_prepare_garbage_collection_uncommitted(self): + """Test case for prepare_garbage_collection_uncommitted + + save repository uncommitted metadata for garbage collection # noqa: E501 + """ + pass + + def test_set_garbage_collection_rules(self): + """Test case for set_garbage_collection_rules + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_revert_creation.py b/clients/python/test/test_revert_creation.py similarity index 59% rename from clients/python/test/test_models/test_revert_creation.py rename to clients/python/test/test_revert_creation.py index a504896de62..331d4a3869f 100644 --- a/clients/python/test/test_models/test_revert_creation.py +++ b/clients/python/test/test_revert_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.revert_creation import RevertCreation -from lakefs_client import configuration class TestRevertCreation(unittest.TestCase): """RevertCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRevertCreation(self): + """Test RevertCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = RevertCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_setup.py b/clients/python/test/test_setup.py new file mode 100644 index 00000000000..fd85a5c9b38 --- /dev/null +++ b/clients/python/test/test_setup.py @@ -0,0 +1,38 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.access_key_credentials import AccessKeyCredentials +globals()['AccessKeyCredentials'] = AccessKeyCredentials +from lakefs_client.model.setup import Setup + + +class TestSetup(unittest.TestCase): + """Setup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSetup(self): + """Test Setup""" + # FIXME: construct object with mandatory attributes with example values + # model = Setup() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_setup_state.py b/clients/python/test/test_setup_state.py similarity index 52% rename from clients/python/test/test_models/test_setup_state.py rename to clients/python/test/test_setup_state.py index 9b279cc92bd..e655c44a451 100644 --- a/clients/python/test/test_models/test_setup_state.py +++ b/clients/python/test/test_setup_state.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.login_config import LoginConfig +globals()['LoginConfig'] = LoginConfig from lakefs_client.model.setup_state import SetupState -from lakefs_client import configuration class TestSetupState(unittest.TestCase): """SetupState unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSetupState(self): + """Test SetupState""" + # FIXME: construct object with mandatory attributes with example values + # model = SetupState() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_stage_range_creation.py b/clients/python/test/test_stage_range_creation.py similarity index 59% rename from clients/python/test/test_models/test_stage_range_creation.py rename to clients/python/test/test_stage_range_creation.py index 9931b6be34e..f75cbff5acd 100644 --- a/clients/python/test/test_models/test_stage_range_creation.py +++ b/clients/python/test/test_stage_range_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.stage_range_creation import StageRangeCreation -from lakefs_client import configuration class TestStageRangeCreation(unittest.TestCase): """StageRangeCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStageRangeCreation(self): + """Test StageRangeCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = StageRangeCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_staging_api.py b/clients/python/test/test_staging_api.py new file mode 100644 index 00000000000..94fb0c69dd7 --- /dev/null +++ b/clients/python/test/test_staging_api.py @@ -0,0 +1,43 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.staging_api import StagingApi # noqa: E501 + + +class TestStagingApi(unittest.TestCase): + """StagingApi unit test stubs""" + + def setUp(self): + self.api = StagingApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_physical_address(self): + """Test case for get_physical_address + + get a physical address and a return token to write object to underlying storage # noqa: E501 + """ + pass + + def test_link_physical_address(self): + """Test case for link_physical_address + + associate staging on this physical address with a path # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_staging_location.py b/clients/python/test/test_staging_location.py similarity index 59% rename from clients/python/test/test_models/test_staging_location.py rename to clients/python/test/test_staging_location.py index 1f016a6bbf2..7d1cf818864 100644 --- a/clients/python/test/test_models/test_staging_location.py +++ b/clients/python/test/test_staging_location.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.staging_location import StagingLocation -from lakefs_client import configuration class TestStagingLocation(unittest.TestCase): """StagingLocation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStagingLocation(self): + """Test StagingLocation""" + # FIXME: construct object with mandatory attributes with example values + # model = StagingLocation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_staging_metadata.py b/clients/python/test/test_staging_metadata.py similarity index 51% rename from clients/python/test/test_models/test_staging_metadata.py rename to clients/python/test/test_staging_metadata.py index 08d045a797d..13c435d1930 100644 --- a/clients/python/test/test_models/test_staging_metadata.py +++ b/clients/python/test/test_staging_metadata.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.staging_location import StagingLocation +globals()['StagingLocation'] = StagingLocation from lakefs_client.model.staging_metadata import StagingMetadata -from lakefs_client import configuration class TestStagingMetadata(unittest.TestCase): """StagingMetadata unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStagingMetadata(self): + """Test StagingMetadata""" + # FIXME: construct object with mandatory attributes with example values + # model = StagingMetadata() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_statement.py b/clients/python/test/test_statement.py similarity index 59% rename from clients/python/test/test_models/test_statement.py rename to clients/python/test/test_statement.py index 6382f1931da..d64d0723c92 100644 --- a/clients/python/test/test_models/test_statement.py +++ b/clients/python/test/test_statement.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.statement import Statement -from lakefs_client import configuration class TestStatement(unittest.TestCase): """Statement unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatement(self): + """Test Statement""" + # FIXME: construct object with mandatory attributes with example values + # model = Statement() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_statistics_api.py b/clients/python/test/test_statistics_api.py new file mode 100644 index 00000000000..d77a05ccf61 --- /dev/null +++ b/clients/python/test/test_statistics_api.py @@ -0,0 +1,36 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.statistics_api import StatisticsApi # noqa: E501 + + +class TestStatisticsApi(unittest.TestCase): + """StatisticsApi unit test stubs""" + + def setUp(self): + self.api = StatisticsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_post_stats_events(self): + """Test case for post_stats_events + + post stats events, this endpoint is meant for internal use only # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_stats_event.py b/clients/python/test/test_stats_event.py similarity index 59% rename from clients/python/test/test_models/test_stats_event.py rename to clients/python/test/test_stats_event.py index c0398fb7b2a..472c7f27209 100644 --- a/clients/python/test/test_models/test_stats_event.py +++ b/clients/python/test/test_stats_event.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.stats_event import StatsEvent -from lakefs_client import configuration class TestStatsEvent(unittest.TestCase): """StatsEvent unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatsEvent(self): + """Test StatsEvent""" + # FIXME: construct object with mandatory attributes with example values + # model = StatsEvent() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_stats_events_list.py b/clients/python/test/test_stats_events_list.py similarity index 52% rename from clients/python/test/test_models/test_stats_events_list.py rename to clients/python/test/test_stats_events_list.py index 2a50a36275a..87fb8ff9d95 100644 --- a/clients/python/test/test_models/test_stats_events_list.py +++ b/clients/python/test/test_stats_events_list.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,30 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client +from lakefs_client.model.stats_event import StatsEvent +globals()['StatsEvent'] = StatsEvent from lakefs_client.model.stats_events_list import StatsEventsList -from lakefs_client import configuration class TestStatsEventsList(unittest.TestCase): """StatsEventsList unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatsEventsList(self): + """Test StatsEventsList""" + # FIXME: construct object with mandatory attributes with example values + # model = StatsEventsList() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_storage_config.py b/clients/python/test/test_storage_config.py similarity index 59% rename from clients/python/test/test_models/test_storage_config.py rename to clients/python/test/test_storage_config.py index 31d149b65b9..abc7b3cf043 100644 --- a/clients/python/test/test_models/test_storage_config.py +++ b/clients/python/test/test_storage_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.storage_config import StorageConfig -from lakefs_client import configuration class TestStorageConfig(unittest.TestCase): """StorageConfig unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStorageConfig(self): + """Test StorageConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = StorageConfig() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_storage_uri.py b/clients/python/test/test_storage_uri.py similarity index 59% rename from clients/python/test/test_models/test_storage_uri.py rename to clients/python/test/test_storage_uri.py index 6cfd4688c1b..9c58ce7d07a 100644 --- a/clients/python/test/test_models/test_storage_uri.py +++ b/clients/python/test/test_storage_uri.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.storage_uri import StorageURI -from lakefs_client import configuration class TestStorageURI(unittest.TestCase): """StorageURI unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStorageURI(self): + """Test StorageURI""" + # FIXME: construct object with mandatory attributes with example values + # model = StorageURI() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_tag_creation.py b/clients/python/test/test_tag_creation.py similarity index 59% rename from clients/python/test/test_models/test_tag_creation.py rename to clients/python/test/test_tag_creation.py index 898e0f8302f..acda810f6fe 100644 --- a/clients/python/test/test_models/test_tag_creation.py +++ b/clients/python/test/test_tag_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.tag_creation import TagCreation -from lakefs_client import configuration class TestTagCreation(unittest.TestCase): """TagCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTagCreation(self): + """Test TagCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = TagCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_tags_api.py b/clients/python/test/test_tags_api.py new file mode 100644 index 00000000000..98c3adbfb7c --- /dev/null +++ b/clients/python/test/test_tags_api.py @@ -0,0 +1,57 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.tags_api import TagsApi # noqa: E501 + + +class TestTagsApi(unittest.TestCase): + """TagsApi unit test stubs""" + + def setUp(self): + self.api = TagsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_tag(self): + """Test case for create_tag + + create tag # noqa: E501 + """ + pass + + def test_delete_tag(self): + """Test case for delete_tag + + delete tag # noqa: E501 + """ + pass + + def test_get_tag(self): + """Test case for get_tag + + get tag # noqa: E501 + """ + pass + + def test_list_tags(self): + """Test case for list_tags + + list tags # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_templates_api.py b/clients/python/test/test_templates_api.py new file mode 100644 index 00000000000..5e8ccbc2c4d --- /dev/null +++ b/clients/python/test/test_templates_api.py @@ -0,0 +1,35 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import lakefs_client +from lakefs_client.api.templates_api import TemplatesApi # noqa: E501 + + +class TestTemplatesApi(unittest.TestCase): + """TemplatesApi unit test stubs""" + + def setUp(self): + self.api = TemplatesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_expand_template(self): + """Test case for expand_template + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_underlying_object_properties.py b/clients/python/test/test_underlying_object_properties.py similarity index 59% rename from clients/python/test/test_models/test_underlying_object_properties.py rename to clients/python/test/test_underlying_object_properties.py index 764677fc3c8..443b3476f6e 100644 --- a/clients/python/test/test_models/test_underlying_object_properties.py +++ b/clients/python/test/test_underlying_object_properties.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.underlying_object_properties import UnderlyingObjectProperties -from lakefs_client import configuration class TestUnderlyingObjectProperties(unittest.TestCase): """UnderlyingObjectProperties unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUnderlyingObjectProperties(self): + """Test UnderlyingObjectProperties""" + # FIXME: construct object with mandatory attributes with example values + # model = UnderlyingObjectProperties() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_update_password_by_token.py b/clients/python/test/test_update_password_by_token.py similarity index 59% rename from clients/python/test/test_models/test_update_password_by_token.py rename to clients/python/test/test_update_password_by_token.py index 9ddfce9a1a5..c1779e542de 100644 --- a/clients/python/test/test_models/test_update_password_by_token.py +++ b/clients/python/test/test_update_password_by_token.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.update_password_by_token import UpdatePasswordByToken -from lakefs_client import configuration class TestUpdatePasswordByToken(unittest.TestCase): """UpdatePasswordByToken unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdatePasswordByToken(self): + """Test UpdatePasswordByToken""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdatePasswordByToken() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_user.py b/clients/python/test/test_user.py similarity index 59% rename from clients/python/test/test_models/test_user.py rename to clients/python/test/test_user.py index 572334a8a7c..6b3f111e413 100644 --- a/clients/python/test/test_models/test_user.py +++ b/clients/python/test/test_user.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.user import User -from lakefs_client import configuration class TestUser(unittest.TestCase): """User unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUser(self): + """Test User""" + # FIXME: construct object with mandatory attributes with example values + # model = User() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_models/test_user_creation.py b/clients/python/test/test_user_creation.py similarity index 59% rename from clients/python/test/test_models/test_user_creation.py rename to clients/python/test/test_user_creation.py index 8889b51fd69..35ac95512d5 100644 --- a/clients/python/test/test_models/test_user_creation.py +++ b/clients/python/test/test_user_creation.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.user_creation import UserCreation -from lakefs_client import configuration class TestUserCreation(unittest.TestCase): """UserCreation unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserCreation(self): + """Test UserCreation""" + # FIXME: construct object with mandatory attributes with example values + # model = UserCreation() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/test/test_user_list.py b/clients/python/test/test_user_list.py new file mode 100644 index 00000000000..a25416df5ab --- /dev/null +++ b/clients/python/test/test_user_list.py @@ -0,0 +1,40 @@ +""" + lakeFS API + + lakeFS HTTP API # noqa: E501 + + The version of the OpenAPI document: 0.1.0 + Contact: services@treeverse.io + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import lakefs_client +from lakefs_client.model.pagination import Pagination +from lakefs_client.model.user import User +globals()['Pagination'] = Pagination +globals()['User'] = User +from lakefs_client.model.user_list import UserList + + +class TestUserList(unittest.TestCase): + """UserList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserList(self): + """Test UserList""" + # FIXME: construct object with mandatory attributes with example values + # model = UserList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/python/test/test_models/test_version_config.py b/clients/python/test/test_version_config.py similarity index 59% rename from clients/python/test/test_models/test_version_config.py rename to clients/python/test/test_version_config.py index efbd5838a2d..6504377a9c8 100644 --- a/clients/python/test/test_models/test_version_config.py +++ b/clients/python/test/test_version_config.py @@ -1,5 +1,3 @@ -# coding: utf-8 - """ lakeFS API @@ -10,16 +8,28 @@ Generated by: https://openapi-generator.tech """ + +import sys import unittest import lakefs_client from lakefs_client.model.version_config import VersionConfig -from lakefs_client import configuration class TestVersionConfig(unittest.TestCase): """VersionConfig unit test stubs""" - _configuration = configuration.Configuration() + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVersionConfig(self): + """Test VersionConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = VersionConfig() # noqa: E501 + pass if __name__ == '__main__': diff --git a/clients/python/tox.ini b/clients/python/tox.ini index 3ea156aa727..b9e26720b9e 100644 --- a/clients/python/tox.ini +++ b/clients/python/tox.ini @@ -1,8 +1,7 @@ [tox] -envlist = py37 +envlist = py3 [testenv] -passenv = PYTHON_VERSION deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt