Skip to content

Commit

Permalink
Use hcloud-openapi 0.22.0
Browse files Browse the repository at this point in the history
Changes in the new version of `hcloud-openapi`:
- *Schema* (**BREAKING**): Remove deprecated fields `traffic` and `included_traffic`
- *Schema* (**BREAKING**): Rework load balancer components
- *Doc*: Include code examples from upstream (`x-codeSamples`)
- *Doc*: Update documentation from upstream
  • Loading branch information
HenningHolmDE committed Nov 10, 2024
1 parent 6205c8f commit ef49893
Show file tree
Hide file tree
Showing 291 changed files with 552 additions and 649 deletions.
13 changes: 5 additions & 8 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ src/models/add_server_to_placement_group_request.rs
src/models/add_server_to_placement_group_response.rs
src/models/add_service_response.rs
src/models/add_subnet_to_network_response.rs
src/models/add_target_request.rs
src/models/add_target_request_server.rs
src/models/add_target_response.rs
src/models/apply_to_resources_request.rs
src/models/apply_to_resources_response.rs
Expand Down Expand Up @@ -59,15 +57,13 @@ src/models/change_load_balancer_protection_request.rs
src/models/change_load_balancer_protection_response.rs
src/models/change_network_protection_request.rs
src/models/change_network_protection_response.rs
src/models/change_primary_ip_protection_request.rs
src/models/change_primary_ip_protection_response.rs
src/models/change_reverse_dns_entry_for_primary_ip_request.rs
src/models/change_reverse_dns_entry_for_primary_ip_response.rs
src/models/change_reverse_dns_entry_for_this_load_balancer_request.rs
src/models/change_reverse_dns_entry_for_this_load_balancer_response.rs
src/models/change_reverse_dns_entry_for_this_server_request.rs
src/models/change_reverse_dns_entry_for_this_server_response.rs
src/models/change_reverse_dns_records_for_floating_ip_response.rs
src/models/change_reverse_dns_records_for_primary_ip_response.rs
src/models/change_server_protection_request.rs
src/models/change_server_protection_response.rs
src/models/change_type_of_load_balancer_request.rs
Expand Down Expand Up @@ -157,7 +153,6 @@ src/models/get_server_response.rs
src/models/get_server_type_response.rs
src/models/get_ssh_key_response.rs
src/models/get_volume_response.rs
src/models/health_status.rs
src/models/http.rs
src/models/image.rs
src/models/image_optional.rs
Expand Down Expand Up @@ -203,14 +198,18 @@ src/models/list_servers_response.rs
src/models/list_ssh_keys_response.rs
src/models/list_volumes_response.rs
src/models/load_balancer.rs
src/models/load_balancer_add_target.rs
src/models/load_balancer_algorithm.rs
src/models/load_balancer_private_net.rs
src/models/load_balancer_public_net.rs
src/models/load_balancer_public_net_ipv4.rs
src/models/load_balancer_public_net_ipv6.rs
src/models/load_balancer_selected_target.rs
src/models/load_balancer_service.rs
src/models/load_balancer_service_health_check.rs
src/models/load_balancer_service_health_check_http.rs
src/models/load_balancer_target.rs
src/models/load_balancer_target_health_status.rs
src/models/load_balancer_target_ip.rs
src/models/load_balancer_type.rs
src/models/location.rs
Expand Down Expand Up @@ -271,7 +270,6 @@ src/models/retry_issuance_or_renewal_response.rs
src/models/route.rs
src/models/rule.rs
src/models/rule_response.rs
src/models/selected_target.rs
src/models/server.rs
src/models/server_private_net.rs
src/models/server_protection.rs
Expand All @@ -285,7 +283,6 @@ src/models/soft_reboot_server_response.rs
src/models/ssh_key.rs
src/models/subnet.rs
src/models/subnet_with_gateway.rs
src/models/target.rs
src/models/unassign_floating_ip_response.rs
src/models/unassign_primary_ip_from_resource_response.rs
src/models/update_load_balancer_service.rs
Expand Down
2 changes: 1 addition & 1 deletion scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ 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=0.21.0
HCLOUD_OPENAPI_VERSION=0.22.0
HCLOUD_OPENAPI_URL=https://github.com/MaximilianKoestler/hcloud-openapi/releases/download/v${HCLOUD_OPENAPI_VERSION}/hcloud.json
HCLOUD_OPENAPI_JSON=${DOWNLOAD_DIR}/hcloud_${HCLOUD_OPENAPI_VERSION}.json
2 changes: 1 addition & 1 deletion 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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion 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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion 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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
26 changes: 13 additions & 13 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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -210,7 +210,7 @@ pub enum SetRulesError {
UnknownValue(serde_json::Value),
}

/// Applies one Firewall to multiple resources. Currently servers (public network interface) and label selectors are supported. #### Call specific error codes | Code | Description | |-------------------------------|---------------------------------------------------------------| | `firewall_already_applied` | Firewall was already applied on resource | | `incompatible_network_type` | The Network type is incompatible for the given resource | | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found |
/// Applies a [Firewall](#firewalls) to multiple resources. Supported resources: - [Servers](#servers) (with a public network interface) - [Label Selectors](#label-selector) A server can be applied to [a maximum of 5 Firewalls](https://docs.hetzner.com/cloud/firewalls/overview#limits). #### Error Codes specific to this Call | Code | Description | |-------------------------------|-------------------------------------------------------------------------------------------------| | `firewall_already_applied` | [Firewall](#firewalls) is already applied to resource | | `incompatible_network_type` | The network type of the resource is not supported by [Firewalls](#firewalls) | | `firewall_resource_not_found` | The resource the [Firewall](#firewalls) should be applied to was not found | | `private_net_only_server` | The [Server](#servers) the [Firewall](#firewalls) should be applied to has no public interface |
pub async fn apply_to_resources(
configuration: &configuration::Configuration,
params: ApplyToResourcesParams,
Expand Down Expand Up @@ -260,7 +260,7 @@ pub async fn apply_to_resources(
}
}

/// Creates a new Firewall. #### Call specific error codes | Code | Description | |------------------------------ |-------------------------------------------------------------- | | `server_already_added` | Server added more than one time to resource | | `incompatible_network_type` | The Network type is incompatible for the given resource | | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found |
/// Create a [Firewall](#firewalls). #### Error Codes specific to this Call | Code | Description | |------------------------------ |-----------------------------------------------------------------------------| | `server_already_added` | [Server](#servers) applied more than once | | `incompatible_network_type` | The resources network type is not supported by [Firewalls](#firewalls) | | `firewall_resource_not_found` | The resource the [Firewall](#firewalls) should be attached to was not found |
pub async fn create_firewall(
configuration: &configuration::Configuration,
params: CreateFirewallParams,
Expand Down Expand Up @@ -305,7 +305,7 @@ pub async fn create_firewall(
}
}

/// Deletes a Firewall. #### Call specific error codes | Code | Description | |--------------------- |-------------------------------------------| | `resource_in_use` | Firewall must not be in use to be deleted |
/// Deletes the [Firewall](#firewalls). #### Error Codes specific to this Call | Code | Description | |--------------------- |----------------------------------------------------| | `resource_in_use` | [Firewall](#firewalls) still applied to a resource |
pub async fn delete_firewall(
configuration: &configuration::Configuration,
params: DeleteFirewallParams,
Expand Down Expand Up @@ -353,7 +353,7 @@ pub async fn delete_firewall(
}
}

/// Returns a specific Action for a Firewall.
/// Returns a specific [Action](#actions) for a [Firewall](#firewalls).
pub async fn get_action_for_firewall(
configuration: &configuration::Configuration,
params: GetActionForFirewallParams,
Expand Down Expand Up @@ -403,7 +403,7 @@ pub async fn get_action_for_firewall(
}
}

/// Gets a specific Firewall object.
/// Returns a single [Firewall](#firewalls).
pub async fn get_firewall(
configuration: &configuration::Configuration,
params: GetFirewallParams,
Expand Down Expand Up @@ -451,7 +451,7 @@ pub async fn get_firewall(
}
}

/// Returns a specific Action object.
/// Returns the specific [Action](#actions).
pub async fn get_firewall_action(
configuration: &configuration::Configuration,
params: GetFirewallActionParams,
Expand Down Expand Up @@ -499,7 +499,7 @@ pub async fn get_firewall_action(
}
}

/// Returns all Action objects for a Firewall. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter.
/// Returns all [Actions](#actions) for the [Firewall](#firewalls). Use the provided URI parameters to modify the result.
pub async fn list_actions_for_firewall(
configuration: &configuration::Configuration,
params: ListActionsForFirewallParams,
Expand Down Expand Up @@ -567,7 +567,7 @@ pub async fn list_actions_for_firewall(
}
}

/// Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter.
/// Returns all [Actions](#actions) for [Firewalls](#firewalls). Use the provided URI parameters to modify the result.
pub async fn list_firewall_actions(
configuration: &configuration::Configuration,
params: ListFirewallActionsParams,
Expand Down Expand Up @@ -634,7 +634,7 @@ pub async fn list_firewall_actions(
}
}

/// Returns all Firewall objects.
/// Returns all [Firewalls](#firewalls). Use the provided URI parameters to modify the result.
pub async fn list_firewalls(
configuration: &configuration::Configuration,
params: ListFirewallsParams,
Expand Down Expand Up @@ -702,7 +702,7 @@ pub async fn list_firewalls(
}
}

/// Removes one Firewall from multiple resources. Currently only Servers (and their public network interfaces) are supported. #### Call specific error codes | Code | Description | |---------------------------------------|------------------------------------------------------------------------| | `firewall_already_removed` | Firewall was already removed from the resource | | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found | | `firewall_managed_by_label_selector` | Firewall was applied via label selector and cannot be removed manually |
/// Removes a [Firewall](#firewalls) from multiple resources. Supported resources: - [Servers](#servers) (with a public network interface) #### Error Codes specific to this Call | Code | Description | |---------------------------------------|---------------------------------------------------------------------------------------------------------| | `firewall_already_removed` | [Firewall](#firewalls) is already removed from the resource | | `firewall_resource_not_found` | The resource the [Firewall](#firewalls) should be removed from was not found | | `firewall_managed_by_label_selector` | [Firewall](#firewall) is applied via a [Label Selector](#label-selector) and cannot be removed manually |
pub async fn remove_from_resources(
configuration: &configuration::Configuration,
params: RemoveFromResourcesParams,
Expand Down Expand Up @@ -752,7 +752,7 @@ pub async fn remove_from_resources(
}
}

/// Updates the Firewall. Note that when updating labels, the Firewall's current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body. Note: if the Firewall object changes during the request, the response will be a “conflict” error.
/// Update a [Firewall](#firewalls). Provided [Labels](#labels) will overwritte the existing ones. In case of a parallel running change on the [Firewall](#firewalls) a `conflict` error will be returned.
pub async fn replace_firewall(
configuration: &configuration::Configuration,
params: ReplaceFirewallParams,
Expand Down Expand Up @@ -802,7 +802,7 @@ pub async fn replace_firewall(
}
}

/// Sets the rules of a Firewall. All existing rules will be overwritten. Pass an empty `rules` array to remove all rules. The maximum amount of rules that can be defined is 50. #### Call specific error codes | Code | Description | |-------------------------------|---------------------------------------------------------------| | `firewall_resource_not_found` | The resource the Firewall should be attached to was not found |
/// Set the rules of a [Firewall](#firewalls). Overwrites the existing rules with the given ones. Pass an empty array to remove all rules. Rules are limited to 50 entries per [Firewall](#firewalls) and [500 effective rules](https://docs.hetzner.com/cloud/firewalls/overview#limits).
pub async fn set_rules(
configuration: &configuration::Configuration,
params: SetRulesParams,
Expand Down
4 changes: 2 additions & 2 deletions src/apis/floating_ips_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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -34,7 +34,7 @@ pub struct ChangeFloatingIpProtectionParams {
pub struct ChangeReverseDnsRecordsForFloatingIpParams {
/// ID of the Floating IP.
pub id: i64,
/// The `ip` attributes specifies for which IP address the record is set. For IPv4 addresses this must be the exact address of the [Floating IP](#floating-ips). For IPv6 addresses this must be a single address within the `/64` subnetwork of the [Floating IP](#floating-ips). The `dns_ptr` attribute specifies the hostname used for the IP address. For IPv6 [Floating IPs](#floating-ips) up to 100 entries can be created.
/// The `ip` attributes specifies for which IP address the record is set. For IPv4 addresses this must be the exact address of the [Floating IP](#floating-ips). For IPv6 addresses this must be a single address within the `/64` subnet of the [Floating IP](#floating-ips). The `dns_ptr` attribute specifies the hostname used for the IP address. For IPv6 [Floating IPs](#floating-ips) up to 100 entries can be created.
pub body: Option<models::DnsPtr>,
}

Expand Down
2 changes: 1 addition & 1 deletion src/apis/images_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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion src/apis/isos_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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion src/apis/load_balancer_types_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: 0.21.0
* The version of the OpenAPI document: 0.22.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Loading

0 comments on commit ef49893

Please sign in to comment.