Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GENERATOR_URL=https://repo1.maven.org/maven2/org/openapitools/openapi-generator-
GENERATOR_JAR=${DOWNLOAD_DIR}/openapi-generator-cli-${GENERATOR_VERSION}.jar

# hcloud-openapi version and URL
HCLOUD_OPENAPI_VERSION=ba7c999
HCLOUD_OPENAPI_VERSION=582d345

HCLOUD_OPENAPI_REPO_URL=https://github.com/MaximilianKoestler/hcloud-openapi.git
# select the download URL based on the version format (release, branch or commit)
Expand Down
8 changes: 5 additions & 3 deletions src/apis/actions_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 4b3f595
* The version of the OpenAPI document: b12c1e9-dirty
*
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -31,15 +31,17 @@ pub struct GetMultipleActionsParams {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetActionError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_multiple_actions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMultipleActionsError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

Expand Down
34 changes: 22 additions & 12 deletions src/apis/certificates_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 4b3f595
* The version of the OpenAPI document: b12c1e9-dirty
*
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -115,79 +115,89 @@ pub struct RetryIssuanceOrRenewalParams {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateCertificateError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`delete_certificate`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteCertificateError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_action_for_certificate`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetActionForCertificateError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_certificate`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetCertificateError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_certificate_action`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetCertificateActionError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_actions_for_certificate`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListActionsForCertificateError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_certificate_actions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListCertificateActionsError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_certificates`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListCertificatesError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`replace_certificate`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ReplaceCertificateError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`retry_issuance_or_renewal`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum RetryIssuanceOrRenewalError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

Expand Down Expand Up @@ -783,7 +793,7 @@ pub async fn replace_certificate(
}
}

/// Retry a failed Certificate issuance or renewal. Only applicable if the type of the Certificate is `managed` and the issuance or renewal status is `failed`. #### Call specific error codes | Code | Description | |---------------------------------------------------------|---------------------------------------------------------------------------| | `caa_record_does_not_allow_ca` | CAA record does not allow certificate authority | | `ca_dns_validation_failed` | Certificate Authority: DNS validation failed | | `ca_too_many_authorizations_failed_recently` | Certificate Authority: Too many authorizations failed recently | | `ca_too_many_certificates_issued_for_registered_domain` | Certificate Authority: Too many certificates issued for registered domain | | `ca_too_many_duplicate_certificates` | Certificate Authority: Too many duplicate certificates | | `could_not_verify_domain_delegated_to_zone` | Could not verify domain delegated to zone | | `dns_zone_not_found` | DNS zone not found | | `dns_zone_is_secondary_zone` | DNS zone is a secondary zone |
/// Retry a failed Certificate issuance or renewal. Only applicable if the type of the Certificate is `managed` and the issuance or renewal status is `failed`. #### Operation specific errors | Status | Code | Description | | --- | --- | --- | | | `caa_record_does_not_allow_ca` | CAA record does not allow certificate authority | | | `ca_dns_validation_failed` | Certificate Authority: DNS validation failed | | | `ca_too_many_authorizations_failed_recently` | Certificate Authority: Too many authorizations failed recently | | | `ca_too_many_certificates_issued_for_registered_domain` | Certificate Authority: Too many certificates issued for registered domain | | | `ca_too_many_duplicate_certificates` | Certificate Authority: Too many duplicate certificates | | | `could_not_verify_domain_delegated_to_zone` | Could not verify domain delegated to zone | | | `dns_zone_not_found` | DNS zone not found | | | `dns_zone_is_secondary_zone` | DNS zone is a secondary zone |
pub async fn retry_issuance_or_renewal(
configuration: &configuration::Configuration,
params: RetryIssuanceOrRenewalParams,
Expand Down
2 changes: 1 addition & 1 deletion src/apis/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 4b3f595
* The version of the OpenAPI document: b12c1e9-dirty
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
8 changes: 5 additions & 3 deletions src/apis/datacenters_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 4b3f595
* The version of the OpenAPI document: b12c1e9-dirty
*
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -37,15 +37,17 @@ pub struct ListDataCentersParams {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDataCenterError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_data_centers`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListDataCentersError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

Expand Down
46 changes: 29 additions & 17 deletions src/apis/firewalls_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 4b3f595
* The version of the OpenAPI document: b12c1e9-dirty
*
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -130,99 +130,111 @@ pub struct SetRulesParams {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ApplyToResourcesError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`create_firewall`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateFirewallError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`delete_firewall`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteFirewallError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_action_for_firewall`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetActionForFirewallError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_firewall`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetFirewallError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`get_firewall_action`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetFirewallActionError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_actions_for_firewall`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListActionsForFirewallError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_firewall_actions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListFirewallActionsError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`list_firewalls`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListFirewallsError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`remove_from_resources`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum RemoveFromResourcesError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`replace_firewall`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ReplaceFirewallError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`set_rules`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SetRulesError {
DefaultResponse(models::ErrorResponse),
Status4xx(models::ErrorResponse),
Status5xx(models::ErrorResponse),
UnknownValue(serde_json::Value),
}

/// Applies a Firewall to multiple resources. Supported resources: - Servers (with a public network interface) - Label Selectors A Server can be applied to [a maximum of 5 Firewalls](https://docs.hetzner.com/cloud/firewalls/overview#limits). This limit applies to Servers applied via a matching Label Selector as well. Updates to resources matching or no longer matching a Label Selector can take up to a few seconds to be processed. A Firewall is applied to a resource once the related Action with command `apply_firewall` successfully finished. #### Error Codes specific to this Call | Code | Description | |-------------------------------|-------------------------------------------------------------------------------------------------| | `firewall_already_applied` | Firewall is already applied to resource | | `incompatible_network_type` | The network type of the resource is not supported by Firewalls | | `firewall_resource_not_found` | The resource the Firewall should be applied to was not found | | `private_net_only_server` | The Server the Firewall should be applied to has no public interface |
/// Applies a Firewall to multiple resources. Supported resources: - Servers (with a public network interface) - Label Selectors A Server can be applied to [a maximum of 5 Firewalls](https://docs.hetzner.com/cloud/firewalls/overview#limits). This limit applies to Servers applied via a matching Label Selector as well. Updates to resources matching or no longer matching a Label Selector can take up to a few seconds to be processed. A Firewall is applied to a resource once the related Action with command `apply_firewall` successfully finished. #### Operation specific errors | Status | Code | Description | | --- | --- | --- | | `404` | `firewall_resource_not_found` | The resource the Firewall should be applied to was not found | | `422` | `firewall_already_applied` | Firewall is already applied to resource | | `422` | `incompatible_network_type` | The network type of the resource is not supported by Firewalls | | `422` | `private_net_only_server` | The Server the Firewall should be applied to has no public interface |
pub async fn apply_to_resources(
configuration: &configuration::Configuration,
params: ApplyToResourcesParams,
Expand Down Expand Up @@ -273,7 +285,7 @@ pub async fn apply_to_resources(
}
}

/// Create a Firewall. #### Operation specific errors | Status Code | Error Code | Description | | --- | --- | --- | | `422` | `server_already_added` | The Server was applied more than once. | | `422` | `incompatible_network_type` | The resources network type is not supported by Firewalls. | | `422` | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found. |
/// Create a Firewall. #### Operation specific errors | Status | Code | Description | | --- | --- | --- | | `422` | `server_already_added` | The Server was applied more than once. | | `422` | `incompatible_network_type` | The resources network type is not supported by Firewalls. | | `422` | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found. |
pub async fn create_firewall(
configuration: &configuration::Configuration,
params: CreateFirewallParams,
Expand Down Expand Up @@ -319,7 +331,7 @@ pub async fn create_firewall(
}
}

/// Deletes the Firewall. #### Error Codes specific to this Call | Code | Description | |--------------------- |----------------------------------------------------| | `resource_in_use` | Firewall still applied to a resource |
/// Deletes the Firewall. #### Operation specific errors | Status | Code | Description | | --- | --- | --- | | `422` | `resource_in_use` | Firewall still applied to a resource |
pub async fn delete_firewall(
configuration: &configuration::Configuration,
params: DeleteFirewallParams,
Expand Down Expand Up @@ -798,7 +810,7 @@ pub async fn list_firewalls(
}
}

/// Removes a Firewall from multiple resources. Supported resources: - Servers (with a public network interface) A Firewall is removed from a resource once the related Action with command `remove_firewall` successfully finished. #### Error Codes specific to this Call | Code | Description | |---------------------------------------|---------------------------------------------------------------------------------------------------------| | `firewall_resource_not_found` | The resource the Firewall should be removed from was not found | | `firewall_managed_by_label_selector` | Firewall is applied via a Label Selector and cannot be removed manually |
/// Removes a Firewall from multiple resources. Supported resources: - Servers (with a public network interface) A Firewall is removed from a resource once the related Action with command `remove_firewall` successfully finished. #### Operation specific errors | Status | Code | Description | | --- | --- | --- | | `404` | `firewall_resource_not_found` | The resource the Firewall should be removed from was not found | | `422` | `firewall_managed_by_label_selector` | Firewall is applied via a Label Selector and cannot be removed manually |
pub async fn remove_from_resources(
configuration: &configuration::Configuration,
params: RemoveFromResourcesParams,
Expand Down
Loading