diff --git a/garage b/garage index 5a7675c..eabb37b 160000 --- a/garage +++ b/garage @@ -1 +1 @@ -Subproject commit 5a7675cf7cda7c92e016a183cdc921ef97554759 +Subproject commit eabb37b53f3dc09ddc7cac1ff4e2bf9fa985bf78 diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES index 87b63b6..6c88961 100644 --- a/python/.openapi-generator/FILES +++ b/python/.openapi-generator/FILES @@ -4,7 +4,17 @@ README.md docs/AddKeyRequest.md docs/AddNode200ResponseInner.md +docs/AllowBucketKeyRequest.md +docs/AllowBucketKeyRequestPermissions.md +docs/BucketApi.md +docs/BucketInfo.md +docs/BucketInfoQuotas.md +docs/BucketInfoWebsiteConfig.md +docs/BucketKeyInfo.md docs/ClusterLayout.md +docs/CreateBucketRequest.md +docs/CreateBucketRequestLocalAlias.md +docs/CreateBucketRequestLocalAliasAllow.md docs/GetNodes200Response.md docs/ImportKeyRequest.md docs/KeyApi.md @@ -14,15 +24,21 @@ docs/KeyInfoBucketsInnerPermissions.md docs/KeyInfoPermissions.md docs/LayoutApi.md docs/LayoutVersion.md +docs/ListBuckets200ResponseInner.md +docs/ListBuckets200ResponseInnerLocalAliasesInner.md docs/ListKeys200ResponseInner.md docs/NodeClusterInfo.md docs/NodeNetworkInfo.md docs/NodesApi.md +docs/UpdateBucketRequest.md +docs/UpdateBucketRequestQuotas.md +docs/UpdateBucketRequestWebsiteAccess.md docs/UpdateKeyRequest.md docs/UpdateKeyRequestAllow.md docs/UpdateKeyRequestDeny.md garage_admin_sdk/__init__.py garage_admin_sdk/api/__init__.py +garage_admin_sdk/api/bucket_api.py garage_admin_sdk/api/key_api.py garage_admin_sdk/api/layout_api.py garage_admin_sdk/api/nodes_api.py @@ -33,7 +49,16 @@ garage_admin_sdk/exceptions.py garage_admin_sdk/model/__init__.py garage_admin_sdk/model/add_key_request.py garage_admin_sdk/model/add_node200_response_inner.py +garage_admin_sdk/model/allow_bucket_key_request.py +garage_admin_sdk/model/allow_bucket_key_request_permissions.py +garage_admin_sdk/model/bucket_info.py +garage_admin_sdk/model/bucket_info_quotas.py +garage_admin_sdk/model/bucket_info_website_config.py +garage_admin_sdk/model/bucket_key_info.py garage_admin_sdk/model/cluster_layout.py +garage_admin_sdk/model/create_bucket_request.py +garage_admin_sdk/model/create_bucket_request_local_alias.py +garage_admin_sdk/model/create_bucket_request_local_alias_allow.py garage_admin_sdk/model/get_nodes200_response.py garage_admin_sdk/model/import_key_request.py garage_admin_sdk/model/key_info.py @@ -41,9 +66,14 @@ garage_admin_sdk/model/key_info_buckets_inner.py garage_admin_sdk/model/key_info_buckets_inner_permissions.py garage_admin_sdk/model/key_info_permissions.py garage_admin_sdk/model/layout_version.py +garage_admin_sdk/model/list_buckets200_response_inner.py +garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py garage_admin_sdk/model/list_keys200_response_inner.py garage_admin_sdk/model/node_cluster_info.py garage_admin_sdk/model/node_network_info.py +garage_admin_sdk/model/update_bucket_request.py +garage_admin_sdk/model/update_bucket_request_quotas.py +garage_admin_sdk/model/update_bucket_request_website_access.py garage_admin_sdk/model/update_key_request.py garage_admin_sdk/model/update_key_request_allow.py garage_admin_sdk/model/update_key_request_deny.py @@ -56,4 +86,19 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_allow_bucket_key_request.py +test/test_allow_bucket_key_request_permissions.py +test/test_bucket_api.py +test/test_bucket_info.py +test/test_bucket_info_quotas.py +test/test_bucket_info_website_config.py +test/test_bucket_key_info.py +test/test_create_bucket_request.py +test/test_create_bucket_request_local_alias.py +test/test_create_bucket_request_local_alias_allow.py +test/test_list_buckets200_response_inner.py +test/test_list_buckets200_response_inner_local_aliases_inner.py +test/test_update_bucket_request.py +test/test_update_bucket_request_quotas.py +test/test_update_bucket_request_website_access.py tox.ini diff --git a/python/README.md b/python/README.md index 8799b6b..a0b4217 100644 --- a/python/README.md +++ b/python/README.md @@ -6,7 +6,7 @@ Administrate your Garage cluster programatically, including status, layout, keys This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v0.7.3 +- API version: v0.8.0 - Package version: 0.7.3 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -52,12 +52,12 @@ Please follow the [installation procedure](#installation--usage) and then run th import time import garage_admin_sdk from pprint import pprint -from garage_admin_sdk.api import key_api -from garage_admin_sdk.model.add_key_request import AddKeyRequest -from garage_admin_sdk.model.import_key_request import ImportKeyRequest -from garage_admin_sdk.model.key_info import KeyInfo -from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner -from garage_admin_sdk.model.update_key_request import UpdateKeyRequest +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest +from garage_admin_sdk.model.bucket_info import BucketInfo +from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest +from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner +from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest # Defining the host is optional and defaults to http://localhost:3903/v0 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( @@ -78,17 +78,23 @@ configuration = garage_admin_sdk.Configuration( # Enter a context with an instance of the API client with garage_admin_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = key_api.KeyApi(api_client) - add_key_request = AddKeyRequest( - name="test-key", - ) # AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\" + api_instance = bucket_api.BucketApi(api_client) + allow_bucket_key_request = AllowBucketKeyRequest( + bucket_id="e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", + access_key_id="GK31c2f218a2e44f485b94239e", + permissions=AllowBucketKeyRequestPermissions( + read=True, + write=True, + owner=True, + ), + ) # AllowBucketKeyRequest | Aliases to put on the new bucket try: - # Create a new API key - api_response = api_instance.add_key(add_key_request) + # Allow key + api_response = api_instance.allow_bucket_key(allow_bucket_key_request) pprint(api_response) except garage_admin_sdk.ApiException as e: - print("Exception when calling KeyApi->add_key: %s\n" % e) + print("Exception when calling BucketApi->allow_bucket_key: %s\n" % e) ``` ## Documentation for API Endpoints @@ -97,6 +103,18 @@ All URIs are relative to *http://localhost:3903/v0* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*BucketApi* | [**allow_bucket_key**](docs/BucketApi.md#allow_bucket_key) | **POST** /bucket/allow | Allow key +*BucketApi* | [**create_bucket**](docs/BucketApi.md#create_bucket) | **POST** /bucket | Create a bucket +*BucketApi* | [**delete_bucket**](docs/BucketApi.md#delete_bucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket +*BucketApi* | [**delete_bucket_global_alias**](docs/BucketApi.md#delete_bucket_global_alias) | **DELETE** /bucket/alias/global | Delete a global alias +*BucketApi* | [**delete_bucket_local_alias**](docs/BucketApi.md#delete_bucket_local_alias) | **DELETE** /bucket/alias/local | Delete a local alias +*BucketApi* | [**deny_bucket_key**](docs/BucketApi.md#deny_bucket_key) | **POST** /bucket/deny | Deny key +*BucketApi* | [**find_bucket_info**](docs/BucketApi.md#find_bucket_info) | **GET** /bucket?globalAlias={alias} | Find a bucket +*BucketApi* | [**get_bucket_info**](docs/BucketApi.md#get_bucket_info) | **GET** /bucket?id={bucket_id} | Get a bucket +*BucketApi* | [**list_buckets**](docs/BucketApi.md#list_buckets) | **GET** /bucket | List all buckets +*BucketApi* | [**put_bucket_global_alias**](docs/BucketApi.md#put_bucket_global_alias) | **PUT** /bucket/alias/global | Add a global alias +*BucketApi* | [**put_bucket_local_alias**](docs/BucketApi.md#put_bucket_local_alias) | **PUT** /bucket/alias/local | Add a local alias +*BucketApi* | [**update_bucket**](docs/BucketApi.md#update_bucket) | **PUT** /bucket?id={bucket_id} | Update a bucket *KeyApi* | [**add_key**](docs/KeyApi.md#add_key) | **POST** /key | Create a new API key *KeyApi* | [**delete_key**](docs/KeyApi.md#delete_key) | **DELETE** /key?id={access_key} | Delete a key *KeyApi* | [**get_key**](docs/KeyApi.md#get_key) | **GET** /key?id={access_key} | Get key information @@ -116,7 +134,16 @@ Class | Method | HTTP request | Description - [AddKeyRequest](docs/AddKeyRequest.md) - [AddNode200ResponseInner](docs/AddNode200ResponseInner.md) + - [AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md) + - [AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md) + - [BucketInfo](docs/BucketInfo.md) + - [BucketInfoQuotas](docs/BucketInfoQuotas.md) + - [BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md) + - [BucketKeyInfo](docs/BucketKeyInfo.md) - [ClusterLayout](docs/ClusterLayout.md) + - [CreateBucketRequest](docs/CreateBucketRequest.md) + - [CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md) + - [CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md) - [GetNodes200Response](docs/GetNodes200Response.md) - [ImportKeyRequest](docs/ImportKeyRequest.md) - [KeyInfo](docs/KeyInfo.md) @@ -124,9 +151,14 @@ Class | Method | HTTP request | Description - [KeyInfoBucketsInnerPermissions](docs/KeyInfoBucketsInnerPermissions.md) - [KeyInfoPermissions](docs/KeyInfoPermissions.md) - [LayoutVersion](docs/LayoutVersion.md) + - [ListBuckets200ResponseInner](docs/ListBuckets200ResponseInner.md) + - [ListBuckets200ResponseInnerLocalAliasesInner](docs/ListBuckets200ResponseInnerLocalAliasesInner.md) - [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - [NodeClusterInfo](docs/NodeClusterInfo.md) - [NodeNetworkInfo](docs/NodeNetworkInfo.md) + - [UpdateBucketRequest](docs/UpdateBucketRequest.md) + - [UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md) + - [UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md) - [UpdateKeyRequest](docs/UpdateKeyRequest.md) - [UpdateKeyRequestAllow](docs/UpdateKeyRequestAllow.md) - [UpdateKeyRequestDeny](docs/UpdateKeyRequestDeny.md) diff --git a/python/docs/AllowBucketKeyRequest.md b/python/docs/AllowBucketKeyRequest.md new file mode 100644 index 0000000..41ca64f --- /dev/null +++ b/python/docs/AllowBucketKeyRequest.md @@ -0,0 +1,14 @@ +# AllowBucketKeyRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bucket_id** | **str** | | +**access_key_id** | **str** | | +**permissions** | [**AllowBucketKeyRequestPermissions**](AllowBucketKeyRequestPermissions.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/AllowBucketKeyRequestPermissions.md b/python/docs/AllowBucketKeyRequestPermissions.md new file mode 100644 index 0000000..369730f --- /dev/null +++ b/python/docs/AllowBucketKeyRequestPermissions.md @@ -0,0 +1,14 @@ +# AllowBucketKeyRequestPermissions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**read** | **bool** | | +**write** | **bool** | | +**owner** | **bool** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/BucketApi.md b/python/docs/BucketApi.md new file mode 100644 index 0000000..faef7a4 --- /dev/null +++ b/python/docs/BucketApi.md @@ -0,0 +1,1022 @@ +# garage_admin_sdk.BucketApi + +All URIs are relative to *http://localhost:3903/v0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**allow_bucket_key**](BucketApi.md#allow_bucket_key) | **POST** /bucket/allow | Allow key +[**create_bucket**](BucketApi.md#create_bucket) | **POST** /bucket | Create a bucket +[**delete_bucket**](BucketApi.md#delete_bucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket +[**delete_bucket_global_alias**](BucketApi.md#delete_bucket_global_alias) | **DELETE** /bucket/alias/global | Delete a global alias +[**delete_bucket_local_alias**](BucketApi.md#delete_bucket_local_alias) | **DELETE** /bucket/alias/local | Delete a local alias +[**deny_bucket_key**](BucketApi.md#deny_bucket_key) | **POST** /bucket/deny | Deny key +[**find_bucket_info**](BucketApi.md#find_bucket_info) | **GET** /bucket?globalAlias={alias} | Find a bucket +[**get_bucket_info**](BucketApi.md#get_bucket_info) | **GET** /bucket?id={bucket_id} | Get a bucket +[**list_buckets**](BucketApi.md#list_buckets) | **GET** /bucket | List all buckets +[**put_bucket_global_alias**](BucketApi.md#put_bucket_global_alias) | **PUT** /bucket/alias/global | Add a global alias +[**put_bucket_local_alias**](BucketApi.md#put_bucket_local_alias) | **PUT** /bucket/alias/local | Add a local alias +[**update_bucket**](BucketApi.md#update_bucket) | **PUT** /bucket?id={bucket_id} | Update a bucket + + +# **allow_bucket_key** +> BucketInfo allow_bucket_key(allow_bucket_key_request) + +Allow key + +⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + allow_bucket_key_request = AllowBucketKeyRequest( + bucket_id="e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", + access_key_id="GK31c2f218a2e44f485b94239e", + permissions=AllowBucketKeyRequestPermissions( + read=True, + write=True, + owner=True, + ), + ) # AllowBucketKeyRequest | Aliases to put on the new bucket + + # example passing only required values which don't have defaults set + try: + # Allow key + api_response = api_instance.allow_bucket_key(allow_bucket_key_request) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->allow_bucket_key: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **allow_bucket_key_request** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bad request, check your request body | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_bucket** +> BucketInfo create_bucket(create_bucket_request) + +Create a bucket + +Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + create_bucket_request = CreateBucketRequest( + global_alias="my_documents", + local_alias=CreateBucketRequestLocalAlias( + access_key_id="access_key_id_example", + alias="alias_example", + allow=CreateBucketRequestLocalAliasAllow( + read=True, + write=True, + owner=True, + ), + ), + ) # CreateBucketRequest | Aliases to put on the new bucket + + # example passing only required values which don't have defaults set + try: + # Create a bucket + api_response = api_instance.create_bucket(create_bucket_request) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->create_bucket: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_bucket_request** | [**CreateBucketRequest**](CreateBucketRequest.md)| Aliases to put on the new bucket | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | The payload is not formatted correctly | - | +**200** | Returns exhaustive information about the bucket | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_bucket** +> delete_bucket(bucket_id) + +Delete a bucket + +Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string + + # example passing only required values which don't have defaults set + try: + # Delete a bucket + api_instance.delete_bucket(bucket_id) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->delete_bucket: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bucket is not empty | - | +**404** | Bucket not found | - | +**204** | Bucket has been deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_bucket_global_alias** +> BucketInfo delete_bucket_global_alias(id, alias) + +Delete a global alias + +Delete a global alias from the target bucket + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | + alias = "my_documents" # str | + + # example passing only required values which don't have defaults set + try: + # Delete a global alias + api_response = api_instance.delete_bucket_global_alias(id, alias) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->delete_bucket_global_alias: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **alias** | **str**| | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bad request, check your request body | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_bucket_local_alias** +> BucketInfo delete_bucket_local_alias(id, access_key_id, alias) + +Delete a local alias + +Delete a local alias, bound to specified account, from the target bucket + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | + access_key_id = "GK31c2f218a2e44f485b94239e" # str | + alias = "my_documents" # str | + + # example passing only required values which don't have defaults set + try: + # Delete a local alias + api_response = api_instance.delete_bucket_local_alias(id, access_key_id, alias) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->delete_bucket_local_alias: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **access_key_id** | **str**| | + **alias** | **str**| | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bad request, check your request body | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[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) + +# **deny_bucket_key** +> BucketInfo deny_bucket_key(allow_bucket_key_request) + +Deny key + +⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + allow_bucket_key_request = AllowBucketKeyRequest( + bucket_id="e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b", + access_key_id="GK31c2f218a2e44f485b94239e", + permissions=AllowBucketKeyRequestPermissions( + read=True, + write=True, + owner=True, + ), + ) # AllowBucketKeyRequest | Aliases to put on the new bucket + + # example passing only required values which don't have defaults set + try: + # Deny key + api_response = api_instance.deny_bucket_key(allow_bucket_key_request) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->deny_bucket_key: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **allow_bucket_key_request** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bad request, check your request body | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **find_bucket_info** +> BucketInfo find_bucket_info(alias) + +Find a bucket + +Find a bucket by its global alias + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + alias = "my_documents" # str | The exact global alias of one of the existing buckets + + # example passing only required values which don't have defaults set + try: + # Find a bucket + api_response = api_instance.find_bucket_info(alias) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->find_bucket_info: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias** | **str**| The exact global alias of one of the existing buckets | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[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_bucket_info** +> BucketInfo get_bucket_info(bucket_id) + +Get a bucket + +Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string + + # example passing only required values which don't have defaults set + try: + # Get a bucket + api_response = api_instance.get_bucket_info(bucket_id) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->get_bucket_info: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_buckets** +> [ListBuckets200ResponseInner] list_buckets() + +List all buckets + +List all the buckets on the cluster with their UUID and their global and local aliases. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # List all buckets + api_response = api_instance.list_buckets() + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->list_buckets: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**[ListBuckets200ResponseInner]**](ListBuckets200ResponseInner.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**200** | Returns the UUID of the bucket and all its aliases | - | + +[[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) + +# **put_bucket_global_alias** +> BucketInfo put_bucket_global_alias(id, alias) + +Add a global alias + +Add a global alias to the target bucket + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | + alias = "my_documents" # str | + + # example passing only required values which don't have defaults set + try: + # Add a global alias + api_response = api_instance.put_bucket_global_alias(id, alias) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->put_bucket_global_alias: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **alias** | **str**| | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bad request, check your request body | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[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) + +# **put_bucket_local_alias** +> BucketInfo put_bucket_local_alias(id, access_key_id, alias) + +Add a local alias + +Add a local alias, bound to specified account, to the target bucket + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + id = "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b" # str | + access_key_id = "GK31c2f218a2e44f485b94239e" # str | + alias = "my_documents" # str | + + # example passing only required values which don't have defaults set + try: + # Add a local alias + api_response = api_instance.put_bucket_local_alias(id, access_key_id, alias) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->put_bucket_local_alias: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **access_key_id** | **str**| | + **alias** | **str**| | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bad request, check your request body | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_bucket** +> BucketInfo update_bucket(update_bucket_request) + +Update a bucket + +All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import time +import garage_admin_sdk +from garage_admin_sdk.api import bucket_api +from garage_admin_sdk.model.bucket_info import BucketInfo +from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:3903/v0 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v0" +) + +# 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 Bearer authorization: bearerAuth +configuration = garage_admin_sdk.Configuration( + access_token = 'YOUR_BEARER_TOKEN' +) + +# Enter a context with an instance of the API client +with garage_admin_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bucket_api.BucketApi(api_client) + update_bucket_request = UpdateBucketRequest( + website_access=UpdateBucketRequestWebsiteAccess( + enabled=True, + index_document="index.html", + error_document="error/400.html", + ), + quotas=UpdateBucketRequestQuotas( + max_size=19029801, + max_objects=1, + ), + ) # UpdateBucketRequest | Requested changes on the bucket. Both root fields are optionals. + + # example passing only required values which don't have defaults set + try: + # Update a bucket + api_response = api_instance.update_bucket(update_bucket_request) + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling BucketApi->update_bucket: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_bucket_request** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. | + +### Return type + +[**BucketInfo**](BucketInfo.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | +**400** | Bad request, check your body. | - | +**404** | Bucket not found | - | +**200** | Returns exhaustive information about the bucket | - | + +[[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/python/docs/BucketInfo.md b/python/docs/BucketInfo.md new file mode 100644 index 0000000..2aa507d --- /dev/null +++ b/python/docs/BucketInfo.md @@ -0,0 +1,20 @@ +# BucketInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**global_aliases** | **[str]** | | [optional] +**website_access** | **bool** | | [optional] +**website_config** | [**BucketInfoWebsiteConfig**](BucketInfoWebsiteConfig.md) | | [optional] +**keys** | [**[BucketKeyInfo]**](BucketKeyInfo.md) | | [optional] +**objects** | **int** | | [optional] +**bytes** | **int** | | [optional] +**unfinished_uploads** | **int** | | [optional] +**quotas** | [**BucketInfoQuotas**](BucketInfoQuotas.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/BucketInfoQuotas.md b/python/docs/BucketInfoQuotas.md new file mode 100644 index 0000000..763dcd9 --- /dev/null +++ b/python/docs/BucketInfoQuotas.md @@ -0,0 +1,13 @@ +# BucketInfoQuotas + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_size** | **int, none_type** | | [optional] +**max_objects** | **int, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/BucketInfoWebsiteConfig.md b/python/docs/BucketInfoWebsiteConfig.md new file mode 100644 index 0000000..dde2ab4 --- /dev/null +++ b/python/docs/BucketInfoWebsiteConfig.md @@ -0,0 +1,13 @@ +# BucketInfoWebsiteConfig + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index_document** | **str** | | [optional] +**error_document** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/BucketKeyInfo.md b/python/docs/BucketKeyInfo.md new file mode 100644 index 0000000..9b72531 --- /dev/null +++ b/python/docs/BucketKeyInfo.md @@ -0,0 +1,15 @@ +# BucketKeyInfo + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key_id** | **str** | | [optional] +**name** | **str** | | [optional] +**permissions** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] +**bucket_local_aliases** | **[str]** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/CreateBucketRequest.md b/python/docs/CreateBucketRequest.md new file mode 100644 index 0000000..836b776 --- /dev/null +++ b/python/docs/CreateBucketRequest.md @@ -0,0 +1,13 @@ +# CreateBucketRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**global_alias** | **str** | | [optional] +**local_alias** | [**CreateBucketRequestLocalAlias**](CreateBucketRequestLocalAlias.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/CreateBucketRequestLocalAlias.md b/python/docs/CreateBucketRequestLocalAlias.md new file mode 100644 index 0000000..f90d403 --- /dev/null +++ b/python/docs/CreateBucketRequestLocalAlias.md @@ -0,0 +1,14 @@ +# CreateBucketRequestLocalAlias + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key_id** | **str** | | [optional] +**alias** | **str** | | [optional] +**allow** | [**CreateBucketRequestLocalAliasAllow**](CreateBucketRequestLocalAliasAllow.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/CreateBucketRequestLocalAliasAllow.md b/python/docs/CreateBucketRequestLocalAliasAllow.md new file mode 100644 index 0000000..cb0a405 --- /dev/null +++ b/python/docs/CreateBucketRequestLocalAliasAllow.md @@ -0,0 +1,14 @@ +# CreateBucketRequestLocalAliasAllow + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**read** | **bool** | | [optional] +**write** | **bool** | | [optional] +**owner** | **bool** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/ListBuckets200ResponseInner.md b/python/docs/ListBuckets200ResponseInner.md new file mode 100644 index 0000000..3dfe23f --- /dev/null +++ b/python/docs/ListBuckets200ResponseInner.md @@ -0,0 +1,14 @@ +# ListBuckets200ResponseInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**global_aliases** | **[str]** | | [optional] +**local_aliases** | [**[ListBuckets200ResponseInnerLocalAliasesInner]**](ListBuckets200ResponseInnerLocalAliasesInner.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/ListBuckets200ResponseInnerLocalAliasesInner.md b/python/docs/ListBuckets200ResponseInnerLocalAliasesInner.md new file mode 100644 index 0000000..6cc16fa --- /dev/null +++ b/python/docs/ListBuckets200ResponseInnerLocalAliasesInner.md @@ -0,0 +1,13 @@ +# ListBuckets200ResponseInnerLocalAliasesInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alias** | **str** | | +**access_key_id** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/UpdateBucketRequest.md b/python/docs/UpdateBucketRequest.md new file mode 100644 index 0000000..1dcc12e --- /dev/null +++ b/python/docs/UpdateBucketRequest.md @@ -0,0 +1,13 @@ +# UpdateBucketRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**website_access** | [**UpdateBucketRequestWebsiteAccess**](UpdateBucketRequestWebsiteAccess.md) | | [optional] +**quotas** | [**UpdateBucketRequestQuotas**](UpdateBucketRequestQuotas.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/UpdateBucketRequestQuotas.md b/python/docs/UpdateBucketRequestQuotas.md new file mode 100644 index 0000000..9b28b10 --- /dev/null +++ b/python/docs/UpdateBucketRequestQuotas.md @@ -0,0 +1,13 @@ +# UpdateBucketRequestQuotas + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_size** | **int, none_type** | | [optional] +**max_objects** | **int, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/UpdateBucketRequestWebsiteAccess.md b/python/docs/UpdateBucketRequestWebsiteAccess.md new file mode 100644 index 0000000..58ef8a6 --- /dev/null +++ b/python/docs/UpdateBucketRequestWebsiteAccess.md @@ -0,0 +1,14 @@ +# UpdateBucketRequestWebsiteAccess + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | | [optional] +**index_document** | **str** | | [optional] +**error_document** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/garage_admin_sdk/__init__.py b/python/garage_admin_sdk/__init__.py index b6cc358..dbdf91b 100644 --- a/python/garage_admin_sdk/__init__.py +++ b/python/garage_admin_sdk/__init__.py @@ -1,11 +1,11 @@ # flake8: noqa """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/api/__init__.py b/python/garage_admin_sdk/api/__init__.py index 7c0365d..a87721f 100644 --- a/python/garage_admin_sdk/api/__init__.py +++ b/python/garage_admin_sdk/api/__init__.py @@ -1,3 +1,3 @@ # do not import all apis into this module because that uses a lot of memory and stack frames # if you need the ability to import all apis from one package, import them with -# from garage_admin_sdk.apis import KeyApi +# from garage_admin_sdk.apis import BucketApi diff --git a/python/garage_admin_sdk/api/bucket_api.py b/python/garage_admin_sdk/api/bucket_api.py new file mode 100644 index 0000000..da2a45a --- /dev/null +++ b/python/garage_admin_sdk/api/bucket_api.py @@ -0,0 +1,1700 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.api_client import ApiClient, Endpoint as _Endpoint +from garage_admin_sdk.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest +from garage_admin_sdk.model.bucket_info import BucketInfo +from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest +from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner +from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest + + +class BucketApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.allow_bucket_key_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket/allow', + 'operation_id': 'allow_bucket_key', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'allow_bucket_key_request', + ], + 'required': [ + 'allow_bucket_key_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'allow_bucket_key_request': + (AllowBucketKeyRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'allow_bucket_key_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.create_bucket_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket', + 'operation_id': 'create_bucket', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'create_bucket_request', + ], + 'required': [ + 'create_bucket_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'create_bucket_request': + (CreateBucketRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'create_bucket_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.delete_bucket_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket?id={bucket_id}', + 'operation_id': 'delete_bucket', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'bucket_id', + ], + 'required': [ + 'bucket_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'bucket_id': + (str,), + }, + 'attribute_map': { + 'bucket_id': 'bucket_id', + }, + 'location_map': { + 'bucket_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_bucket_global_alias_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket/alias/global', + 'operation_id': 'delete_bucket_global_alias', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'alias', + ], + 'required': [ + 'id', + 'alias', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'alias': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'alias': 'alias', + }, + 'location_map': { + 'id': 'query', + 'alias': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.delete_bucket_local_alias_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket/alias/local', + 'operation_id': 'delete_bucket_local_alias', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'access_key_id', + 'alias', + ], + 'required': [ + 'id', + 'access_key_id', + 'alias', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'access_key_id': + (str,), + 'alias': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'access_key_id': 'accessKeyId', + 'alias': 'alias', + }, + 'location_map': { + 'id': 'query', + 'access_key_id': 'query', + 'alias': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.deny_bucket_key_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket/deny', + 'operation_id': 'deny_bucket_key', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'allow_bucket_key_request', + ], + 'required': [ + 'allow_bucket_key_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'allow_bucket_key_request': + (AllowBucketKeyRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'allow_bucket_key_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + self.find_bucket_info_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket?globalAlias={alias}', + 'operation_id': 'find_bucket_info', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'alias', + ], + 'required': [ + 'alias', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'alias': + (str,), + }, + 'attribute_map': { + 'alias': 'alias', + }, + 'location_map': { + 'alias': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_bucket_info_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket?id={bucket_id}', + 'operation_id': 'get_bucket_info', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'bucket_id', + ], + 'required': [ + 'bucket_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'bucket_id': + (str,), + }, + 'attribute_map': { + 'bucket_id': 'bucket_id', + }, + 'location_map': { + 'bucket_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_buckets_endpoint = _Endpoint( + settings={ + 'response_type': ([ListBuckets200ResponseInner],), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket', + 'operation_id': 'list_buckets', + '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.put_bucket_global_alias_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket/alias/global', + 'operation_id': 'put_bucket_global_alias', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'alias', + ], + 'required': [ + 'id', + 'alias', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'alias': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'alias': 'alias', + }, + 'location_map': { + 'id': 'query', + 'alias': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.put_bucket_local_alias_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket/alias/local', + 'operation_id': 'put_bucket_local_alias', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'access_key_id', + 'alias', + ], + 'required': [ + 'id', + 'access_key_id', + 'alias', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'access_key_id': + (str,), + 'alias': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'access_key_id': 'accessKeyId', + 'alias': 'alias', + }, + 'location_map': { + 'id': 'query', + 'access_key_id': 'query', + 'alias': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_bucket_endpoint = _Endpoint( + settings={ + 'response_type': (BucketInfo,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/bucket?id={bucket_id}', + 'operation_id': 'update_bucket', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'update_bucket_request', + ], + 'required': [ + 'update_bucket_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'update_bucket_request': + (UpdateBucketRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'update_bucket_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client + ) + + def allow_bucket_key( + self, + allow_bucket_key_request, + **kwargs + ): + """Allow key # noqa: E501 + + ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.allow_bucket_key(allow_bucket_key_request, async_req=True) + >>> result = thread.get() + + Args: + allow_bucket_key_request (AllowBucketKeyRequest): Aliases to put on the new bucket + + 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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['allow_bucket_key_request'] = \ + allow_bucket_key_request + return self.allow_bucket_key_endpoint.call_with_http_info(**kwargs) + + def create_bucket( + self, + create_bucket_request, + **kwargs + ): + """Create a bucket # noqa: E501 + + Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_bucket(create_bucket_request, async_req=True) + >>> result = thread.get() + + Args: + create_bucket_request (CreateBucketRequest): Aliases to put on the new bucket + + 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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['create_bucket_request'] = \ + create_bucket_request + return self.create_bucket_endpoint.call_with_http_info(**kwargs) + + def delete_bucket( + self, + bucket_id, + **kwargs + ): + """Delete a bucket # noqa: E501 + + Delete a bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket! # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_bucket(bucket_id, async_req=True) + >>> result = thread.get() + + Args: + bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string + + 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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['bucket_id'] = \ + bucket_id + return self.delete_bucket_endpoint.call_with_http_info(**kwargs) + + def delete_bucket_global_alias( + self, + id, + alias, + **kwargs + ): + """Delete a global alias # noqa: E501 + + Delete a global alias from the target bucket # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_bucket_global_alias(id, alias, async_req=True) + >>> result = thread.get() + + Args: + id (str): + alias (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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['alias'] = \ + alias + return self.delete_bucket_global_alias_endpoint.call_with_http_info(**kwargs) + + def delete_bucket_local_alias( + self, + id, + access_key_id, + alias, + **kwargs + ): + """Delete a local alias # noqa: E501 + + Delete a local alias, bound to specified account, from the target bucket # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_bucket_local_alias(id, access_key_id, alias, async_req=True) + >>> result = thread.get() + + Args: + id (str): + access_key_id (str): + alias (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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['access_key_id'] = \ + access_key_id + kwargs['alias'] = \ + alias + return self.delete_bucket_local_alias_endpoint.call_with_http_info(**kwargs) + + def deny_bucket_key( + self, + allow_bucket_key_request, + **kwargs + ): + """Deny key # noqa: E501 + + ⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deny_bucket_key(allow_bucket_key_request, async_req=True) + >>> result = thread.get() + + Args: + allow_bucket_key_request (AllowBucketKeyRequest): Aliases to put on the new bucket + + 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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['allow_bucket_key_request'] = \ + allow_bucket_key_request + return self.deny_bucket_key_endpoint.call_with_http_info(**kwargs) + + def find_bucket_info( + self, + alias, + **kwargs + ): + """Find a bucket # noqa: E501 + + Find a bucket by its global alias # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.find_bucket_info(alias, async_req=True) + >>> result = thread.get() + + Args: + alias (str): The exact global alias of one of the existing buckets + + 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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['alias'] = \ + alias + return self.find_bucket_info_endpoint.call_with_http_info(**kwargs) + + def get_bucket_info( + self, + bucket_id, + **kwargs + ): + """Get a bucket # noqa: E501 + + Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). # 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_bucket_info(bucket_id, async_req=True) + >>> result = thread.get() + + Args: + bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string + + 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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['bucket_id'] = \ + bucket_id + return self.get_bucket_info_endpoint.call_with_http_info(**kwargs) + + def list_buckets( + self, + **kwargs + ): + """List all buckets # noqa: E501 + + List all the buckets on the cluster with their UUID and their global and local aliases. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_buckets(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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + [ListBuckets200ResponseInner] + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_buckets_endpoint.call_with_http_info(**kwargs) + + def put_bucket_global_alias( + self, + id, + alias, + **kwargs + ): + """Add a global alias # noqa: E501 + + Add a global alias to the target bucket # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_bucket_global_alias(id, alias, async_req=True) + >>> result = thread.get() + + Args: + id (str): + alias (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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['alias'] = \ + alias + return self.put_bucket_global_alias_endpoint.call_with_http_info(**kwargs) + + def put_bucket_local_alias( + self, + id, + access_key_id, + alias, + **kwargs + ): + """Add a local alias # noqa: E501 + + Add a local alias, bound to specified account, to the target bucket # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_bucket_local_alias(id, access_key_id, alias, async_req=True) + >>> result = thread.get() + + Args: + id (str): + access_key_id (str): + alias (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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + kwargs['access_key_id'] = \ + access_key_id + kwargs['alias'] = \ + alias + return self.put_bucket_local_alias_endpoint.call_with_http_info(**kwargs) + + def update_bucket( + self, + update_bucket_request, + **kwargs + ): + """Update a bucket # noqa: E501 + + All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_bucket(update_bucket_request, async_req=True) + >>> result = thread.get() + + Args: + update_bucket_request (UpdateBucketRequest): Requested changes on the bucket. Both root fields are optionals. + + 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. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + _request_auths (list): set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + Default is None + async_req (bool): execute request asynchronously + + Returns: + BucketInfo + 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['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['update_bucket_request'] = \ + update_bucket_request + return self.update_bucket_endpoint.call_with_http_info(**kwargs) + diff --git a/python/garage_admin_sdk/api/key_api.py b/python/garage_admin_sdk/api/key_api.py index 4ac7196..3a651bb 100644 --- a/python/garage_admin_sdk/api/key_api.py +++ b/python/garage_admin_sdk/api/key_api.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/api/layout_api.py b/python/garage_admin_sdk/api/layout_api.py index 6768122..39785d7 100644 --- a/python/garage_admin_sdk/api/layout_api.py +++ b/python/garage_admin_sdk/api/layout_api.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/api/nodes_api.py b/python/garage_admin_sdk/api/nodes_api.py index 835fd9c..acd2dbb 100644 --- a/python/garage_admin_sdk/api/nodes_api.py +++ b/python/garage_admin_sdk/api/nodes_api.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/api_client.py b/python/garage_admin_sdk/api_client.py index 0e6c7b5..72e537c 100644 --- a/python/garage_admin_sdk/api_client.py +++ b/python/garage_admin_sdk/api_client.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ @@ -801,11 +801,11 @@ class Endpoint(object): """ This method is invoked when endpoints are called Example: - api_instance = KeyApi() - api_instance.add_key # this is an instance of the class Endpoint - api_instance.add_key() # this invokes api_instance.add_key.__call__() + api_instance = BucketApi() + api_instance.allow_bucket_key # this is an instance of the class Endpoint + api_instance.allow_bucket_key() # this invokes api_instance.allow_bucket_key.__call__() which then invokes the callable functions stored in that endpoint at - api_instance.add_key.callable or self.callable in this class + api_instance.allow_bucket_key.callable or self.callable in this class """ return self.callable(self, *args, **kwargs) diff --git a/python/garage_admin_sdk/apis/__init__.py b/python/garage_admin_sdk/apis/__init__.py index 55eba06..e9327b7 100644 --- a/python/garage_admin_sdk/apis/__init__.py +++ b/python/garage_admin_sdk/apis/__init__.py @@ -6,7 +6,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from garage_admin_sdk.api.key_api import KeyApi +# from garage_admin_sdk.api.bucket_api import BucketApi # # or import this package, but before doing it, use: # @@ -14,6 +14,7 @@ # sys.setrecursionlimit(n) # Import APIs into API package: +from garage_admin_sdk.api.bucket_api import BucketApi from garage_admin_sdk.api.key_api import KeyApi from garage_admin_sdk.api.layout_api import LayoutApi from garage_admin_sdk.api.nodes_api import NodesApi diff --git a/python/garage_admin_sdk/configuration.py b/python/garage_admin_sdk/configuration.py index 687c827..1e118fa 100644 --- a/python/garage_admin_sdk/configuration.py +++ b/python/garage_admin_sdk/configuration.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ @@ -387,7 +387,7 @@ class Configuration(object): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v0.7.3\n"\ + "Version of the API: v0.8.0\n"\ "SDK Package Version: 0.7.3".\ format(env=sys.platform, pyversion=sys.version) diff --git a/python/garage_admin_sdk/exceptions.py b/python/garage_admin_sdk/exceptions.py index a896313..ac96627 100644 --- a/python/garage_admin_sdk/exceptions.py +++ b/python/garage_admin_sdk/exceptions.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/add_key_request.py b/python/garage_admin_sdk/model/add_key_request.py index 25917e3..bf5eaf0 100644 --- a/python/garage_admin_sdk/model/add_key_request.py +++ b/python/garage_admin_sdk/model/add_key_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/add_node200_response_inner.py b/python/garage_admin_sdk/model/add_node200_response_inner.py index 14cd1b2..f219373 100644 --- a/python/garage_admin_sdk/model/add_node200_response_inner.py +++ b/python/garage_admin_sdk/model/add_node200_response_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/allow_bucket_key_request.py b/python/garage_admin_sdk/model/allow_bucket_key_request.py new file mode 100644 index 0000000..1088939 --- /dev/null +++ b/python/garage_admin_sdk/model/allow_bucket_key_request.py @@ -0,0 +1,287 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions + globals()['AllowBucketKeyRequestPermissions'] = AllowBucketKeyRequestPermissions + + +class AllowBucketKeyRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'bucket_id': (str,), # noqa: E501 + 'access_key_id': (str,), # noqa: E501 + 'permissions': (AllowBucketKeyRequestPermissions,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'bucket_id': 'bucketId', # noqa: E501 + 'access_key_id': 'accessKeyId', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, bucket_id, access_key_id, permissions, *args, **kwargs): # noqa: E501 + """AllowBucketKeyRequest - a model defined in OpenAPI + + Args: + bucket_id (str): + access_key_id (str): + permissions (AllowBucketKeyRequestPermissions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.bucket_id = bucket_id + self.access_key_id = access_key_id + self.permissions = permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, bucket_id, access_key_id, permissions, *args, **kwargs): # noqa: E501 + """AllowBucketKeyRequest - a model defined in OpenAPI + + Args: + bucket_id (str): + access_key_id (str): + permissions (AllowBucketKeyRequestPermissions): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.bucket_id = bucket_id + self.access_key_id = access_key_id + self.permissions = permissions + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/allow_bucket_key_request_permissions.py b/python/garage_admin_sdk/model/allow_bucket_key_request_permissions.py new file mode 100644 index 0000000..cee3b02 --- /dev/null +++ b/python/garage_admin_sdk/model/allow_bucket_key_request_permissions.py @@ -0,0 +1,281 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + + +class AllowBucketKeyRequestPermissions(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'read': (bool,), # noqa: E501 + 'write': (bool,), # noqa: E501 + 'owner': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'read': 'read', # noqa: E501 + 'write': 'write', # noqa: E501 + 'owner': 'owner', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, read, write, owner, *args, **kwargs): # noqa: E501 + """AllowBucketKeyRequestPermissions - a model defined in OpenAPI + + Args: + read (bool): + write (bool): + owner (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.read = read + self.write = write + self.owner = owner + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, read, write, owner, *args, **kwargs): # noqa: E501 + """AllowBucketKeyRequestPermissions - a model defined in OpenAPI + + Args: + read (bool): + write (bool): + owner (bool): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.read = read + self.write = write + self.owner = owner + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_info.py b/python/garage_admin_sdk/model/bucket_info.py new file mode 100644 index 0000000..174aa9c --- /dev/null +++ b/python/garage_admin_sdk/model/bucket_info.py @@ -0,0 +1,305 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas + from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig + from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo + globals()['BucketInfoQuotas'] = BucketInfoQuotas + globals()['BucketInfoWebsiteConfig'] = BucketInfoWebsiteConfig + globals()['BucketKeyInfo'] = BucketKeyInfo + + +class BucketInfo(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'global_aliases': ([str],), # noqa: E501 + 'website_access': (bool,), # noqa: E501 + 'website_config': (BucketInfoWebsiteConfig,), # noqa: E501 + 'keys': ([BucketKeyInfo],), # noqa: E501 + 'objects': (int,), # noqa: E501 + 'bytes': (int,), # noqa: E501 + 'unfinished_uploads': (int,), # noqa: E501 + 'quotas': (BucketInfoQuotas,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'global_aliases': 'globalAliases', # noqa: E501 + 'website_access': 'websiteAccess', # noqa: E501 + 'website_config': 'websiteConfig', # noqa: E501 + 'keys': 'keys', # noqa: E501 + 'objects': 'objects', # noqa: E501 + 'bytes': 'bytes', # noqa: E501 + 'unfinished_uploads': 'unfinishedUploads', # noqa: E501 + 'quotas': 'quotas', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BucketInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + global_aliases ([str]): [optional] # noqa: E501 + website_access (bool): [optional] # noqa: E501 + website_config (BucketInfoWebsiteConfig): [optional] # noqa: E501 + keys ([BucketKeyInfo]): [optional] # noqa: E501 + objects (int): [optional] # noqa: E501 + bytes (int): [optional] # noqa: E501 + unfinished_uploads (int): [optional] # noqa: E501 + quotas (BucketInfoQuotas): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BucketInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 + global_aliases ([str]): [optional] # noqa: E501 + website_access (bool): [optional] # noqa: E501 + website_config (BucketInfoWebsiteConfig): [optional] # noqa: E501 + keys ([BucketKeyInfo]): [optional] # noqa: E501 + objects (int): [optional] # noqa: E501 + bytes (int): [optional] # noqa: E501 + unfinished_uploads (int): [optional] # noqa: E501 + quotas (BucketInfoQuotas): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_info_quotas.py b/python/garage_admin_sdk/model/bucket_info_quotas.py new file mode 100644 index 0000000..18976d4 --- /dev/null +++ b/python/garage_admin_sdk/model/bucket_info_quotas.py @@ -0,0 +1,267 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + + +class BucketInfoQuotas(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'max_size': (int, none_type,), # noqa: E501 + 'max_objects': (int, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'max_size': 'maxSize', # noqa: E501 + 'max_objects': 'maxObjects', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BucketInfoQuotas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + max_size (int, none_type): [optional] # noqa: E501 + max_objects (int, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BucketInfoQuotas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + max_size (int, none_type): [optional] # noqa: E501 + max_objects (int, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_info_website_config.py b/python/garage_admin_sdk/model/bucket_info_website_config.py new file mode 100644 index 0000000..775b067 --- /dev/null +++ b/python/garage_admin_sdk/model/bucket_info_website_config.py @@ -0,0 +1,267 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + + +class BucketInfoWebsiteConfig(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'index_document': (str,), # noqa: E501 + 'error_document': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'index_document': 'indexDocument', # noqa: E501 + 'error_document': 'errorDocument', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BucketInfoWebsiteConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + index_document (str): [optional] # noqa: E501 + error_document (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BucketInfoWebsiteConfig - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + index_document (str): [optional] # noqa: E501 + error_document (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/bucket_key_info.py b/python/garage_admin_sdk/model/bucket_key_info.py new file mode 100644 index 0000000..9c1db3d --- /dev/null +++ b/python/garage_admin_sdk/model/bucket_key_info.py @@ -0,0 +1,281 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow + globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow + + +class BucketKeyInfo(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'access_key_id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'permissions': (CreateBucketRequestLocalAliasAllow,), # noqa: E501 + 'bucket_local_aliases': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_key_id': 'accessKeyId', # noqa: E501 + 'name': 'name', # noqa: E501 + 'permissions': 'permissions', # noqa: E501 + 'bucket_local_aliases': 'bucketLocalAliases', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BucketKeyInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + access_key_id (str): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + permissions (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 + bucket_local_aliases ([str]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """BucketKeyInfo - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + access_key_id (str): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + permissions (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 + bucket_local_aliases ([str]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/cluster_layout.py b/python/garage_admin_sdk/model/cluster_layout.py index 482e106..ce71b45 100644 --- a/python/garage_admin_sdk/model/cluster_layout.py +++ b/python/garage_admin_sdk/model/cluster_layout.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/create_bucket_request.py b/python/garage_admin_sdk/model/create_bucket_request.py new file mode 100644 index 0000000..4b64638 --- /dev/null +++ b/python/garage_admin_sdk/model/create_bucket_request.py @@ -0,0 +1,273 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias + globals()['CreateBucketRequestLocalAlias'] = CreateBucketRequestLocalAlias + + +class CreateBucketRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'global_alias': (str,), # noqa: E501 + 'local_alias': (CreateBucketRequestLocalAlias,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'global_alias': 'globalAlias', # noqa: E501 + 'local_alias': 'localAlias', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateBucketRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + global_alias (str): [optional] # noqa: E501 + local_alias (CreateBucketRequestLocalAlias): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateBucketRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + global_alias (str): [optional] # noqa: E501 + local_alias (CreateBucketRequestLocalAlias): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/create_bucket_request_local_alias.py b/python/garage_admin_sdk/model/create_bucket_request_local_alias.py new file mode 100644 index 0000000..27e4895 --- /dev/null +++ b/python/garage_admin_sdk/model/create_bucket_request_local_alias.py @@ -0,0 +1,277 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow + globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow + + +class CreateBucketRequestLocalAlias(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'access_key_id': (str,), # noqa: E501 + 'alias': (str,), # noqa: E501 + 'allow': (CreateBucketRequestLocalAliasAllow,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access_key_id': 'accessKeyId', # noqa: E501 + 'alias': 'alias', # noqa: E501 + 'allow': 'allow', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateBucketRequestLocalAlias - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + access_key_id (str): [optional] # noqa: E501 + alias (str): [optional] # noqa: E501 + allow (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateBucketRequestLocalAlias - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + access_key_id (str): [optional] # noqa: E501 + alias (str): [optional] # noqa: E501 + allow (CreateBucketRequestLocalAliasAllow): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py b/python/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py new file mode 100644 index 0000000..ccc8b9b --- /dev/null +++ b/python/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py @@ -0,0 +1,271 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + + +class CreateBucketRequestLocalAliasAllow(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'read': (bool,), # noqa: E501 + 'write': (bool,), # noqa: E501 + 'owner': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'read': 'read', # noqa: E501 + 'write': 'write', # noqa: E501 + 'owner': 'owner', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CreateBucketRequestLocalAliasAllow - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + read (bool): [optional] # noqa: E501 + write (bool): [optional] # noqa: E501 + owner (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """CreateBucketRequestLocalAliasAllow - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + read (bool): [optional] # noqa: E501 + write (bool): [optional] # noqa: E501 + owner (bool): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/get_nodes200_response.py b/python/garage_admin_sdk/model/get_nodes200_response.py index 5d057ac..a0c1500 100644 --- a/python/garage_admin_sdk/model/get_nodes200_response.py +++ b/python/garage_admin_sdk/model/get_nodes200_response.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/import_key_request.py b/python/garage_admin_sdk/model/import_key_request.py index 8f488cf..9417f4e 100644 --- a/python/garage_admin_sdk/model/import_key_request.py +++ b/python/garage_admin_sdk/model/import_key_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/key_info.py b/python/garage_admin_sdk/model/key_info.py index 6f21a62..3ee863b 100644 --- a/python/garage_admin_sdk/model/key_info.py +++ b/python/garage_admin_sdk/model/key_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/key_info_buckets_inner.py b/python/garage_admin_sdk/model/key_info_buckets_inner.py index aab4598..e3a8e18 100644 --- a/python/garage_admin_sdk/model/key_info_buckets_inner.py +++ b/python/garage_admin_sdk/model/key_info_buckets_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py b/python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py index 4c0d3d4..177e8ae 100644 --- a/python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py +++ b/python/garage_admin_sdk/model/key_info_buckets_inner_permissions.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/key_info_permissions.py b/python/garage_admin_sdk/model/key_info_permissions.py index 404ceda..035ee39 100644 --- a/python/garage_admin_sdk/model/key_info_permissions.py +++ b/python/garage_admin_sdk/model/key_info_permissions.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/layout_version.py b/python/garage_admin_sdk/model/layout_version.py index ff5d382..a3369b2 100644 --- a/python/garage_admin_sdk/model/layout_version.py +++ b/python/garage_admin_sdk/model/layout_version.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/list_buckets200_response_inner.py b/python/garage_admin_sdk/model/list_buckets200_response_inner.py new file mode 100644 index 0000000..d478a66 --- /dev/null +++ b/python/garage_admin_sdk/model/list_buckets200_response_inner.py @@ -0,0 +1,283 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner + globals()['ListBuckets200ResponseInnerLocalAliasesInner'] = ListBuckets200ResponseInnerLocalAliasesInner + + +class ListBuckets200ResponseInner(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'global_aliases': ([str],), # noqa: E501 + 'local_aliases': ([ListBuckets200ResponseInnerLocalAliasesInner],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'global_aliases': 'globalAliases', # noqa: E501 + 'local_aliases': 'localAliases', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """ListBuckets200ResponseInner - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + global_aliases ([str]): [optional] # noqa: E501 + local_aliases ([ListBuckets200ResponseInnerLocalAliasesInner]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """ListBuckets200ResponseInner - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + global_aliases ([str]): [optional] # noqa: E501 + local_aliases ([ListBuckets200ResponseInnerLocalAliasesInner]): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py b/python/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py new file mode 100644 index 0000000..083c503 --- /dev/null +++ b/python/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py @@ -0,0 +1,275 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + + +class ListBuckets200ResponseInnerLocalAliasesInner(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'alias': (str,), # noqa: E501 + 'access_key_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'alias': 'alias', # noqa: E501 + 'access_key_id': 'accessKeyId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, alias, access_key_id, *args, **kwargs): # noqa: E501 + """ListBuckets200ResponseInnerLocalAliasesInner - a model defined in OpenAPI + + Args: + alias (str): + access_key_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.alias = alias + self.access_key_id = access_key_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, alias, access_key_id, *args, **kwargs): # noqa: E501 + """ListBuckets200ResponseInnerLocalAliasesInner - a model defined in OpenAPI + + Args: + alias (str): + access_key_id (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.alias = alias + self.access_key_id = access_key_id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/list_keys200_response_inner.py b/python/garage_admin_sdk/model/list_keys200_response_inner.py index 2b0d72e..9a6f276 100644 --- a/python/garage_admin_sdk/model/list_keys200_response_inner.py +++ b/python/garage_admin_sdk/model/list_keys200_response_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/node_cluster_info.py b/python/garage_admin_sdk/model/node_cluster_info.py index 7a0b6a5..868bf9a 100644 --- a/python/garage_admin_sdk/model/node_cluster_info.py +++ b/python/garage_admin_sdk/model/node_cluster_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/node_network_info.py b/python/garage_admin_sdk/model/node_network_info.py index 537747a..aeda1fc 100644 --- a/python/garage_admin_sdk/model/node_network_info.py +++ b/python/garage_admin_sdk/model/node_network_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/update_bucket_request.py b/python/garage_admin_sdk/model/update_bucket_request.py new file mode 100644 index 0000000..63f3915 --- /dev/null +++ b/python/garage_admin_sdk/model/update_bucket_request.py @@ -0,0 +1,275 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + +def lazy_import(): + from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas + from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess + globals()['UpdateBucketRequestQuotas'] = UpdateBucketRequestQuotas + globals()['UpdateBucketRequestWebsiteAccess'] = UpdateBucketRequestWebsiteAccess + + +class UpdateBucketRequest(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'website_access': (UpdateBucketRequestWebsiteAccess,), # noqa: E501 + 'quotas': (UpdateBucketRequestQuotas,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'website_access': 'websiteAccess', # noqa: E501 + 'quotas': 'quotas', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateBucketRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + website_access (UpdateBucketRequestWebsiteAccess): [optional] # noqa: E501 + quotas (UpdateBucketRequestQuotas): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateBucketRequest - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + website_access (UpdateBucketRequestWebsiteAccess): [optional] # noqa: E501 + quotas (UpdateBucketRequestQuotas): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_bucket_request_quotas.py b/python/garage_admin_sdk/model/update_bucket_request_quotas.py new file mode 100644 index 0000000..437f92b --- /dev/null +++ b/python/garage_admin_sdk/model/update_bucket_request_quotas.py @@ -0,0 +1,267 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + + +class UpdateBucketRequestQuotas(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'max_size': (int, none_type,), # noqa: E501 + 'max_objects': (int, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'max_size': 'maxSize', # noqa: E501 + 'max_objects': 'maxObjects', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateBucketRequestQuotas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + max_size (int, none_type): [optional] # noqa: E501 + max_objects (int, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateBucketRequestQuotas - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + max_size (int, none_type): [optional] # noqa: E501 + max_objects (int, none_type): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_bucket_request_website_access.py b/python/garage_admin_sdk/model/update_bucket_request_website_access.py new file mode 100644 index 0000000..cc15778 --- /dev/null +++ b/python/garage_admin_sdk/model/update_bucket_request_website_access.py @@ -0,0 +1,271 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from garage_admin_sdk.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from garage_admin_sdk.exceptions import ApiAttributeError + + + +class UpdateBucketRequestWebsiteAccess(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'enabled': (bool,), # noqa: E501 + 'index_document': (str,), # noqa: E501 + 'error_document': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'enabled': 'enabled', # noqa: E501 + 'index_document': 'indexDocument', # noqa: E501 + 'error_document': 'errorDocument', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UpdateBucketRequestWebsiteAccess - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + enabled (bool): [optional] # noqa: E501 + index_document (str): [optional] # noqa: E501 + error_document (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', True) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """UpdateBucketRequestWebsiteAccess - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + enabled (bool): [optional] # noqa: E501 + index_document (str): [optional] # noqa: E501 + error_document (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + for arg in args: + if isinstance(arg, dict): + kwargs.update(arg) + else: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/python/garage_admin_sdk/model/update_key_request.py b/python/garage_admin_sdk/model/update_key_request.py index 6df5930..e119f65 100644 --- a/python/garage_admin_sdk/model/update_key_request.py +++ b/python/garage_admin_sdk/model/update_key_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/update_key_request_allow.py b/python/garage_admin_sdk/model/update_key_request_allow.py index 90bee7d..9ddb4af 100644 --- a/python/garage_admin_sdk/model/update_key_request_allow.py +++ b/python/garage_admin_sdk/model/update_key_request_allow.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model/update_key_request_deny.py b/python/garage_admin_sdk/model/update_key_request_deny.py index 55db81c..d8ef3dd 100644 --- a/python/garage_admin_sdk/model/update_key_request_deny.py +++ b/python/garage_admin_sdk/model/update_key_request_deny.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/model_utils.py b/python/garage_admin_sdk/model_utils.py index 9601ab9..fc7c0fc 100644 --- a/python/garage_admin_sdk/model_utils.py +++ b/python/garage_admin_sdk/model_utils.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/garage_admin_sdk/models/__init__.py b/python/garage_admin_sdk/models/__init__.py index 16f229f..a516b66 100644 --- a/python/garage_admin_sdk/models/__init__.py +++ b/python/garage_admin_sdk/models/__init__.py @@ -11,7 +11,16 @@ from garage_admin_sdk.model.add_key_request import AddKeyRequest from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner +from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest +from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions +from garage_admin_sdk.model.bucket_info import BucketInfo +from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas +from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig +from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo from garage_admin_sdk.model.cluster_layout import ClusterLayout +from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest +from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias +from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response from garage_admin_sdk.model.import_key_request import ImportKeyRequest from garage_admin_sdk.model.key_info import KeyInfo @@ -19,9 +28,14 @@ from garage_admin_sdk.model.key_info_buckets_inner import KeyInfoBucketsInner from garage_admin_sdk.model.key_info_buckets_inner_permissions import KeyInfoBucketsInnerPermissions from garage_admin_sdk.model.key_info_permissions import KeyInfoPermissions from garage_admin_sdk.model.layout_version import LayoutVersion +from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner +from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo from garage_admin_sdk.model.node_network_info import NodeNetworkInfo +from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest +from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas +from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess from garage_admin_sdk.model.update_key_request import UpdateKeyRequest from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny diff --git a/python/garage_admin_sdk/rest.py b/python/garage_admin_sdk/rest.py index 0b07c3c..2f0ab6c 100644 --- a/python/garage_admin_sdk/rest.py +++ b/python/garage_admin_sdk/rest.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ diff --git a/python/setup.py b/python/setup.py index 74307ad..9e77bc9 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.7.3 + Garage Administration API v0+garage-v0.8.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 - The version of the OpenAPI document: v0.7.3 + The version of the OpenAPI document: v0.8.0 Generated by: https://openapi-generator.tech """ @@ -27,11 +27,11 @@ REQUIRES = [ setup( name=NAME, version=VERSION, - description="Garage Administration API v0+garage-v0.7.3", + description="Garage Administration API v0+garage-v0.8.0", author="OpenAPI Generator community", author_email="team@openapitools.org", url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Garage Administration API v0+garage-v0.7.3"], + keywords=["OpenAPI", "OpenAPI-Generator", "Garage Administration API v0+garage-v0.8.0"], python_requires=">=3.6", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), diff --git a/python/test/test_allow_bucket_key_request.py b/python/test/test_allow_bucket_key_request.py new file mode 100644 index 0000000..e3e286e --- /dev/null +++ b/python/test/test_allow_bucket_key_request.py @@ -0,0 +1,37 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions +globals()['AllowBucketKeyRequestPermissions'] = AllowBucketKeyRequestPermissions +from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest + + +class TestAllowBucketKeyRequest(unittest.TestCase): + """AllowBucketKeyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAllowBucketKeyRequest(self): + """Test AllowBucketKeyRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = AllowBucketKeyRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_allow_bucket_key_request_permissions.py b/python/test/test_allow_bucket_key_request_permissions.py new file mode 100644 index 0000000..e3b962a --- /dev/null +++ b/python/test/test_allow_bucket_key_request_permissions.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions + + +class TestAllowBucketKeyRequestPermissions(unittest.TestCase): + """AllowBucketKeyRequestPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAllowBucketKeyRequestPermissions(self): + """Test AllowBucketKeyRequestPermissions""" + # FIXME: construct object with mandatory attributes with example values + # model = AllowBucketKeyRequestPermissions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_bucket_api.py b/python/test/test_bucket_api.py new file mode 100644 index 0000000..7a68624 --- /dev/null +++ b/python/test/test_bucket_api.py @@ -0,0 +1,112 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import garage_admin_sdk +from garage_admin_sdk.api.bucket_api import BucketApi # noqa: E501 + + +class TestBucketApi(unittest.TestCase): + """BucketApi unit test stubs""" + + def setUp(self): + self.api = BucketApi() # noqa: E501 + + def tearDown(self): + pass + + def test_allow_bucket_key(self): + """Test case for allow_bucket_key + + Allow key # noqa: E501 + """ + pass + + def test_create_bucket(self): + """Test case for create_bucket + + Create a bucket # noqa: E501 + """ + pass + + def test_delete_bucket(self): + """Test case for delete_bucket + + Delete a bucket # noqa: E501 + """ + pass + + def test_delete_bucket_global_alias(self): + """Test case for delete_bucket_global_alias + + Delete a global alias # noqa: E501 + """ + pass + + def test_delete_bucket_local_alias(self): + """Test case for delete_bucket_local_alias + + Delete a local alias # noqa: E501 + """ + pass + + def test_deny_bucket_key(self): + """Test case for deny_bucket_key + + Deny key # noqa: E501 + """ + pass + + def test_find_bucket_info(self): + """Test case for find_bucket_info + + Find a bucket # noqa: E501 + """ + pass + + def test_get_bucket_info(self): + """Test case for get_bucket_info + + Get a bucket # noqa: E501 + """ + pass + + def test_list_buckets(self): + """Test case for list_buckets + + List all buckets # noqa: E501 + """ + pass + + def test_put_bucket_global_alias(self): + """Test case for put_bucket_global_alias + + Add a global alias # noqa: E501 + """ + pass + + def test_put_bucket_local_alias(self): + """Test case for put_bucket_local_alias + + Add a local alias # noqa: E501 + """ + pass + + def test_update_bucket(self): + """Test case for update_bucket + + Update a bucket # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_bucket_info.py b/python/test/test_bucket_info.py new file mode 100644 index 0000000..43e147c --- /dev/null +++ b/python/test/test_bucket_info.py @@ -0,0 +1,41 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas +from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig +from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo +globals()['BucketInfoQuotas'] = BucketInfoQuotas +globals()['BucketInfoWebsiteConfig'] = BucketInfoWebsiteConfig +globals()['BucketKeyInfo'] = BucketKeyInfo +from garage_admin_sdk.model.bucket_info import BucketInfo + + +class TestBucketInfo(unittest.TestCase): + """BucketInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBucketInfo(self): + """Test BucketInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = BucketInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_bucket_info_quotas.py b/python/test/test_bucket_info_quotas.py new file mode 100644 index 0000000..98abbb1 --- /dev/null +++ b/python/test/test_bucket_info_quotas.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas + + +class TestBucketInfoQuotas(unittest.TestCase): + """BucketInfoQuotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBucketInfoQuotas(self): + """Test BucketInfoQuotas""" + # FIXME: construct object with mandatory attributes with example values + # model = BucketInfoQuotas() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_bucket_info_website_config.py b/python/test/test_bucket_info_website_config.py new file mode 100644 index 0000000..e2a11a6 --- /dev/null +++ b/python/test/test_bucket_info_website_config.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig + + +class TestBucketInfoWebsiteConfig(unittest.TestCase): + """BucketInfoWebsiteConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBucketInfoWebsiteConfig(self): + """Test BucketInfoWebsiteConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = BucketInfoWebsiteConfig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_bucket_key_info.py b/python/test/test_bucket_key_info.py new file mode 100644 index 0000000..a55c019 --- /dev/null +++ b/python/test/test_bucket_key_info.py @@ -0,0 +1,37 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow +globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow +from garage_admin_sdk.model.bucket_key_info import BucketKeyInfo + + +class TestBucketKeyInfo(unittest.TestCase): + """BucketKeyInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBucketKeyInfo(self): + """Test BucketKeyInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = BucketKeyInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_create_bucket_request.py b/python/test/test_create_bucket_request.py new file mode 100644 index 0000000..1f8c127 --- /dev/null +++ b/python/test/test_create_bucket_request.py @@ -0,0 +1,37 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias +globals()['CreateBucketRequestLocalAlias'] = CreateBucketRequestLocalAlias +from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest + + +class TestCreateBucketRequest(unittest.TestCase): + """CreateBucketRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBucketRequest(self): + """Test CreateBucketRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = CreateBucketRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_create_bucket_request_local_alias.py b/python/test/test_create_bucket_request_local_alias.py new file mode 100644 index 0000000..c71a059 --- /dev/null +++ b/python/test/test_create_bucket_request_local_alias.py @@ -0,0 +1,37 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow +globals()['CreateBucketRequestLocalAliasAllow'] = CreateBucketRequestLocalAliasAllow +from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias + + +class TestCreateBucketRequestLocalAlias(unittest.TestCase): + """CreateBucketRequestLocalAlias unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBucketRequestLocalAlias(self): + """Test CreateBucketRequestLocalAlias""" + # FIXME: construct object with mandatory attributes with example values + # model = CreateBucketRequestLocalAlias() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_create_bucket_request_local_alias_allow.py b/python/test/test_create_bucket_request_local_alias_allow.py new file mode 100644 index 0000000..f262e24 --- /dev/null +++ b/python/test/test_create_bucket_request_local_alias_allow.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow + + +class TestCreateBucketRequestLocalAliasAllow(unittest.TestCase): + """CreateBucketRequestLocalAliasAllow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBucketRequestLocalAliasAllow(self): + """Test CreateBucketRequestLocalAliasAllow""" + # FIXME: construct object with mandatory attributes with example values + # model = CreateBucketRequestLocalAliasAllow() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_list_buckets200_response_inner.py b/python/test/test_list_buckets200_response_inner.py new file mode 100644 index 0000000..f0ff297 --- /dev/null +++ b/python/test/test_list_buckets200_response_inner.py @@ -0,0 +1,37 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner +globals()['ListBuckets200ResponseInnerLocalAliasesInner'] = ListBuckets200ResponseInnerLocalAliasesInner +from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner + + +class TestListBuckets200ResponseInner(unittest.TestCase): + """ListBuckets200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListBuckets200ResponseInner(self): + """Test ListBuckets200ResponseInner""" + # FIXME: construct object with mandatory attributes with example values + # model = ListBuckets200ResponseInner() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_list_buckets200_response_inner_local_aliases_inner.py b/python/test/test_list_buckets200_response_inner_local_aliases_inner.py new file mode 100644 index 0000000..112a52e --- /dev/null +++ b/python/test/test_list_buckets200_response_inner_local_aliases_inner.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner import ListBuckets200ResponseInnerLocalAliasesInner + + +class TestListBuckets200ResponseInnerLocalAliasesInner(unittest.TestCase): + """ListBuckets200ResponseInnerLocalAliasesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testListBuckets200ResponseInnerLocalAliasesInner(self): + """Test ListBuckets200ResponseInnerLocalAliasesInner""" + # FIXME: construct object with mandatory attributes with example values + # model = ListBuckets200ResponseInnerLocalAliasesInner() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_update_bucket_request.py b/python/test/test_update_bucket_request.py new file mode 100644 index 0000000..fae52ec --- /dev/null +++ b/python/test/test_update_bucket_request.py @@ -0,0 +1,39 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas +from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess +globals()['UpdateBucketRequestQuotas'] = UpdateBucketRequestQuotas +globals()['UpdateBucketRequestWebsiteAccess'] = UpdateBucketRequestWebsiteAccess +from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest + + +class TestUpdateBucketRequest(unittest.TestCase): + """UpdateBucketRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateBucketRequest(self): + """Test UpdateBucketRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdateBucketRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_update_bucket_request_quotas.py b/python/test/test_update_bucket_request_quotas.py new file mode 100644 index 0000000..7114bec --- /dev/null +++ b/python/test/test_update_bucket_request_quotas.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas + + +class TestUpdateBucketRequestQuotas(unittest.TestCase): + """UpdateBucketRequestQuotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateBucketRequestQuotas(self): + """Test UpdateBucketRequestQuotas""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdateBucketRequestQuotas() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_update_bucket_request_website_access.py b/python/test/test_update_bucket_request_website_access.py new file mode 100644 index 0000000..4b01874 --- /dev/null +++ b/python/test/test_update_bucket_request_website_access.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.8.0 + + Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501 + + The version of the OpenAPI document: v0.8.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess + + +class TestUpdateBucketRequestWebsiteAccess(unittest.TestCase): + """UpdateBucketRequestWebsiteAccess unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateBucketRequestWebsiteAccess(self): + """Test UpdateBucketRequestWebsiteAccess""" + # FIXME: construct object with mandatory attributes with example values + # model = UpdateBucketRequestWebsiteAccess() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()