Skip to content

Commit

Permalink
Merge pull request #78 from aziontech/generated-sdk
Browse files Browse the repository at this point in the history
Auto-generated SDK
  • Loading branch information
PatrickMenoti authored Dec 22, 2023
2 parents 702c020 + cc5ee12 commit f89cdc8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions storage/docs/StorageApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Name | Type | Description | Required | Notes

## storage_api_buckets_objects_create

> crate::models::SuccessObjectOperation storage_api_buckets_objects_create(bucket_name, object_key, body)
> crate::models::SuccessObjectOperation storage_api_buckets_objects_create(bucket_name, object_key, content_type, body)
Create new object key

Create a new object key in the bucket.
Expand All @@ -121,6 +121,7 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**bucket_name** | **String** | | [required] |
**object_key** | **String** | | [required] |
**content_type** | Option<**String**> | The content type of the file (Example: text/plain). | |
**body** | Option<**std::path::PathBuf**> | | |

### Return type
Expand Down Expand Up @@ -235,7 +236,7 @@ Name | Type | Description | Required | Notes

## storage_api_buckets_objects_update

> crate::models::SuccessObjectOperation storage_api_buckets_objects_update(bucket_name, object_key, body)
> crate::models::SuccessObjectOperation storage_api_buckets_objects_update(bucket_name, object_key, content_type, body)
Update the object key

Update the object key from bucket.
Expand All @@ -247,6 +248,7 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**bucket_name** | **String** | | [required] |
**object_key** | **String** | | [required] |
**content_type** | Option<**String**> | The content type of the file (Example: text/plain). | |
**body** | Option<**std::path::PathBuf**> | | |

### Return type
Expand Down
10 changes: 8 additions & 2 deletions storage/src/apis/storage_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub async fn storage_api_buckets_list(configuration: &configuration::Configurati
}

/// Create a new object key in the bucket.
pub async fn storage_api_buckets_objects_create(configuration: &configuration::Configuration, bucket_name: &str, object_key: &str, body: Option<std::path::PathBuf>) -> Result<crate::models::SuccessObjectOperation, Error<StorageApiBucketsObjectsCreateError>> {
pub async fn storage_api_buckets_objects_create(configuration: &configuration::Configuration, bucket_name: &str, object_key: &str, content_type: Option<&str>, body: Option<std::path::PathBuf>) -> Result<crate::models::SuccessObjectOperation, Error<StorageApiBucketsObjectsCreateError>> {
let local_var_configuration = configuration;

let local_var_client = &local_var_configuration.client;
Expand All @@ -260,6 +260,9 @@ pub async fn storage_api_buckets_objects_create(configuration: &configuration::C
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = content_type {
local_var_req_builder = local_var_req_builder.header("Content-Type", local_var_param_value.to_string());
}
if let Some(ref local_var_apikey) = local_var_configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Expand Down Expand Up @@ -400,7 +403,7 @@ pub async fn storage_api_buckets_objects_retrieve(configuration: &configuration:
}

/// Update the object key from bucket.
pub async fn storage_api_buckets_objects_update(configuration: &configuration::Configuration, bucket_name: &str, object_key: &str, body: Option<std::path::PathBuf>) -> Result<crate::models::SuccessObjectOperation, Error<StorageApiBucketsObjectsUpdateError>> {
pub async fn storage_api_buckets_objects_update(configuration: &configuration::Configuration, bucket_name: &str, object_key: &str, content_type: Option<&str>, body: Option<std::path::PathBuf>) -> Result<crate::models::SuccessObjectOperation, Error<StorageApiBucketsObjectsUpdateError>> {
let local_var_configuration = configuration;

let local_var_client = &local_var_configuration.client;
Expand All @@ -411,6 +414,9 @@ pub async fn storage_api_buckets_objects_update(configuration: &configuration::C
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(local_var_param_value) = content_type {
local_var_req_builder = local_var_req_builder.header("Content-Type", local_var_param_value.to_string());
}
if let Some(ref local_var_apikey) = local_var_configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Expand Down

0 comments on commit f89cdc8

Please sign in to comment.