From 91c95f33b4fe6a665a41a5593bb517c9c8c1b381 Mon Sep 17 00:00:00 2001 From: johnnyaug Date: Sun, 1 Oct 2023 12:23:51 +0300 Subject: [PATCH] clients after merge conflict --- clients/java/README.md | 19 +- clients/java/docs/ConfigApi.md | 88 -- clients/java/docs/InternalApi.md | 642 +++++++++++ .../java/io/lakefs/clients/api/ConfigApi.java | 107 -- .../io/lakefs/clients/api/InternalApi.java | 919 +++++++++++++++ .../io/lakefs/clients/api/ConfigApiTest.java | 15 - .../lakefs/clients/api/InternalApiTest.java | 111 ++ clients/python/README.md | 19 +- clients/python/docs/ConfigApi.md | 103 -- clients/python/docs/InternalApi.md | 759 ++++++++++++ .../python/lakefs_client/api/config_api.py | 110 -- .../python/lakefs_client/api/internal_api.py | 1026 +++++++++++++++-- clients/python/test/test_config_api.py | 6 - clients/python/test/test_internal_api.py | 43 + 14 files changed, 3444 insertions(+), 523 deletions(-) diff --git a/clients/java/README.md b/clients/java/README.md index b8e7ca78fec..ceb6b36d21b 100644 --- a/clients/java/README.md +++ b/clients/java/README.md @@ -181,7 +181,6 @@ Class | Method | HTTP request | Description *CommitsApi* | [**commit**](docs/CommitsApi.md#commit) | **POST** /repositories/{repository}/branches/{branch}/commits | create commit *CommitsApi* | [**getCommit**](docs/CommitsApi.md#getCommit) | **GET** /repositories/{repository}/commits/{commitId} | get commit *ConfigApi* | [**getConfig**](docs/ConfigApi.md#getConfig) | **GET** /config | -*ConfigApi* | [**getGarbageCollectionConfig**](docs/ConfigApi.md#getGarbageCollectionConfig) | **GET** /config/garbage-collection | *ExperimentalApi* | [**getOtfDiffs**](docs/ExperimentalApi.md#getOtfDiffs) | **GET** /otf/diffs | get the available Open Table Format diffs *ExperimentalApi* | [**otfDiff**](docs/ExperimentalApi.md#otfDiff) | **GET** /repositories/{repository}/otf/refs/{left_ref}/diff/{right_ref} | perform otf diff *HealthCheckApi* | [**healthCheck**](docs/HealthCheckApi.md#healthCheck) | **GET** /healthcheck | @@ -192,9 +191,16 @@ Class | Method | HTTP request | Description *InternalApi* | [**createSymlinkFile**](docs/InternalApi.md#createSymlinkFile) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory *InternalApi* | [**dumpRefs**](docs/InternalApi.md#dumpRefs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store Deprecated: a new API will introduce long running operations *InternalApi* | [**getAuthCapabilities**](docs/InternalApi.md#getAuthCapabilities) | **GET** /auth/capabilities | list authentication capabilities supported +*InternalApi* | [**getGarbageCollectionConfig**](docs/InternalApi.md#getGarbageCollectionConfig) | **GET** /config/garbage-collection | *InternalApi* | [**getLakeFSVersion**](docs/InternalApi.md#getLakeFSVersion) | **GET** /config/version | *InternalApi* | [**getSetupState**](docs/InternalApi.md#getSetupState) | **GET** /setup_lakefs | check if the lakeFS installation is already set up *InternalApi* | [**getStorageConfig**](docs/InternalApi.md#getStorageConfig) | **GET** /config/storage | +*InternalApi* | [**internalCreateBranchProtectionRule**](docs/InternalApi.md#internalCreateBranchProtectionRule) | **POST** /repositories/{repository}/branch_protection | +*InternalApi* | [**internalDeleteBranchProtectionRule**](docs/InternalApi.md#internalDeleteBranchProtectionRule) | **DELETE** /repositories/{repository}/branch_protection | +*InternalApi* | [**internalDeleteGarbageCollectionRules**](docs/InternalApi.md#internalDeleteGarbageCollectionRules) | **DELETE** /repositories/{repository}/gc/rules | +*InternalApi* | [**internalGetBranchProtectionRules**](docs/InternalApi.md#internalGetBranchProtectionRules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +*InternalApi* | [**internalGetGarbageCollectionRules**](docs/InternalApi.md#internalGetGarbageCollectionRules) | **GET** /repositories/{repository}/gc/rules | +*InternalApi* | [**internalSetGarbageCollectionRules**](docs/InternalApi.md#internalSetGarbageCollectionRules) | **POST** /repositories/{repository}/gc/rules | *InternalApi* | [**postStatsEvents**](docs/InternalApi.md#postStatsEvents) | **POST** /statistics | post stats events, this endpoint is meant for internal use only *InternalApi* | [**restoreRefs**](docs/InternalApi.md#restoreRefs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations *InternalApi* | [**setGarbageCollectionRulesPreflight**](docs/InternalApi.md#setGarbageCollectionRulesPreflight) | **GET** /repositories/{repository}/gc/rules/set_allowed | @@ -217,19 +223,18 @@ Class | Method | HTTP request | Description *RefsApi* | [**findMergeBase**](docs/RefsApi.md#findMergeBase) | **GET** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | find the merge base for 2 references *RefsApi* | [**logCommits**](docs/RefsApi.md#logCommits) | **GET** /repositories/{repository}/refs/{ref}/commits | get commit log from ref. If both objects and prefixes are empty, return all commits. *RefsApi* | [**mergeIntoBranch**](docs/RefsApi.md#mergeIntoBranch) | **POST** /repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch} | merge references -*RepositoriesApi* | [**createBranchProtectionRule**](docs/RepositoriesApi.md#createBranchProtectionRule) | **POST** /repositories/{repository}/branch_protection | *RepositoriesApi* | [**createRepository**](docs/RepositoriesApi.md#createRepository) | **POST** /repositories | create repository -*RepositoriesApi* | [**deleteBranchProtectionRule**](docs/RepositoriesApi.md#deleteBranchProtectionRule) | **DELETE** /repositories/{repository}/branch_protection | +*RepositoriesApi* | [**deleteGCRules**](docs/RepositoriesApi.md#deleteGCRules) | **DELETE** /repositories/{repository}/settings/gc_rules | *RepositoriesApi* | [**deleteRepository**](docs/RepositoriesApi.md#deleteRepository) | **DELETE** /repositories/{repository} | delete repository -*RepositoriesApi* | [**getBranchProtectionRules**](docs/RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +*RepositoriesApi* | [**getBranchProtectionRules**](docs/RepositoriesApi.md#getBranchProtectionRules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules +*RepositoriesApi* | [**getGCRules**](docs/RepositoriesApi.md#getGCRules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules *RepositoriesApi* | [**getRepository**](docs/RepositoriesApi.md#getRepository) | **GET** /repositories/{repository} | get repository *RepositoriesApi* | [**getRepositoryMetadata**](docs/RepositoriesApi.md#getRepositoryMetadata) | **GET** /repositories/{repository}/metadata | get repository metadata *RepositoriesApi* | [**listRepositories**](docs/RepositoriesApi.md#listRepositories) | **GET** /repositories | list repositories -*RetentionApi* | [**deleteGarbageCollectionRules**](docs/RetentionApi.md#deleteGarbageCollectionRules) | **DELETE** /repositories/{repository}/gc/rules | -*RetentionApi* | [**getGarbageCollectionRules**](docs/RetentionApi.md#getGarbageCollectionRules) | **GET** /repositories/{repository}/gc/rules | +*RepositoriesApi* | [**setBranchProtectionRules**](docs/RepositoriesApi.md#setBranchProtectionRules) | **PUT** /repositories/{repository}/settings/branch_protection | +*RepositoriesApi* | [**setGCRules**](docs/RepositoriesApi.md#setGCRules) | **PUT** /repositories/{repository}/settings/gc_rules | *RetentionApi* | [**prepareGarbageCollectionCommits**](docs/RetentionApi.md#prepareGarbageCollectionCommits) | **POST** /repositories/{repository}/gc/prepare_commits | save lists of active commits for garbage collection *RetentionApi* | [**prepareGarbageCollectionUncommitted**](docs/RetentionApi.md#prepareGarbageCollectionUncommitted) | **POST** /repositories/{repository}/gc/prepare_uncommited | save repository uncommitted metadata for garbage collection -*RetentionApi* | [**setGarbageCollectionRules**](docs/RetentionApi.md#setGarbageCollectionRules) | **POST** /repositories/{repository}/gc/rules | *StagingApi* | [**getPhysicalAddress**](docs/StagingApi.md#getPhysicalAddress) | **GET** /repositories/{repository}/branches/{branch}/staging/backing | get a physical address and a return token to write object to underlying storage *StagingApi* | [**linkPhysicalAddress**](docs/StagingApi.md#linkPhysicalAddress) | **PUT** /repositories/{repository}/branches/{branch}/staging/backing | associate staging on this physical address with a path *TagsApi* | [**createTag**](docs/TagsApi.md#createTag) | **POST** /repositories/{repository}/tags | create tag diff --git a/clients/java/docs/ConfigApi.md b/clients/java/docs/ConfigApi.md index 358be7be0ae..df872aca7ca 100644 --- a/clients/java/docs/ConfigApi.md +++ b/clients/java/docs/ConfigApi.md @@ -5,7 +5,6 @@ All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**getConfig**](ConfigApi.md#getConfig) | **GET** /config | -[**getGarbageCollectionConfig**](ConfigApi.md#getGarbageCollectionConfig) | **GET** /config/garbage-collection | @@ -95,90 +94,3 @@ This endpoint does not need any parameter. **200** | lakeFS configuration | - | **401** | Unauthorized | - | - -# **getGarbageCollectionConfig** -> GarbageCollectionConfig getGarbageCollectionConfig() - - - -get information of gc settings - -### Example -```java -// Import classes: -import io.lakefs.clients.api.ApiClient; -import io.lakefs.clients.api.ApiException; -import io.lakefs.clients.api.Configuration; -import io.lakefs.clients.api.auth.*; -import io.lakefs.clients.api.models.*; -import io.lakefs.clients.api.ConfigApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost/api/v1"); - - // Configure HTTP basic authorization: basic_auth - HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); - basic_auth.setUsername("YOUR USERNAME"); - basic_auth.setPassword("YOUR PASSWORD"); - - // Configure API key authorization: cookie_auth - ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); - cookie_auth.setApiKey("YOUR API KEY"); - // 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"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //oidc_auth.setApiKeyPrefix("Token"); - - // Configure API key authorization: saml_auth - ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); - saml_auth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //saml_auth.setApiKeyPrefix("Token"); - - ConfigApi apiInstance = new ConfigApi(defaultClient); - try { - GarbageCollectionConfig result = apiInstance.getGarbageCollectionConfig(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ConfigApi#getGarbageCollectionConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**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 | - | - diff --git a/clients/java/docs/InternalApi.md b/clients/java/docs/InternalApi.md index 921f8102e75..3cc7a909d19 100644 --- a/clients/java/docs/InternalApi.md +++ b/clients/java/docs/InternalApi.md @@ -8,9 +8,16 @@ Method | HTTP request | Description [**createSymlinkFile**](InternalApi.md#createSymlinkFile) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory [**dumpRefs**](InternalApi.md#dumpRefs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store Deprecated: a new API will introduce long running operations [**getAuthCapabilities**](InternalApi.md#getAuthCapabilities) | **GET** /auth/capabilities | list authentication capabilities supported +[**getGarbageCollectionConfig**](InternalApi.md#getGarbageCollectionConfig) | **GET** /config/garbage-collection | [**getLakeFSVersion**](InternalApi.md#getLakeFSVersion) | **GET** /config/version | [**getSetupState**](InternalApi.md#getSetupState) | **GET** /setup_lakefs | check if the lakeFS installation is already set up [**getStorageConfig**](InternalApi.md#getStorageConfig) | **GET** /config/storage | +[**internalCreateBranchProtectionRule**](InternalApi.md#internalCreateBranchProtectionRule) | **POST** /repositories/{repository}/branch_protection | +[**internalDeleteBranchProtectionRule**](InternalApi.md#internalDeleteBranchProtectionRule) | **DELETE** /repositories/{repository}/branch_protection | +[**internalDeleteGarbageCollectionRules**](InternalApi.md#internalDeleteGarbageCollectionRules) | **DELETE** /repositories/{repository}/gc/rules | +[**internalGetBranchProtectionRules**](InternalApi.md#internalGetBranchProtectionRules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +[**internalGetGarbageCollectionRules**](InternalApi.md#internalGetGarbageCollectionRules) | **GET** /repositories/{repository}/gc/rules | +[**internalSetGarbageCollectionRules**](InternalApi.md#internalSetGarbageCollectionRules) | **POST** /repositories/{repository}/gc/rules | [**postStatsEvents**](InternalApi.md#postStatsEvents) | **POST** /statistics | post stats events, this endpoint is meant for internal use only [**restoreRefs**](InternalApi.md#restoreRefs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations [**setGarbageCollectionRulesPreflight**](InternalApi.md#setGarbageCollectionRulesPreflight) | **GET** /repositories/{repository}/gc/rules/set_allowed | @@ -354,6 +361,93 @@ No authorization required **200** | auth capabilities | - | **0** | Internal Server Error | - | + +# **getGarbageCollectionConfig** +> GarbageCollectionConfig getGarbageCollectionConfig() + + + +get information of gc settings + +### Example +```java +// Import classes: +import io.lakefs.clients.api.ApiClient; +import io.lakefs.clients.api.ApiException; +import io.lakefs.clients.api.Configuration; +import io.lakefs.clients.api.auth.*; +import io.lakefs.clients.api.models.*; +import io.lakefs.clients.api.InternalApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost/api/v1"); + + // Configure HTTP basic authorization: basic_auth + HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); + basic_auth.setUsername("YOUR USERNAME"); + basic_auth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: cookie_auth + ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); + cookie_auth.setApiKey("YOUR API KEY"); + // 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"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //oidc_auth.setApiKeyPrefix("Token"); + + // Configure API key authorization: saml_auth + ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); + saml_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //saml_auth.setApiKeyPrefix("Token"); + + InternalApi apiInstance = new InternalApi(defaultClient); + try { + GarbageCollectionConfig result = apiInstance.getGarbageCollectionConfig(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InternalApi#getGarbageCollectionConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**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 | - | + # **getLakeFSVersion** > VersionConfig getLakeFSVersion() @@ -585,6 +679,554 @@ This endpoint does not need any parameter. **200** | lakeFS storage configuration | - | **401** | Unauthorized | - | + +# **internalCreateBranchProtectionRule** +> internalCreateBranchProtectionRule(repository, branchProtectionRule) + + + +### Example +```java +// Import classes: +import io.lakefs.clients.api.ApiClient; +import io.lakefs.clients.api.ApiException; +import io.lakefs.clients.api.Configuration; +import io.lakefs.clients.api.auth.*; +import io.lakefs.clients.api.models.*; +import io.lakefs.clients.api.InternalApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost/api/v1"); + + // Configure HTTP basic authorization: basic_auth + HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); + basic_auth.setUsername("YOUR USERNAME"); + basic_auth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: cookie_auth + ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); + cookie_auth.setApiKey("YOUR API KEY"); + // 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"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //oidc_auth.setApiKeyPrefix("Token"); + + // Configure API key authorization: saml_auth + ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); + saml_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //saml_auth.setApiKeyPrefix("Token"); + + InternalApi apiInstance = new InternalApi(defaultClient); + String repository = "repository_example"; // String | + BranchProtectionRule branchProtectionRule = new BranchProtectionRule(); // BranchProtectionRule | + try { + apiInstance.internalCreateBranchProtectionRule(repository, branchProtectionRule); + } catch (ApiException e) { + System.err.println("Exception when calling InternalApi#internalCreateBranchProtectionRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **branchProtectionRule** | [**BranchProtectionRule**](BranchProtectionRule.md)| | + +### Return type + +null (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 | - | + + +# **internalDeleteBranchProtectionRule** +> internalDeleteBranchProtectionRule(repository, inlineObject1) + + + +### Example +```java +// Import classes: +import io.lakefs.clients.api.ApiClient; +import io.lakefs.clients.api.ApiException; +import io.lakefs.clients.api.Configuration; +import io.lakefs.clients.api.auth.*; +import io.lakefs.clients.api.models.*; +import io.lakefs.clients.api.InternalApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost/api/v1"); + + // Configure HTTP basic authorization: basic_auth + HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); + basic_auth.setUsername("YOUR USERNAME"); + basic_auth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: cookie_auth + ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); + cookie_auth.setApiKey("YOUR API KEY"); + // 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"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //oidc_auth.setApiKeyPrefix("Token"); + + // Configure API key authorization: saml_auth + ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); + saml_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //saml_auth.setApiKeyPrefix("Token"); + + InternalApi apiInstance = new InternalApi(defaultClient); + String repository = "repository_example"; // String | + InlineObject1 inlineObject1 = new InlineObject1(); // InlineObject1 | + try { + apiInstance.internalDeleteBranchProtectionRule(repository, inlineObject1); + } catch (ApiException e) { + System.err.println("Exception when calling InternalApi#internalDeleteBranchProtectionRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **inlineObject1** | [**InlineObject1**](InlineObject1.md)| | + +### Return type + +null (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 | - | + + +# **internalDeleteGarbageCollectionRules** +> internalDeleteGarbageCollectionRules(repository) + + + +### Example +```java +// Import classes: +import io.lakefs.clients.api.ApiClient; +import io.lakefs.clients.api.ApiException; +import io.lakefs.clients.api.Configuration; +import io.lakefs.clients.api.auth.*; +import io.lakefs.clients.api.models.*; +import io.lakefs.clients.api.InternalApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost/api/v1"); + + // Configure HTTP basic authorization: basic_auth + HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); + basic_auth.setUsername("YOUR USERNAME"); + basic_auth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: cookie_auth + ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); + cookie_auth.setApiKey("YOUR API KEY"); + // 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"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //oidc_auth.setApiKeyPrefix("Token"); + + // Configure API key authorization: saml_auth + ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); + saml_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //saml_auth.setApiKeyPrefix("Token"); + + InternalApi apiInstance = new InternalApi(defaultClient); + String repository = "repository_example"; // String | + try { + apiInstance.internalDeleteGarbageCollectionRules(repository); + } catch (ApiException e) { + System.err.println("Exception when calling InternalApi#internalDeleteGarbageCollectionRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + +### Return type + +null (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 | - | + + +# **internalGetBranchProtectionRules** +> List<BranchProtectionRule> internalGetBranchProtectionRules(repository) + +get branch protection rules + +### Example +```java +// Import classes: +import io.lakefs.clients.api.ApiClient; +import io.lakefs.clients.api.ApiException; +import io.lakefs.clients.api.Configuration; +import io.lakefs.clients.api.auth.*; +import io.lakefs.clients.api.models.*; +import io.lakefs.clients.api.InternalApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost/api/v1"); + + // Configure HTTP basic authorization: basic_auth + HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); + basic_auth.setUsername("YOUR USERNAME"); + basic_auth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: cookie_auth + ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); + cookie_auth.setApiKey("YOUR API KEY"); + // 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"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //oidc_auth.setApiKeyPrefix("Token"); + + // Configure API key authorization: saml_auth + ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); + saml_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //saml_auth.setApiKeyPrefix("Token"); + + InternalApi apiInstance = new InternalApi(defaultClient); + String repository = "repository_example"; // String | + try { + List result = apiInstance.internalGetBranchProtectionRules(repository); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InternalApi#internalGetBranchProtectionRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + +### Return type + +[**List<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 | - | + + +# **internalGetGarbageCollectionRules** +> GarbageCollectionRules internalGetGarbageCollectionRules(repository) + + + +### Example +```java +// Import classes: +import io.lakefs.clients.api.ApiClient; +import io.lakefs.clients.api.ApiException; +import io.lakefs.clients.api.Configuration; +import io.lakefs.clients.api.auth.*; +import io.lakefs.clients.api.models.*; +import io.lakefs.clients.api.InternalApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost/api/v1"); + + // Configure HTTP basic authorization: basic_auth + HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); + basic_auth.setUsername("YOUR USERNAME"); + basic_auth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: cookie_auth + ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); + cookie_auth.setApiKey("YOUR API KEY"); + // 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"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //oidc_auth.setApiKeyPrefix("Token"); + + // Configure API key authorization: saml_auth + ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); + saml_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //saml_auth.setApiKeyPrefix("Token"); + + InternalApi apiInstance = new InternalApi(defaultClient); + String repository = "repository_example"; // String | + try { + GarbageCollectionRules result = apiInstance.internalGetGarbageCollectionRules(repository); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InternalApi#internalGetGarbageCollectionRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + +### 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 | - | + + +# **internalSetGarbageCollectionRules** +> internalSetGarbageCollectionRules(repository, garbageCollectionRules) + + + +### Example +```java +// Import classes: +import io.lakefs.clients.api.ApiClient; +import io.lakefs.clients.api.ApiException; +import io.lakefs.clients.api.Configuration; +import io.lakefs.clients.api.auth.*; +import io.lakefs.clients.api.models.*; +import io.lakefs.clients.api.InternalApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost/api/v1"); + + // Configure HTTP basic authorization: basic_auth + HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth"); + basic_auth.setUsername("YOUR USERNAME"); + basic_auth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: cookie_auth + ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth"); + cookie_auth.setApiKey("YOUR API KEY"); + // 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"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //oidc_auth.setApiKeyPrefix("Token"); + + // Configure API key authorization: saml_auth + ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth"); + saml_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //saml_auth.setApiKeyPrefix("Token"); + + InternalApi apiInstance = new InternalApi(defaultClient); + String repository = "repository_example"; // String | + GarbageCollectionRules garbageCollectionRules = new GarbageCollectionRules(); // GarbageCollectionRules | + try { + apiInstance.internalSetGarbageCollectionRules(repository, garbageCollectionRules); + } catch (ApiException e) { + System.err.println("Exception when calling InternalApi#internalSetGarbageCollectionRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repository** | **String**| | + **garbageCollectionRules** | [**GarbageCollectionRules**](GarbageCollectionRules.md)| | + +### Return type + +null (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 | - | + # **postStatsEvents** > postStatsEvents(statsEventsList) 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 a764d8489d5..57d11975d60 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 @@ -29,7 +29,6 @@ import io.lakefs.clients.api.model.Config; import io.lakefs.clients.api.model.Error; -import io.lakefs.clients.api.model.GarbageCollectionConfig; import java.lang.reflect.Type; import java.util.ArrayList; @@ -162,110 +161,4 @@ public okhttp3.Call getConfigAsync(final ApiCallback _callback) throws A localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getGarbageCollectionConfig - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
- */ - public okhttp3.Call getGarbageCollectionConfigCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/config/garbage-collection"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - 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 { - - - okhttp3.Call localVarCall = getGarbageCollectionConfigCall(_callback); - return localVarCall; - - } - - /** - * - * get information of gc settings - * @return GarbageCollectionConfig - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
- */ - public GarbageCollectionConfig getGarbageCollectionConfig() throws ApiException { - ApiResponse localVarResp = getGarbageCollectionConfigWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * - * get information of gc settings - * @return ApiResponse<GarbageCollectionConfig> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
- */ - public ApiResponse getGarbageCollectionConfigWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getGarbageCollectionConfigValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * get information of gc settings - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
- */ - public okhttp3.Call getGarbageCollectionConfigAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getGarbageCollectionConfigValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } } diff --git a/clients/java/src/main/java/io/lakefs/clients/api/InternalApi.java b/clients/java/src/main/java/io/lakefs/clients/api/InternalApi.java index 9a958b103f4..fe25719f2cf 100644 --- a/clients/java/src/main/java/io/lakefs/clients/api/InternalApi.java +++ b/clients/java/src/main/java/io/lakefs/clients/api/InternalApi.java @@ -28,9 +28,13 @@ import io.lakefs.clients.api.model.AuthCapabilities; +import io.lakefs.clients.api.model.BranchProtectionRule; import io.lakefs.clients.api.model.CommPrefsInput; import io.lakefs.clients.api.model.CredentialsWithSecret; import io.lakefs.clients.api.model.Error; +import io.lakefs.clients.api.model.GarbageCollectionConfig; +import io.lakefs.clients.api.model.GarbageCollectionRules; +import io.lakefs.clients.api.model.InlineObject1; import io.lakefs.clients.api.model.RefsDump; import io.lakefs.clients.api.model.Setup; import io.lakefs.clients.api.model.SetupState; @@ -564,6 +568,112 @@ public okhttp3.Call getAuthCapabilitiesAsync(final ApiCallback localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getGarbageCollectionConfig + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
+ */ + public okhttp3.Call getGarbageCollectionConfigCall(final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/config/garbage-collection"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + 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 { + + + okhttp3.Call localVarCall = getGarbageCollectionConfigCall(_callback); + return localVarCall; + + } + + /** + * + * get information of gc settings + * @return GarbageCollectionConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
+ */ + public GarbageCollectionConfig getGarbageCollectionConfig() throws ApiException { + ApiResponse localVarResp = getGarbageCollectionConfigWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * + * get information of gc settings + * @return ApiResponse<GarbageCollectionConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
+ */ + public ApiResponse getGarbageCollectionConfigWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getGarbageCollectionConfigValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * get information of gc settings + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 lakeFS garbage collection config -
401 Unauthorized -
+ */ + public okhttp3.Call getGarbageCollectionConfigAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGarbageCollectionConfigValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getLakeFSVersion * @param _callback Callback for upload/download progress @@ -900,6 +1010,815 @@ public okhttp3.Call getStorageConfigAsync(final ApiCallback _call localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for internalCreateBranchProtectionRule + * @param repository (required) + * @param branchProtectionRule (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 branch protection rule created successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalCreateBranchProtectionRuleCall(String repository, BranchProtectionRule branchProtectionRule, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = branchProtectionRule; + + // create path and map variables + String localVarPath = "/repositories/{repository}/branch_protection" + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + 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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call internalCreateBranchProtectionRuleValidateBeforeCall(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 internalCreateBranchProtectionRule(Async)"); + } + + // verify the required parameter 'branchProtectionRule' is set + if (branchProtectionRule == null) { + throw new ApiException("Missing the required parameter 'branchProtectionRule' when calling internalCreateBranchProtectionRule(Async)"); + } + + + okhttp3.Call localVarCall = internalCreateBranchProtectionRuleCall(repository, branchProtectionRule, _callback); + return localVarCall; + + } + + /** + * + * + * @param repository (required) + * @param branchProtectionRule (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 branch protection rule created successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public void internalCreateBranchProtectionRule(String repository, BranchProtectionRule branchProtectionRule) throws ApiException { + internalCreateBranchProtectionRuleWithHttpInfo(repository, branchProtectionRule); + } + + /** + * + * + * @param repository (required) + * @param branchProtectionRule (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 branch protection rule created successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public ApiResponse internalCreateBranchProtectionRuleWithHttpInfo(String repository, BranchProtectionRule branchProtectionRule) throws ApiException { + okhttp3.Call localVarCall = internalCreateBranchProtectionRuleValidateBeforeCall(repository, branchProtectionRule, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * + * @param repository (required) + * @param branchProtectionRule (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 branch protection rule created successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalCreateBranchProtectionRuleAsync(String repository, BranchProtectionRule branchProtectionRule, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = internalCreateBranchProtectionRuleValidateBeforeCall(repository, branchProtectionRule, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for internalDeleteBranchProtectionRule + * @param repository (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 + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 branch protection rule deleted successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalDeleteBranchProtectionRuleCall(String repository, InlineObject1 inlineObject1, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = inlineObject1; + + // create path and map variables + String localVarPath = "/repositories/{repository}/branch_protection" + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + 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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call internalDeleteBranchProtectionRuleValidateBeforeCall(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 internalDeleteBranchProtectionRule(Async)"); + } + + // verify the required parameter 'inlineObject1' is set + if (inlineObject1 == null) { + throw new ApiException("Missing the required parameter 'inlineObject1' when calling internalDeleteBranchProtectionRule(Async)"); + } + + + okhttp3.Call localVarCall = internalDeleteBranchProtectionRuleCall(repository, inlineObject1, _callback); + return localVarCall; + + } + + /** + * + * + * @param repository (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 + + + + + + +
Status Code Description Response Headers
204 branch protection rule deleted successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public void internalDeleteBranchProtectionRule(String repository, InlineObject1 inlineObject1) throws ApiException { + internalDeleteBranchProtectionRuleWithHttpInfo(repository, inlineObject1); + } + + /** + * + * + * @param repository (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 + + + + + + +
Status Code Description Response Headers
204 branch protection rule deleted successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public ApiResponse internalDeleteBranchProtectionRuleWithHttpInfo(String repository, InlineObject1 inlineObject1) throws ApiException { + okhttp3.Call localVarCall = internalDeleteBranchProtectionRuleValidateBeforeCall(repository, inlineObject1, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * + * @param repository (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 + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 branch protection rule deleted successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalDeleteBranchProtectionRuleAsync(String repository, InlineObject1 inlineObject1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = internalDeleteBranchProtectionRuleValidateBeforeCall(repository, inlineObject1, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for internalDeleteGarbageCollectionRules + * @param repository (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 deleted garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalDeleteGarbageCollectionRulesCall(String repository, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repositories/{repository}/gc/rules" + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + 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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call internalDeleteGarbageCollectionRulesValidateBeforeCall(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 internalDeleteGarbageCollectionRules(Async)"); + } + + + okhttp3.Call localVarCall = internalDeleteGarbageCollectionRulesCall(repository, _callback); + return localVarCall; + + } + + /** + * + * + * @param repository (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 deleted garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public void internalDeleteGarbageCollectionRules(String repository) throws ApiException { + internalDeleteGarbageCollectionRulesWithHttpInfo(repository); + } + + /** + * + * + * @param repository (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 deleted garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public ApiResponse internalDeleteGarbageCollectionRulesWithHttpInfo(String repository) throws ApiException { + okhttp3.Call localVarCall = internalDeleteGarbageCollectionRulesValidateBeforeCall(repository, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * + * @param repository (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 deleted garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalDeleteGarbageCollectionRulesAsync(String repository, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = internalDeleteGarbageCollectionRulesValidateBeforeCall(repository, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for internalGetBranchProtectionRules + * @param repository (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 branch protection rules -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalGetBranchProtectionRulesCall(String repository, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repositories/{repository}/branch_protection" + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + 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 internalGetBranchProtectionRulesValidateBeforeCall(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 internalGetBranchProtectionRules(Async)"); + } + + + okhttp3.Call localVarCall = internalGetBranchProtectionRulesCall(repository, _callback); + return localVarCall; + + } + + /** + * get branch protection rules + * + * @param repository (required) + * @return List<BranchProtectionRule> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 branch protection rules -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public List internalGetBranchProtectionRules(String repository) throws ApiException { + ApiResponse> localVarResp = internalGetBranchProtectionRulesWithHttpInfo(repository); + return localVarResp.getData(); + } + + /** + * get branch protection rules + * + * @param repository (required) + * @return ApiResponse<List<BranchProtectionRule>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 branch protection rules -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public ApiResponse> internalGetBranchProtectionRulesWithHttpInfo(String repository) throws ApiException { + okhttp3.Call localVarCall = internalGetBranchProtectionRulesValidateBeforeCall(repository, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * get branch protection rules (asynchronously) + * + * @param repository (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 branch protection rules -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalGetBranchProtectionRulesAsync(String repository, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = internalGetBranchProtectionRulesValidateBeforeCall(repository, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for internalGetGarbageCollectionRules + * @param repository (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 gc rule list -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalGetGarbageCollectionRulesCall(String repository, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repositories/{repository}/gc/rules" + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + 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 internalGetGarbageCollectionRulesValidateBeforeCall(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 internalGetGarbageCollectionRules(Async)"); + } + + + okhttp3.Call localVarCall = internalGetGarbageCollectionRulesCall(repository, _callback); + return localVarCall; + + } + + /** + * + * + * @param repository (required) + * @return GarbageCollectionRules + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 gc rule list -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public GarbageCollectionRules internalGetGarbageCollectionRules(String repository) throws ApiException { + ApiResponse localVarResp = internalGetGarbageCollectionRulesWithHttpInfo(repository); + return localVarResp.getData(); + } + + /** + * + * + * @param repository (required) + * @return ApiResponse<GarbageCollectionRules> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 gc rule list -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public ApiResponse internalGetGarbageCollectionRulesWithHttpInfo(String repository) throws ApiException { + okhttp3.Call localVarCall = internalGetGarbageCollectionRulesValidateBeforeCall(repository, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param repository (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 gc rule list -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalGetGarbageCollectionRulesAsync(String repository, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = internalGetGarbageCollectionRulesValidateBeforeCall(repository, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for internalSetGarbageCollectionRules + * @param repository (required) + * @param garbageCollectionRules (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 set garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalSetGarbageCollectionRulesCall(String repository, GarbageCollectionRules garbageCollectionRules, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = garbageCollectionRules; + + // create path and map variables + String localVarPath = "/repositories/{repository}/gc/rules" + .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + 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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call internalSetGarbageCollectionRulesValidateBeforeCall(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 internalSetGarbageCollectionRules(Async)"); + } + + // verify the required parameter 'garbageCollectionRules' is set + if (garbageCollectionRules == null) { + throw new ApiException("Missing the required parameter 'garbageCollectionRules' when calling internalSetGarbageCollectionRules(Async)"); + } + + + okhttp3.Call localVarCall = internalSetGarbageCollectionRulesCall(repository, garbageCollectionRules, _callback); + return localVarCall; + + } + + /** + * + * + * @param repository (required) + * @param garbageCollectionRules (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 set garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public void internalSetGarbageCollectionRules(String repository, GarbageCollectionRules garbageCollectionRules) throws ApiException { + internalSetGarbageCollectionRulesWithHttpInfo(repository, garbageCollectionRules); + } + + /** + * + * + * @param repository (required) + * @param garbageCollectionRules (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 set garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public ApiResponse internalSetGarbageCollectionRulesWithHttpInfo(String repository, GarbageCollectionRules garbageCollectionRules) throws ApiException { + okhttp3.Call localVarCall = internalSetGarbageCollectionRulesValidateBeforeCall(repository, garbageCollectionRules, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * + * @param repository (required) + * @param garbageCollectionRules (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 set garbage collection rules successfully -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call internalSetGarbageCollectionRulesAsync(String repository, GarbageCollectionRules garbageCollectionRules, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = internalSetGarbageCollectionRulesValidateBeforeCall(repository, garbageCollectionRules, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for postStatsEvents * @param statsEventsList (required) 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 1b48f59cceb..d542b89f76f 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 @@ -16,7 +16,6 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.Config; import io.lakefs.clients.api.model.Error; -import io.lakefs.clients.api.model.GarbageCollectionConfig; import org.junit.Test; import org.junit.Ignore; @@ -48,18 +47,4 @@ public void getConfigTest() throws ApiException { // TODO: test validations } - /** - * - * - * get information of gc settings - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getGarbageCollectionConfigTest() throws ApiException { - GarbageCollectionConfig response = api.getGarbageCollectionConfig(); - // TODO: test validations - } - } diff --git a/clients/java/src/test/java/io/lakefs/clients/api/InternalApiTest.java b/clients/java/src/test/java/io/lakefs/clients/api/InternalApiTest.java index d37d5661c77..b7aa7afac81 100644 --- a/clients/java/src/test/java/io/lakefs/clients/api/InternalApiTest.java +++ b/clients/java/src/test/java/io/lakefs/clients/api/InternalApiTest.java @@ -15,9 +15,13 @@ import io.lakefs.clients.api.ApiException; import io.lakefs.clients.api.model.AuthCapabilities; +import io.lakefs.clients.api.model.BranchProtectionRule; import io.lakefs.clients.api.model.CommPrefsInput; import io.lakefs.clients.api.model.CredentialsWithSecret; import io.lakefs.clients.api.model.Error; +import io.lakefs.clients.api.model.GarbageCollectionConfig; +import io.lakefs.clients.api.model.GarbageCollectionRules; +import io.lakefs.clients.api.model.InlineObject1; import io.lakefs.clients.api.model.RefsDump; import io.lakefs.clients.api.model.Setup; import io.lakefs.clients.api.model.SetupState; @@ -103,6 +107,20 @@ public void getAuthCapabilitiesTest() throws ApiException { // TODO: test validations } + /** + * + * + * get information of gc settings + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getGarbageCollectionConfigTest() throws ApiException { + GarbageCollectionConfig response = api.getGarbageCollectionConfig(); + // TODO: test validations + } + /** * * @@ -145,6 +163,99 @@ public void getStorageConfigTest() throws ApiException { // TODO: test validations } + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void internalCreateBranchProtectionRuleTest() throws ApiException { + String repository = null; + BranchProtectionRule branchProtectionRule = null; + api.internalCreateBranchProtectionRule(repository, branchProtectionRule); + // TODO: test validations + } + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void internalDeleteBranchProtectionRuleTest() throws ApiException { + String repository = null; + InlineObject1 inlineObject1 = null; + api.internalDeleteBranchProtectionRule(repository, inlineObject1); + // TODO: test validations + } + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void internalDeleteGarbageCollectionRulesTest() throws ApiException { + String repository = null; + api.internalDeleteGarbageCollectionRules(repository); + // TODO: test validations + } + + /** + * get branch protection rules + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void internalGetBranchProtectionRulesTest() throws ApiException { + String repository = null; + List response = api.internalGetBranchProtectionRules(repository); + // TODO: test validations + } + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void internalGetGarbageCollectionRulesTest() throws ApiException { + String repository = null; + GarbageCollectionRules response = api.internalGetGarbageCollectionRules(repository); + // TODO: test validations + } + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void internalSetGarbageCollectionRulesTest() throws ApiException { + String repository = null; + GarbageCollectionRules garbageCollectionRules = null; + api.internalSetGarbageCollectionRules(repository, garbageCollectionRules); + // TODO: test validations + } + /** * post stats events, this endpoint is meant for internal use only * diff --git a/clients/python/README.md b/clients/python/README.md index b84581814d5..e7f45e7e4c1 100644 --- a/clients/python/README.md +++ b/clients/python/README.md @@ -162,7 +162,6 @@ Class | Method | HTTP request | Description *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 *ConfigApi* | [**get_config**](docs/ConfigApi.md#get_config) | **GET** /config | -*ConfigApi* | [**get_garbage_collection_config**](docs/ConfigApi.md#get_garbage_collection_config) | **GET** /config/garbage-collection | *ExperimentalApi* | [**get_otf_diffs**](docs/ExperimentalApi.md#get_otf_diffs) | **GET** /otf/diffs | get the available Open Table Format diffs *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 | @@ -173,9 +172,16 @@ Class | Method | HTTP request | Description *InternalApi* | [**create_symlink_file**](docs/InternalApi.md#create_symlink_file) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory *InternalApi* | [**dump_refs**](docs/InternalApi.md#dump_refs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store Deprecated: a new API will introduce long running operations *InternalApi* | [**get_auth_capabilities**](docs/InternalApi.md#get_auth_capabilities) | **GET** /auth/capabilities | list authentication capabilities supported +*InternalApi* | [**get_garbage_collection_config**](docs/InternalApi.md#get_garbage_collection_config) | **GET** /config/garbage-collection | *InternalApi* | [**get_lake_fs_version**](docs/InternalApi.md#get_lake_fs_version) | **GET** /config/version | *InternalApi* | [**get_setup_state**](docs/InternalApi.md#get_setup_state) | **GET** /setup_lakefs | check if the lakeFS installation is already set up *InternalApi* | [**get_storage_config**](docs/InternalApi.md#get_storage_config) | **GET** /config/storage | +*InternalApi* | [**internal_create_branch_protection_rule**](docs/InternalApi.md#internal_create_branch_protection_rule) | **POST** /repositories/{repository}/branch_protection | +*InternalApi* | [**internal_delete_branch_protection_rule**](docs/InternalApi.md#internal_delete_branch_protection_rule) | **DELETE** /repositories/{repository}/branch_protection | +*InternalApi* | [**internal_delete_garbage_collection_rules**](docs/InternalApi.md#internal_delete_garbage_collection_rules) | **DELETE** /repositories/{repository}/gc/rules | +*InternalApi* | [**internal_get_branch_protection_rules**](docs/InternalApi.md#internal_get_branch_protection_rules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +*InternalApi* | [**internal_get_garbage_collection_rules**](docs/InternalApi.md#internal_get_garbage_collection_rules) | **GET** /repositories/{repository}/gc/rules | +*InternalApi* | [**internal_set_garbage_collection_rules**](docs/InternalApi.md#internal_set_garbage_collection_rules) | **POST** /repositories/{repository}/gc/rules | *InternalApi* | [**post_stats_events**](docs/InternalApi.md#post_stats_events) | **POST** /statistics | post stats events, this endpoint is meant for internal use only *InternalApi* | [**restore_refs**](docs/InternalApi.md#restore_refs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations *InternalApi* | [**set_garbage_collection_rules_preflight**](docs/InternalApi.md#set_garbage_collection_rules_preflight) | **GET** /repositories/{repository}/gc/rules/set_allowed | @@ -198,19 +204,18 @@ Class | Method | HTTP request | Description *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 -*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_gc_rules**](docs/RepositoriesApi.md#delete_gc_rules) | **DELETE** /repositories/{repository}/settings/gc_rules | *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_branch_protection_rules**](docs/RepositoriesApi.md#get_branch_protection_rules) | **GET** /repositories/{repository}/settings/branch_protection | get branch protection rules +*RepositoriesApi* | [**get_gc_rules**](docs/RepositoriesApi.md#get_gc_rules) | **GET** /repositories/{repository}/settings/gc_rules | get repository GC rules *RepositoriesApi* | [**get_repository**](docs/RepositoriesApi.md#get_repository) | **GET** /repositories/{repository} | get repository *RepositoriesApi* | [**get_repository_metadata**](docs/RepositoriesApi.md#get_repository_metadata) | **GET** /repositories/{repository}/metadata | get repository metadata *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 | +*RepositoriesApi* | [**set_branch_protection_rules**](docs/RepositoriesApi.md#set_branch_protection_rules) | **PUT** /repositories/{repository}/settings/branch_protection | +*RepositoriesApi* | [**set_gc_rules**](docs/RepositoriesApi.md#set_gc_rules) | **PUT** /repositories/{repository}/settings/gc_rules | *RetentionApi* | [**prepare_garbage_collection_commits**](docs/RetentionApi.md#prepare_garbage_collection_commits) | **POST** /repositories/{repository}/gc/prepare_commits | save lists of active 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 *TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /repositories/{repository}/tags | create tag diff --git a/clients/python/docs/ConfigApi.md b/clients/python/docs/ConfigApi.md index d5beb61edfb..dd037b3ae89 100644 --- a/clients/python/docs/ConfigApi.md +++ b/clients/python/docs/ConfigApi.md @@ -5,7 +5,6 @@ All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_config**](ConfigApi.md#get_config) | **GET** /config | -[**get_garbage_collection_config**](ConfigApi.md#get_garbage_collection_config) | **GET** /config/garbage-collection | # **get_config** @@ -110,105 +109,3 @@ This endpoint does not need any parameter. [[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_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) - diff --git a/clients/python/docs/InternalApi.md b/clients/python/docs/InternalApi.md index aebce91d21b..bf825f6c45f 100644 --- a/clients/python/docs/InternalApi.md +++ b/clients/python/docs/InternalApi.md @@ -8,9 +8,16 @@ Method | HTTP request | Description [**create_symlink_file**](InternalApi.md#create_symlink_file) | **POST** /repositories/{repository}/refs/{branch}/symlink | creates symlink files corresponding to the given directory [**dump_refs**](InternalApi.md#dump_refs) | **PUT** /repositories/{repository}/refs/dump | Dump repository refs (tags, commits, branches) to object store Deprecated: a new API will introduce long running operations [**get_auth_capabilities**](InternalApi.md#get_auth_capabilities) | **GET** /auth/capabilities | list authentication capabilities supported +[**get_garbage_collection_config**](InternalApi.md#get_garbage_collection_config) | **GET** /config/garbage-collection | [**get_lake_fs_version**](InternalApi.md#get_lake_fs_version) | **GET** /config/version | [**get_setup_state**](InternalApi.md#get_setup_state) | **GET** /setup_lakefs | check if the lakeFS installation is already set up [**get_storage_config**](InternalApi.md#get_storage_config) | **GET** /config/storage | +[**internal_create_branch_protection_rule**](InternalApi.md#internal_create_branch_protection_rule) | **POST** /repositories/{repository}/branch_protection | +[**internal_delete_branch_protection_rule**](InternalApi.md#internal_delete_branch_protection_rule) | **DELETE** /repositories/{repository}/branch_protection | +[**internal_delete_garbage_collection_rules**](InternalApi.md#internal_delete_garbage_collection_rules) | **DELETE** /repositories/{repository}/gc/rules | +[**internal_get_branch_protection_rules**](InternalApi.md#internal_get_branch_protection_rules) | **GET** /repositories/{repository}/branch_protection | get branch protection rules +[**internal_get_garbage_collection_rules**](InternalApi.md#internal_get_garbage_collection_rules) | **GET** /repositories/{repository}/gc/rules | +[**internal_set_garbage_collection_rules**](InternalApi.md#internal_set_garbage_collection_rules) | **POST** /repositories/{repository}/gc/rules | [**post_stats_events**](InternalApi.md#post_stats_events) | **POST** /statistics | post stats events, this endpoint is meant for internal use only [**restore_refs**](InternalApi.md#restore_refs) | **PUT** /repositories/{repository}/refs/restore | Restore repository refs (tags, commits, branches) from object store. Deprecated: a new API will introduce long running operations [**set_garbage_collection_rules_preflight**](InternalApi.md#set_garbage_collection_rules_preflight) | **GET** /repositories/{repository}/gc/rules/set_allowed | @@ -415,6 +422,108 @@ No authorization required [[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_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 internal_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 = internal_api.InternalApi(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 InternalApi->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() @@ -682,6 +791,656 @@ This endpoint does not need any parameter. [[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) +# **internal_create_branch_protection_rule** +> internal_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 internal_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 = internal_api.InternalApi(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.internal_create_branch_protection_rule(repository, branch_protection_rule) + except lakefs_client.ApiException as e: + print("Exception when calling InternalApi->internal_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) + +# **internal_delete_branch_protection_rule** +> internal_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 internal_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 = internal_api.InternalApi(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.internal_delete_branch_protection_rule(repository, inline_object1) + except lakefs_client.ApiException as e: + print("Exception when calling InternalApi->internal_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) + +# **internal_delete_garbage_collection_rules** +> internal_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 internal_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 = internal_api.InternalApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + api_instance.internal_delete_garbage_collection_rules(repository) + except lakefs_client.ApiException as e: + print("Exception when calling InternalApi->internal_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) + +# **internal_get_branch_protection_rules** +> [BranchProtectionRule] internal_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 internal_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 = internal_api.InternalApi(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.internal_get_branch_protection_rules(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling InternalApi->internal_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) + +# **internal_get_garbage_collection_rules** +> GarbageCollectionRules internal_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 internal_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 = internal_api.InternalApi(api_client) + repository = "repository_example" # str | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.internal_get_garbage_collection_rules(repository) + pprint(api_response) + except lakefs_client.ApiException as e: + print("Exception when calling InternalApi->internal_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) + +# **internal_set_garbage_collection_rules** +> internal_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 internal_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 = internal_api.InternalApi(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.internal_set_garbage_collection_rules(repository, garbage_collection_rules) + except lakefs_client.ApiException as e: + print("Exception when calling InternalApi->internal_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) + # **post_stats_events** > post_stats_events(stats_events_list) diff --git a/clients/python/lakefs_client/api/config_api.py b/clients/python/lakefs_client/api/config_api.py index cb6591f1b65..bb8802111c0 100644 --- a/clients/python/lakefs_client/api/config_api.py +++ b/clients/python/lakefs_client/api/config_api.py @@ -24,7 +24,6 @@ ) from lakefs_client.model.config import Config from lakefs_client.model.error import Error -from lakefs_client.model.garbage_collection_config import GarbageCollectionConfig class ConfigApi(object): @@ -86,54 +85,6 @@ def __init__(self, api_client=None): }, 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 - ) def get_config( self, @@ -196,64 +147,3 @@ def get_config( kwargs['_host_index'] = kwargs.get('_host_index') return self.get_config_endpoint.call_with_http_info(**kwargs) - 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) - diff --git a/clients/python/lakefs_client/api/internal_api.py b/clients/python/lakefs_client/api/internal_api.py index daf63fc4299..896563772a5 100644 --- a/clients/python/lakefs_client/api/internal_api.py +++ b/clients/python/lakefs_client/api/internal_api.py @@ -23,9 +23,13 @@ validate_and_convert_types ) from lakefs_client.model.auth_capabilities import AuthCapabilities +from lakefs_client.model.branch_protection_rule import BranchProtectionRule 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.garbage_collection_rules import GarbageCollectionRules +from lakefs_client.model.inline_object1 import InlineObject1 from lakefs_client.model.refs_dump import RefsDump from lakefs_client.model.setup import Setup from lakefs_client.model.setup_state import SetupState @@ -264,6 +268,54 @@ def __init__(self, api_client=None): }, 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,), @@ -402,7 +454,7 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.post_stats_events_endpoint = _Endpoint( + self.internal_create_branch_protection_rule_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [ @@ -412,17 +464,19 @@ def __init__(self, api_client=None): 'oidc_auth', 'saml_auth' ], - 'endpoint_path': '/statistics', - 'operation_id': 'post_stats_events', + 'endpoint_path': '/repositories/{repository}/branch_protection', + 'operation_id': 'internal_create_branch_protection_rule', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'stats_events_list', + 'repository', + 'branch_protection_rule', ], 'required': [ - 'stats_events_list', + 'repository', + 'branch_protection_rule', ], 'nullable': [ ], @@ -437,13 +491,17 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'stats_events_list': - (StatsEventsList,), + 'repository': + (str,), + 'branch_protection_rule': + (BranchProtectionRule,), }, 'attribute_map': { + 'repository': 'repository', }, 'location_map': { - 'stats_events_list': 'body', + 'repository': 'path', + 'branch_protection_rule': 'body', }, 'collection_format_map': { } @@ -458,7 +516,7 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.restore_refs_endpoint = _Endpoint( + self.internal_delete_branch_protection_rule_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [ @@ -468,19 +526,19 @@ def __init__(self, api_client=None): 'oidc_auth', 'saml_auth' ], - 'endpoint_path': '/repositories/{repository}/refs/restore', - 'operation_id': 'restore_refs', - 'http_method': 'PUT', + 'endpoint_path': '/repositories/{repository}/branch_protection', + 'operation_id': 'internal_delete_branch_protection_rule', + 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'repository', - 'refs_dump', + 'inline_object1', ], 'required': [ 'repository', - 'refs_dump', + 'inline_object1', ], 'nullable': [ ], @@ -497,15 +555,15 @@ def __init__(self, api_client=None): 'openapi_types': { 'repository': (str,), - 'refs_dump': - (RefsDump,), + 'inline_object1': + (InlineObject1,), }, 'attribute_map': { 'repository': 'repository', }, 'location_map': { 'repository': 'path', - 'refs_dump': 'body', + 'inline_object1': 'body', }, 'collection_format_map': { } @@ -520,7 +578,7 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.set_garbage_collection_rules_preflight_endpoint = _Endpoint( + self.internal_delete_garbage_collection_rules_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [ @@ -530,8 +588,63 @@ def __init__(self, api_client=None): 'oidc_auth', 'saml_auth' ], - 'endpoint_path': '/repositories/{repository}/gc/rules/set_allowed', - 'operation_id': 'set_garbage_collection_rules_preflight', + 'endpoint_path': '/repositories/{repository}/gc/rules', + 'operation_id': 'internal_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.internal_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': 'internal_get_branch_protection_rules', 'http_method': 'GET', 'servers': None, }, @@ -575,21 +688,84 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.setup_endpoint = _Endpoint( + self.internal_get_garbage_collection_rules_endpoint = _Endpoint( settings={ - 'response_type': (CredentialsWithSecret,), - 'auth': [], - 'endpoint_path': '/setup_lakefs', - 'operation_id': 'setup', + 'response_type': (GarbageCollectionRules,), + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/gc/rules', + 'operation_id': 'internal_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.internal_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': 'internal_set_garbage_collection_rules', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'setup', + 'repository', + 'garbage_collection_rules', ], 'required': [ - 'setup', + 'repository', + 'garbage_collection_rules', ], 'nullable': [ ], @@ -604,13 +780,17 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'setup': - (Setup,), + 'repository': + (str,), + 'garbage_collection_rules': + (GarbageCollectionRules,), }, 'attribute_map': { + 'repository': 'repository', }, 'location_map': { - 'setup': 'body', + 'repository': 'path', + 'garbage_collection_rules': 'body', }, 'collection_format_map': { } @@ -625,21 +805,27 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.setup_comm_prefs_endpoint = _Endpoint( + self.post_stats_events_endpoint = _Endpoint( settings={ 'response_type': None, - 'auth': [], - 'endpoint_path': '/setup_comm_prefs', - 'operation_id': 'setup_comm_prefs', + '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': [ - 'comm_prefs_input', + 'stats_events_list', ], 'required': [ - 'comm_prefs_input', + 'stats_events_list', ], 'nullable': [ ], @@ -654,13 +840,13 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'comm_prefs_input': - (CommPrefsInput,), + 'stats_events_list': + (StatsEventsList,), }, 'attribute_map': { }, 'location_map': { - 'comm_prefs_input': 'body', + 'stats_events_list': 'body', }, 'collection_format_map': { } @@ -675,7 +861,7 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.upload_object_preflight_endpoint = _Endpoint( + self.restore_refs_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [ @@ -685,21 +871,19 @@ def __init__(self, api_client=None): 'oidc_auth', 'saml_auth' ], - 'endpoint_path': '/repositories/{repository}/branches/{branch}/objects/stage_allowed', - 'operation_id': 'upload_object_preflight', - 'http_method': 'GET', + 'endpoint_path': '/repositories/{repository}/refs/restore', + 'operation_id': 'restore_refs', + 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'repository', - 'branch', - 'path', + 'refs_dump', ], 'required': [ 'repository', - 'branch', - 'path', + 'refs_dump', ], 'nullable': [ ], @@ -716,20 +900,15 @@ def __init__(self, api_client=None): 'openapi_types': { 'repository': (str,), - 'branch': - (str,), - 'path': - (str,), + 'refs_dump': + (RefsDump,), }, 'attribute_map': { 'repository': 'repository', - 'branch': 'branch', - 'path': 'path', }, 'location_map': { 'repository': 'path', - 'branch': 'path', - 'path': 'query', + 'refs_dump': 'body', }, 'collection_format_map': { } @@ -738,18 +917,242 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [], + 'content_type': [ + 'application/json' + ] }, api_client=api_client ) - - def create_branch_protection_rule_preflight( - self, - repository, - **kwargs - ): - """create_branch_protection_rule_preflight # noqa: E501 - + self.set_garbage_collection_rules_preflight_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/gc/rules/set_allowed', + 'operation_id': 'set_garbage_collection_rules_preflight', + '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.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': None, + '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 + ) + self.upload_object_preflight_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'basic_auth', + 'cookie_auth', + 'jwt_token', + 'oidc_auth', + 'saml_auth' + ], + 'endpoint_path': '/repositories/{repository}/branches/{branch}/objects/stage_allowed', + 'operation_id': 'upload_object_preflight', + 'http_method': 'GET', + '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 + ) + + def create_branch_protection_rule_preflight( + self, + repository, + **kwargs + ): + """create_branch_protection_rule_preflight # noqa: E501 + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1003,17 +1406,17 @@ def get_auth_capabilities( kwargs['_host_index'] = kwargs.get('_host_index') return self.get_auth_capabilities_endpoint.call_with_http_info(**kwargs) - def get_lake_fs_version( + def get_garbage_collection_config( self, **kwargs ): - """get_lake_fs_version # noqa: E501 + """get_garbage_collection_config # noqa: E501 - get version of lakeFS server # 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_lake_fs_version(async_req=True) + >>> thread = api.get_garbage_collection_config(async_req=True) >>> result = thread.get() @@ -1039,7 +1442,7 @@ def get_lake_fs_version( async_req (bool): execute request asynchronously Returns: - VersionConfig + GarbageCollectionConfig If the method is called asynchronously, returns the request thread. """ @@ -1062,18 +1465,19 @@ def get_lake_fs_version( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') - return self.get_lake_fs_version_endpoint.call_with_http_info(**kwargs) + return self.get_garbage_collection_config_endpoint.call_with_http_info(**kwargs) - def get_setup_state( + def get_lake_fs_version( self, **kwargs ): - """check if the lakeFS installation is already set up # noqa: E501 + """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_setup_state(async_req=True) + >>> thread = api.get_lake_fs_version(async_req=True) >>> result = thread.get() @@ -1099,7 +1503,7 @@ def get_setup_state( async_req (bool): execute request asynchronously Returns: - SetupState + VersionConfig If the method is called asynchronously, returns the request thread. """ @@ -1122,19 +1526,18 @@ def get_setup_state( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') - return self.get_setup_state_endpoint.call_with_http_info(**kwargs) + return self.get_lake_fs_version_endpoint.call_with_http_info(**kwargs) - def get_storage_config( + def get_setup_state( self, **kwargs ): - """get_storage_config # noqa: E501 + """check if the lakeFS installation is already set up # 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) + >>> thread = api.get_setup_state(async_req=True) >>> result = thread.get() @@ -1160,7 +1563,68 @@ def get_storage_config( async_req (bool): execute request asynchronously Returns: - StorageConfig + 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. """ @@ -1185,6 +1649,408 @@ def get_storage_config( kwargs['_host_index'] = kwargs.get('_host_index') return self.get_storage_config_endpoint.call_with_http_info(**kwargs) + def internal_create_branch_protection_rule( + self, + repository, + branch_protection_rule, + **kwargs + ): + """internal_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.internal_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.internal_create_branch_protection_rule_endpoint.call_with_http_info(**kwargs) + + def internal_delete_branch_protection_rule( + self, + repository, + inline_object1, + **kwargs + ): + """internal_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.internal_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.internal_delete_branch_protection_rule_endpoint.call_with_http_info(**kwargs) + + def internal_delete_garbage_collection_rules( + self, + repository, + **kwargs + ): + """internal_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.internal_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.internal_delete_garbage_collection_rules_endpoint.call_with_http_info(**kwargs) + + def internal_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.internal_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.internal_get_branch_protection_rules_endpoint.call_with_http_info(**kwargs) + + def internal_get_garbage_collection_rules( + self, + repository, + **kwargs + ): + """internal_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.internal_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.internal_get_garbage_collection_rules_endpoint.call_with_http_info(**kwargs) + + def internal_set_garbage_collection_rules( + self, + repository, + garbage_collection_rules, + **kwargs + ): + """internal_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.internal_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.internal_set_garbage_collection_rules_endpoint.call_with_http_info(**kwargs) + def post_stats_events( self, stats_events_list, diff --git a/clients/python/test/test_config_api.py b/clients/python/test/test_config_api.py index cb1cac81ed4..e9e31c52fb1 100644 --- a/clients/python/test/test_config_api.py +++ b/clients/python/test/test_config_api.py @@ -30,12 +30,6 @@ def test_get_config(self): """ pass - def test_get_garbage_collection_config(self): - """Test case for get_garbage_collection_config - - """ - pass - if __name__ == '__main__': unittest.main() diff --git a/clients/python/test/test_internal_api.py b/clients/python/test/test_internal_api.py index 711f6d08cdb..0067d08468f 100644 --- a/clients/python/test/test_internal_api.py +++ b/clients/python/test/test_internal_api.py @@ -51,6 +51,12 @@ def test_get_auth_capabilities(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 @@ -70,6 +76,43 @@ def test_get_storage_config(self): """ pass + def test_internal_create_branch_protection_rule(self): + """Test case for internal_create_branch_protection_rule + + """ + pass + + def test_internal_delete_branch_protection_rule(self): + """Test case for internal_delete_branch_protection_rule + + """ + pass + + def test_internal_delete_garbage_collection_rules(self): + """Test case for internal_delete_garbage_collection_rules + + """ + pass + + def test_internal_get_branch_protection_rules(self): + """Test case for internal_get_branch_protection_rules + + get branch protection rules # noqa: E501 + """ + pass + + def test_internal_get_garbage_collection_rules(self): + """Test case for internal_get_garbage_collection_rules + + """ + pass + + def test_internal_set_garbage_collection_rules(self): + """Test case for internal_set_garbage_collection_rules + + """ + pass + def test_post_stats_events(self): """Test case for post_stats_events