├── .github └── workflows │ ├── build_and_test.yml │ └── release.yml ├── .gitignore ├── .openapi-generator-ignore ├── .openapi-generator ├── FILES └── VERSION ├── COPYRIGHT ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── README.tpl ├── examples ├── create_delete_servers.rs ├── find_cheapest_server_type.rs ├── list_images.rs ├── list_isos.rs └── list_servers.rs ├── generator_files └── .gitignore ├── openapi-generator.yaml ├── scripts ├── config.sh ├── download_openapi_spec.sh ├── extract_generator_templates.sh ├── generate_api_code.sh ├── generate_templates_diff.sh └── remove_all_comments.sh ├── src ├── apis │ ├── actions_api.rs │ ├── certificates_api.rs │ ├── configuration.rs │ ├── datacenters_api.rs │ ├── firewalls_api.rs │ ├── floating_ips_api.rs │ ├── images_api.rs │ ├── isos_api.rs │ ├── load_balancer_types_api.rs │ ├── load_balancers_api.rs │ ├── locations_api.rs │ ├── mod.rs │ ├── networks_api.rs │ ├── placement_groups_api.rs │ ├── pricing_api.rs │ ├── primary_ips_api.rs │ ├── server_types_api.rs │ ├── servers_api.rs │ ├── ssh_keys_api.rs │ └── volumes_api.rs ├── lib.rs └── models │ ├── action.rs │ ├── add_route_to_network_response.rs │ ├── add_server_to_placement_group_request.rs │ ├── add_server_to_placement_group_response.rs │ ├── add_service_response.rs │ ├── add_subnet_to_network_response.rs │ ├── add_target_response.rs │ ├── apply_to_resources_request.rs │ ├── apply_to_resources_response.rs │ ├── architecture.rs │ ├── assign_floating_ip_to_server_request.rs │ ├── assign_floating_ip_to_server_response.rs │ ├── assign_primary_ip_to_resource_request.rs │ ├── assign_primary_ip_to_resource_response.rs │ ├── attach_iso_to_server_request.rs │ ├── attach_iso_to_server_response.rs │ ├── attach_load_balancer_to_network_request.rs │ ├── attach_load_balancer_to_network_response.rs │ ├── attach_server_to_network_request.rs │ ├── attach_server_to_network_response.rs │ ├── attach_volume_to_server_request.rs │ ├── attach_volume_to_server_response.rs │ ├── certificate.rs │ ├── certificate_status.rs │ ├── certificate_status_error.rs │ ├── change_algorithm_response.rs │ ├── change_alias_ips_of_network_request.rs │ ├── change_alias_ips_of_network_response.rs │ ├── change_floating_ip_protection_response.rs │ ├── change_image_protection_request.rs │ ├── change_image_protection_response.rs │ ├── change_ip_range_of_network_request.rs │ ├── change_ip_range_of_network_response.rs │ ├── change_load_balancer_protection_request.rs │ ├── change_load_balancer_protection_response.rs │ ├── change_network_protection_request.rs │ ├── change_network_protection_response.rs │ ├── change_primary_ip_protection_response.rs │ ├── change_reverse_dns_entry_for_this_load_balancer_request.rs │ ├── change_reverse_dns_entry_for_this_load_balancer_response.rs │ ├── change_reverse_dns_entry_for_this_server_request.rs │ ├── change_reverse_dns_entry_for_this_server_response.rs │ ├── change_reverse_dns_records_for_floating_ip_response.rs │ ├── change_reverse_dns_records_for_primary_ip_response.rs │ ├── change_server_protection_request.rs │ ├── change_server_protection_response.rs │ ├── change_type_of_load_balancer_request.rs │ ├── change_type_of_load_balancer_response.rs │ ├── change_type_of_server_request.rs │ ├── change_type_of_server_response.rs │ ├── change_volume_protection_request.rs │ ├── change_volume_protection_response.rs │ ├── create_certificate_request.rs │ ├── create_certificate_response.rs │ ├── create_firewall_request.rs │ ├── create_firewall_response.rs │ ├── create_floating_ip_request.rs │ ├── create_floating_ip_response.rs │ ├── create_image_from_server_request.rs │ ├── create_image_from_server_response.rs │ ├── create_load_balancer_request.rs │ ├── create_load_balancer_response.rs │ ├── create_network_request.rs │ ├── create_network_response.rs │ ├── create_placementgroup_request.rs │ ├── create_placementgroup_response.rs │ ├── create_primary_ip_request.rs │ ├── create_primary_ip_response.rs │ ├── create_server_request.rs │ ├── create_server_request_firewalls.rs │ ├── create_server_request_public_net.rs │ ├── create_server_response.rs │ ├── create_ssh_key_request.rs │ ├── create_ssh_key_response.rs │ ├── create_volume_request.rs │ ├── create_volume_response.rs │ ├── created_from.rs │ ├── datacenter.rs │ ├── datacenter_server_types.rs │ ├── delete_route_from_network_response.rs │ ├── delete_server_response.rs │ ├── delete_service_request.rs │ ├── delete_service_response.rs │ ├── delete_subnet_from_network_request.rs │ ├── delete_subnet_from_network_response.rs │ ├── deprecation_info.rs │ ├── detach_iso_from_server_response.rs │ ├── detach_load_balancer_from_network_request.rs │ ├── detach_load_balancer_from_network_response.rs │ ├── detach_server_from_network_request.rs │ ├── detach_server_from_network_response.rs │ ├── detach_volume_response.rs │ ├── disable_backups_for_server_response.rs │ ├── disable_public_interface_of_load_balancer_response.rs │ ├── disable_rescue_mode_for_server_response.rs │ ├── dns_ptr.rs │ ├── enable_and_configure_backups_for_server_response.rs │ ├── enable_public_interface_of_load_balancer_response.rs │ ├── enable_rescue_mode_for_server_request.rs │ ├── enable_rescue_mode_for_server_response.rs │ ├── error.rs │ ├── firewall.rs │ ├── firewall_resource.rs │ ├── firewall_resource_id.rs │ ├── firewall_resource_id_applied_to_resources.rs │ ├── floating_ip.rs │ ├── get_action_for_certificate_response.rs │ ├── get_action_for_firewall_response.rs │ ├── get_action_for_floating_ip_response.rs │ ├── get_action_for_image_response.rs │ ├── get_action_for_load_balancer_response.rs │ ├── get_action_for_network_response.rs │ ├── get_action_for_server_response.rs │ ├── get_action_for_volume_response.rs │ ├── get_action_response.rs │ ├── get_certificate_response.rs │ ├── get_datacenter_response.rs │ ├── get_firewall_response.rs │ ├── get_floating_ip_response.rs │ ├── get_image_response.rs │ ├── get_iso_response.rs │ ├── get_load_balancer_response.rs │ ├── get_load_balancer_type_response.rs │ ├── get_location_response.rs │ ├── get_metrics_for_loadbalancer_response.rs │ ├── get_metrics_for_server_response.rs │ ├── get_network_response.rs │ ├── get_placementgroup_response.rs │ ├── get_primary_ip_response.rs │ ├── get_server_response.rs │ ├── get_server_type_response.rs │ ├── get_ssh_key_response.rs │ ├── get_volume_response.rs │ ├── http.rs │ ├── image.rs │ ├── ip_type.rs │ ├── ipv4.rs │ ├── ipv6.rs │ ├── iso.rs │ ├── label_selector.rs │ ├── list_actions_for_certificate_response.rs │ ├── list_actions_for_firewall_response.rs │ ├── list_actions_for_floating_ip_response.rs │ ├── list_actions_for_image_response.rs │ ├── list_actions_for_load_balancer_response.rs │ ├── list_actions_for_network_response.rs │ ├── list_actions_for_server_response.rs │ ├── list_actions_for_volume_response.rs │ ├── list_actions_response.rs │ ├── list_certificates_response.rs │ ├── list_datacenters_response.rs │ ├── list_firewalls_response.rs │ ├── list_floating_ips_response.rs │ ├── list_images_response.rs │ ├── list_isos_response.rs │ ├── list_load_balancer_types_response.rs │ ├── list_load_balancers_response.rs │ ├── list_locations_response.rs │ ├── list_networks_response.rs │ ├── list_placementgroups_response.rs │ ├── list_prices_response.rs │ ├── list_prices_response_pricing.rs │ ├── list_prices_response_pricing_floating_ip.rs │ ├── list_prices_response_pricing_floating_ips.rs │ ├── list_prices_response_pricing_image.rs │ ├── list_prices_response_pricing_load_balancer_types.rs │ ├── list_prices_response_pricing_primary_ips.rs │ ├── list_prices_response_pricing_server_backup.rs │ ├── list_prices_response_pricing_server_types.rs │ ├── list_prices_response_pricing_volume.rs │ ├── list_primary_ips_response.rs │ ├── list_server_types_response.rs │ ├── list_servers_response.rs │ ├── list_ssh_keys_response.rs │ ├── list_volumes_response.rs │ ├── load_balancer.rs │ ├── load_balancer_add_target.rs │ ├── load_balancer_algorithm.rs │ ├── load_balancer_private_net.rs │ ├── load_balancer_public_net.rs │ ├── load_balancer_public_net_ipv4.rs │ ├── load_balancer_public_net_ipv6.rs │ ├── load_balancer_selected_target.rs │ ├── load_balancer_service.rs │ ├── load_balancer_service_health_check.rs │ ├── load_balancer_service_health_check_http.rs │ ├── load_balancer_target.rs │ ├── load_balancer_target_health_status.rs │ ├── load_balancer_target_ip.rs │ ├── load_balancer_type.rs │ ├── location.rs │ ├── meta.rs │ ├── metrics.rs │ ├── metrics_time_series.rs │ ├── metrics_time_series_value.rs │ ├── mod.rs │ ├── network.rs │ ├── pagination.rs │ ├── placement_group.rs │ ├── power_off_server_response.rs │ ├── power_on_server_response.rs │ ├── price.rs │ ├── price_per_time.rs │ ├── price_per_time_monthly.rs │ ├── price_per_time_without_traffic.rs │ ├── primary_ip.rs │ ├── protection.rs │ ├── rebuild_server_from_image_request.rs │ ├── rebuild_server_from_image_response.rs │ ├── remove_from_placement_group_response.rs │ ├── remove_from_resources_request.rs │ ├── remove_from_resources_response.rs │ ├── remove_target_request.rs │ ├── remove_target_response.rs │ ├── replace_certificate_request.rs │ ├── replace_certificate_response.rs │ ├── replace_firewall_request.rs │ ├── replace_firewall_response.rs │ ├── replace_floating_ip_request.rs │ ├── replace_floating_ip_response.rs │ ├── replace_image_request.rs │ ├── replace_image_response.rs │ ├── replace_load_balancer_request.rs │ ├── replace_load_balancer_response.rs │ ├── replace_network_request.rs │ ├── replace_network_response.rs │ ├── replace_placementgroup_request.rs │ ├── replace_placementgroup_response.rs │ ├── replace_primary_ip_request.rs │ ├── replace_primary_ip_response.rs │ ├── replace_server_request.rs │ ├── replace_server_response.rs │ ├── replace_ssh_key_request.rs │ ├── replace_ssh_key_response.rs │ ├── replace_volume_request.rs │ ├── replace_volume_response.rs │ ├── request_console_for_server_response.rs │ ├── reset_root_password_of_server_response.rs │ ├── reset_server_response.rs │ ├── resize_volume_request.rs │ ├── resize_volume_response.rs │ ├── resource.rs │ ├── resource_id.rs │ ├── retry_issuance_or_renewal_response.rs │ ├── route.rs │ ├── rule.rs │ ├── rule_response.rs │ ├── server.rs │ ├── server_private_net.rs │ ├── server_protection.rs │ ├── server_public_net.rs │ ├── server_public_net_firewall.rs │ ├── server_type.rs │ ├── set_rules_request.rs │ ├── set_rules_response.rs │ ├── shutdown_server_response.rs │ ├── soft_reboot_server_response.rs │ ├── ssh_key.rs │ ├── subnet.rs │ ├── subnet_with_gateway.rs │ ├── unassign_floating_ip_response.rs │ ├── unassign_primary_ip_from_resource_response.rs │ ├── update_load_balancer_service.rs │ ├── update_load_balancer_service_health_check.rs │ ├── update_load_balancer_service_health_check_http.rs │ ├── update_service_response.rs │ └── volume.rs └── templates ├── model.mustache ├── reqwest └── api.mustache └── templates.diff /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 6 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 7 | Cargo.lock 8 | 9 | # These are backup files generated by rustfmt 10 | **/*.rs.bk 11 | 12 | # Extracted OpenAPI Generator templates 13 | /templates_orig/ 14 | -------------------------------------------------------------------------------- /.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Use this file to prevent files from being overwritten by the generator. 3 | 4 | .gitignore 5 | .travis.yml 6 | Cargo.toml 7 | git_push.sh 8 | README.md 9 | src/lib.rs 10 | -------------------------------------------------------------------------------- /.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.7.0 2 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2020 Henning Holm 2 | 3 | Licensed under the Apache License, Version 2.0 or the MIT license 5 | , at your 6 | option. All files in the project carrying such notice may not be 7 | copied, modified, or distributed except according to those terms. 8 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Henning Holm 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.tpl: -------------------------------------------------------------------------------- 1 | # hcloud for Rust 2 | 3 | [![Crates.io](https://img.shields.io/crates/v/hcloud.svg)](https://crates.io/crates/hcloud) 4 | [![Documentation](https://docs.rs/hcloud/badge.svg)](https://docs.rs/hcloud/) 5 | ![Build and test](https://github.com/HenningHolmDE/hcloud-rust/workflows/Build%20and%20test/badge.svg) 6 | 7 | {{readme}} 8 | 9 | ## License 10 | 11 | Licensed under either of 12 | 13 | * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0) 14 | * MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT) 15 | 16 | at your option. 17 | 18 | ### Contribution 19 | 20 | Unless you explicitly state otherwise, any contribution intentionally 21 | submitted for inclusion in the work by you, as defined in the Apache-2.0 22 | license, shall be dual licensed as above, without any additional terms or 23 | conditions. 24 | -------------------------------------------------------------------------------- /examples/list_servers.rs: -------------------------------------------------------------------------------- 1 | use hcloud::apis::configuration::Configuration; 2 | use hcloud::apis::servers_api; 3 | use std::env; 4 | 5 | #[tokio::main] 6 | async fn main() -> Result<(), String> { 7 | // use API token from command line 8 | let api_token = env::args() 9 | .nth(1) 10 | .ok_or("Please provide API token as command line parameter.")?; 11 | 12 | // set up basic configuration using provided API token 13 | let mut configuration = Configuration::new(); 14 | configuration.bearer_access_token = Some(api_token); 15 | 16 | // get list of all existing servers from servers API 17 | // Note: This only requests the first page (max 25) of servers, 18 | // see `list_isos.rs` for an example of using pagination. 19 | let servers = servers_api::list_servers(&configuration, Default::default()) 20 | .await 21 | .map_err(|err| format!("API call to list_servers failed: {:?}", err))? 22 | .servers; 23 | 24 | println!("Found {} server(s), dumping server data:", servers.len()); 25 | for server in servers { 26 | println!("{:?}", server); 27 | } 28 | 29 | Ok(()) 30 | } 31 | -------------------------------------------------------------------------------- /generator_files/.gitignore: -------------------------------------------------------------------------------- 1 | # downloaded OpenAPI spec and OpenAPI generator 2 | * 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /openapi-generator.yaml: -------------------------------------------------------------------------------- 1 | httpUserAgent: hcloud-rust/0.21.0 2 | library: reqwest 3 | supportAsync: true 4 | supportMultipleResponses: false 5 | useSingleRequestParameter: true 6 | -------------------------------------------------------------------------------- /scripts/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Set environment variables used by various scripts 3 | 4 | # directory for temporary downloads 5 | DOWNLOAD_DIR=generator_files 6 | mkdir -p ${DOWNLOAD_DIR} 7 | 8 | # OpenAPI Generator version and URL 9 | GENERATOR_VERSION=7.7.0 10 | GENERATOR_URL=https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/${GENERATOR_VERSION}/openapi-generator-cli-${GENERATOR_VERSION}.jar 11 | GENERATOR_JAR=${DOWNLOAD_DIR}/openapi-generator-cli-${GENERATOR_VERSION}.jar 12 | 13 | # hcloud-openapi version and URL 14 | HCLOUD_OPENAPI_VERSION=0.22.0 15 | HCLOUD_OPENAPI_URL=https://github.com/MaximilianKoestler/hcloud-openapi/releases/download/v${HCLOUD_OPENAPI_VERSION}/hcloud.json 16 | HCLOUD_OPENAPI_JSON=${DOWNLOAD_DIR}/hcloud_${HCLOUD_OPENAPI_VERSION}.json 17 | -------------------------------------------------------------------------------- /scripts/download_openapi_spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Download OpenAPI spec for the Hetzner Cloud API 3 | 4 | . "$(dirname "$0")/config.sh" 5 | 6 | echo "Downloading version ${HCLOUD_OPENAPI_VERSION} of the OpenAPI spec for the Hetzner Cloud API..." 7 | curl -L "${HCLOUD_OPENAPI_URL}" -o "${HCLOUD_OPENAPI_JSON}" 8 | -------------------------------------------------------------------------------- /scripts/extract_generator_templates.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Extract templates from OpenAPI Generator for customization 3 | 4 | . "$(dirname "$0")/config.sh" 5 | 6 | # make sure Java runtime is available 7 | if type -p java >/dev/null 2>&1; then 8 | _JAVA=java 9 | elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then 10 | _JAVA="$JAVA_HOME/bin/java" 11 | else 12 | echo "Java not found in PATH or JAVA_HOME." 13 | exit 1 14 | fi 15 | echo "Using Java from $(which "$_JAVA")..." 16 | 17 | # download OpenAPI generator if JARFILE doesn't exist 18 | if [[ ! -f "${GENERATOR_JAR}" ]]; then 19 | echo "Downloading version $VERSION of the OpenAPI Generator..." 20 | curl -L "${GENERATOR_URL}" -o "${GENERATOR_JAR}" 21 | fi 22 | 23 | # remove output directory first 24 | rm -rf templates_orig 25 | 26 | echo "Running OpenAPI Generator template extraction..." 27 | "$_JAVA" -jar "${GENERATOR_JAR}" author template \ 28 | -g rust \ 29 | -o templates_orig 30 | 31 | # restore CRLF line endings on Windows 32 | if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then 33 | unix2dos -k -q templates/**/* 34 | fi 35 | -------------------------------------------------------------------------------- /scripts/generate_templates_diff.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Diff local templates against extracted OpenAPI Generator templates 3 | 4 | $(dirname "$0")/extract_generator_templates.sh 5 | 6 | git diff -w --no-index --diff-filter=M --output templates/templates.diff templates_orig templates 7 | -------------------------------------------------------------------------------- /scripts/remove_all_comments.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Remove all comments in Rust files for diffing non-doc changes 3 | find src -name '*.rs' -exec sed -Ei".bak" "/^[ ]*\/\/\//d" {} \; 4 | 5 | rm -rf src/*.bak 6 | rm -rf src/apis/*.bak 7 | rm -rf src/models/*.bak 8 | -------------------------------------------------------------------------------- /src/models/add_route_to_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AddRouteToNetworkResponse : Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/add_route 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AddRouteToNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AddRouteToNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/add_route 23 | pub fn new(action: models::Action) -> AddRouteToNetworkResponse { 24 | AddRouteToNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/add_server_to_placement_group_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AddServerToPlacementGroupRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/add_to_placement_group 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AddServerToPlacementGroupRequest { 17 | /// ID of Placement Group the Server should be added to 18 | #[serde(rename = "placement_group")] 19 | pub placement_group: i64, 20 | } 21 | 22 | impl AddServerToPlacementGroupRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/add_to_placement_group 24 | pub fn new(placement_group: i64) -> AddServerToPlacementGroupRequest { 25 | AddServerToPlacementGroupRequest { placement_group } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/add_server_to_placement_group_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AddServerToPlacementGroupResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/add_to_placement_group 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AddServerToPlacementGroupResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AddServerToPlacementGroupResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/add_to_placement_group 23 | pub fn new(action: models::Action) -> AddServerToPlacementGroupResponse { 24 | AddServerToPlacementGroupResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/add_service_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AddServiceResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/add_service 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AddServiceResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AddServiceResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/add_service 23 | pub fn new(action: models::Action) -> AddServiceResponse { 24 | AddServiceResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/add_subnet_to_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AddSubnetToNetworkResponse : Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/add_subnet 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AddSubnetToNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AddSubnetToNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/add_subnet 23 | pub fn new(action: models::Action) -> AddSubnetToNetworkResponse { 24 | AddSubnetToNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/add_target_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AddTargetResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/add_target 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AddTargetResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AddTargetResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/add_target 23 | pub fn new(action: models::Action) -> AddTargetResponse { 24 | AddTargetResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/apply_to_resources_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ApplyToResourcesRequest : Request for POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/apply_to_resources 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ApplyToResourcesRequest { 17 | /// Resources to apply the [Firewall](#firewalls) to. Extends existing resources. 18 | #[serde(rename = "apply_to")] 19 | pub apply_to: Vec, 20 | } 21 | 22 | impl ApplyToResourcesRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/apply_to_resources 24 | pub fn new(apply_to: Vec) -> ApplyToResourcesRequest { 25 | ApplyToResourcesRequest { apply_to } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/apply_to_resources_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ApplyToResourcesResponse : Response to POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/apply_to_resources 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ApplyToResourcesResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | } 20 | 21 | impl ApplyToResourcesResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/apply_to_resources 23 | pub fn new(actions: Vec) -> ApplyToResourcesResponse { 24 | ApplyToResourcesResponse { actions } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/architecture.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// Architecture : Type of cpu architecture this image is compatible with. | Type of cpu architecture 15 | /// Type of cpu architecture this image is compatible with. | Type of cpu architecture 16 | #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] 17 | pub enum Architecture { 18 | #[serde(rename = "arm")] 19 | Arm, 20 | #[serde(rename = "x86")] 21 | X86, 22 | } 23 | 24 | impl std::fmt::Display for Architecture { 25 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 26 | match self { 27 | Self::Arm => write!(f, "arm"), 28 | Self::X86 => write!(f, "x86"), 29 | } 30 | } 31 | } 32 | 33 | impl Default for Architecture { 34 | fn default() -> Architecture { 35 | Self::Arm 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/models/assign_floating_ip_to_server_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AssignFloatingIpToServerRequest : Request for POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/assign 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AssignFloatingIpToServerRequest { 17 | /// [Server](#servers) the [Floating IP](#floating-ips) is assigned to. `null` if not assigned. 18 | #[serde(rename = "server", deserialize_with = "Option::deserialize")] 19 | pub server: Option, 20 | } 21 | 22 | impl AssignFloatingIpToServerRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/assign 24 | pub fn new(server: Option) -> AssignFloatingIpToServerRequest { 25 | AssignFloatingIpToServerRequest { server } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/assign_floating_ip_to_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AssignFloatingIpToServerResponse : Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/assign 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AssignFloatingIpToServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AssignFloatingIpToServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/assign 23 | pub fn new(action: models::Action) -> AssignFloatingIpToServerResponse { 24 | AssignFloatingIpToServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/assign_primary_ip_to_resource_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AssignPrimaryIpToResourceResponse : Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/assign 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AssignPrimaryIpToResourceResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AssignPrimaryIpToResourceResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/assign 23 | pub fn new(action: models::Action) -> AssignPrimaryIpToResourceResponse { 24 | AssignPrimaryIpToResourceResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/attach_iso_to_server_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AttachIsoToServerRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_iso 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AttachIsoToServerRequest { 17 | /// ID or name of ISO to attach to the Server as listed in GET `/isos` 18 | #[serde(rename = "iso")] 19 | pub iso: String, 20 | } 21 | 22 | impl AttachIsoToServerRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_iso 24 | pub fn new(iso: String) -> AttachIsoToServerRequest { 25 | AttachIsoToServerRequest { iso } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/attach_iso_to_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AttachIsoToServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_iso 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AttachIsoToServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AttachIsoToServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_iso 23 | pub fn new(action: models::Action) -> AttachIsoToServerResponse { 24 | AttachIsoToServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/attach_load_balancer_to_network_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AttachLoadBalancerToNetworkRequest : Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/attach_to_network 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AttachLoadBalancerToNetworkRequest { 17 | /// IP to request to be assigned to this Load Balancer; if you do not provide this then you will be auto assigned an IP address 18 | #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] 19 | pub ip: Option, 20 | /// ID of an existing network to attach the Load Balancer to 21 | #[serde(rename = "network")] 22 | pub network: i64, 23 | } 24 | 25 | impl AttachLoadBalancerToNetworkRequest { 26 | /// Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/attach_to_network 27 | pub fn new(network: i64) -> AttachLoadBalancerToNetworkRequest { 28 | AttachLoadBalancerToNetworkRequest { ip: None, network } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/attach_load_balancer_to_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AttachLoadBalancerToNetworkResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/attach_to_network 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AttachLoadBalancerToNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AttachLoadBalancerToNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/attach_to_network 23 | pub fn new(action: models::Action) -> AttachLoadBalancerToNetworkResponse { 24 | AttachLoadBalancerToNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/attach_server_to_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AttachServerToNetworkResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_to_network 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AttachServerToNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AttachServerToNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_to_network 23 | pub fn new(action: models::Action) -> AttachServerToNetworkResponse { 24 | AttachServerToNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/attach_volume_to_server_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AttachVolumeToServerRequest : Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/attach 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AttachVolumeToServerRequest { 17 | /// Auto-mount the Volume after attaching it 18 | #[serde(rename = "automount", skip_serializing_if = "Option::is_none")] 19 | pub automount: Option, 20 | /// ID of the Server the Volume will be attached to 21 | #[serde(rename = "server")] 22 | pub server: i64, 23 | } 24 | 25 | impl AttachVolumeToServerRequest { 26 | /// Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/attach 27 | pub fn new(server: i64) -> AttachVolumeToServerRequest { 28 | AttachVolumeToServerRequest { 29 | automount: None, 30 | server, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/attach_volume_to_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// AttachVolumeToServerResponse : Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/attach 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AttachVolumeToServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl AttachVolumeToServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/attach 23 | pub fn new(action: models::Action) -> AttachVolumeToServerResponse { 24 | AttachVolumeToServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/certificate_status_error.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CertificateStatusError : If issuance or renewal reports `failed`, this property contains information about what happened 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CertificateStatusError { 17 | #[serde(rename = "code", skip_serializing_if = "Option::is_none")] 18 | pub code: Option, 19 | #[serde(rename = "message", skip_serializing_if = "Option::is_none")] 20 | pub message: Option, 21 | } 22 | 23 | impl CertificateStatusError { 24 | /// If issuance or renewal reports `failed`, this property contains information about what happened 25 | pub fn new() -> CertificateStatusError { 26 | CertificateStatusError { 27 | code: None, 28 | message: None, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/change_algorithm_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeAlgorithmResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_algorithm 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeAlgorithmResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeAlgorithmResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_algorithm 23 | pub fn new(action: models::Action) -> ChangeAlgorithmResponse { 24 | ChangeAlgorithmResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_alias_ips_of_network_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeAliasIpsOfNetworkRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_alias_ips 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeAliasIpsOfNetworkRequest { 17 | /// New alias IPs to set for this Server 18 | #[serde(rename = "alias_ips")] 19 | pub alias_ips: Vec, 20 | /// ID of an existing Network already attached to the Server 21 | #[serde(rename = "network")] 22 | pub network: i64, 23 | } 24 | 25 | impl ChangeAliasIpsOfNetworkRequest { 26 | /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_alias_ips 27 | pub fn new(alias_ips: Vec, network: i64) -> ChangeAliasIpsOfNetworkRequest { 28 | ChangeAliasIpsOfNetworkRequest { alias_ips, network } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/change_alias_ips_of_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeAliasIpsOfNetworkResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_alias_ips 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeAliasIpsOfNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeAliasIpsOfNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_alias_ips 23 | pub fn new(action: models::Action) -> ChangeAliasIpsOfNetworkResponse { 24 | ChangeAliasIpsOfNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_floating_ip_protection_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeFloatingIpProtectionResponse : Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeFloatingIpProtectionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeFloatingIpProtectionResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/change_protection 23 | pub fn new(action: models::Action) -> ChangeFloatingIpProtectionResponse { 24 | ChangeFloatingIpProtectionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_image_protection_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeImageProtectionRequest : Request for POST https://api.hetzner.cloud/v1/images/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeImageProtectionRequest { 17 | /// If true, prevents the snapshot from being deleted 18 | #[serde(rename = "delete", skip_serializing_if = "Option::is_none")] 19 | pub delete: Option, 20 | } 21 | 22 | impl ChangeImageProtectionRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/images/{id}/actions/change_protection 24 | pub fn new() -> ChangeImageProtectionRequest { 25 | ChangeImageProtectionRequest { delete: None } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/change_image_protection_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeImageProtectionResponse : Response to POST https://api.hetzner.cloud/v1/images/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeImageProtectionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeImageProtectionResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/images/{id}/actions/change_protection 23 | pub fn new(action: models::Action) -> ChangeImageProtectionResponse { 24 | ChangeImageProtectionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_ip_range_of_network_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeIpRangeOfNetworkRequest : Request for POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_ip_range 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeIpRangeOfNetworkRequest { 17 | /// IP range of the [Network](#networks). Uses CIDR notation. Must span all included subnets. Must be one of the private IPv4 ranges of RFC1918. Minimum network size is /24. We highly recommend that you pick a larger [Network](#networks) with a /16 netmask. 18 | #[serde(rename = "ip_range")] 19 | pub ip_range: String, 20 | } 21 | 22 | impl ChangeIpRangeOfNetworkRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_ip_range 24 | pub fn new(ip_range: String) -> ChangeIpRangeOfNetworkRequest { 25 | ChangeIpRangeOfNetworkRequest { ip_range } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/change_ip_range_of_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeIpRangeOfNetworkResponse : Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_ip_range 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeIpRangeOfNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeIpRangeOfNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_ip_range 23 | pub fn new(action: models::Action) -> ChangeIpRangeOfNetworkResponse { 24 | ChangeIpRangeOfNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_load_balancer_protection_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeLoadBalancerProtectionRequest : Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeLoadBalancerProtectionRequest { 17 | /// If true, prevents the Load Balancer from being deleted 18 | #[serde(rename = "delete", skip_serializing_if = "Option::is_none")] 19 | pub delete: Option, 20 | } 21 | 22 | impl ChangeLoadBalancerProtectionRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_protection 24 | pub fn new() -> ChangeLoadBalancerProtectionRequest { 25 | ChangeLoadBalancerProtectionRequest { delete: None } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/change_load_balancer_protection_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeLoadBalancerProtectionResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeLoadBalancerProtectionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeLoadBalancerProtectionResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_protection 23 | pub fn new(action: models::Action) -> ChangeLoadBalancerProtectionResponse { 24 | ChangeLoadBalancerProtectionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_network_protection_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeNetworkProtectionRequest : Request for POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeNetworkProtectionRequest { 17 | /// Delete protection setting. If true, prevents the [Network](#networks) from being deleted. 18 | #[serde(rename = "delete", skip_serializing_if = "Option::is_none")] 19 | pub delete: Option, 20 | } 21 | 22 | impl ChangeNetworkProtectionRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_protection 24 | pub fn new() -> ChangeNetworkProtectionRequest { 25 | ChangeNetworkProtectionRequest { delete: None } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/change_network_protection_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeNetworkProtectionResponse : Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeNetworkProtectionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeNetworkProtectionResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_protection 23 | pub fn new(action: models::Action) -> ChangeNetworkProtectionResponse { 24 | ChangeNetworkProtectionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_primary_ip_protection_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangePrimaryIpProtectionResponse : Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangePrimaryIpProtectionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangePrimaryIpProtectionResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/change_protection 23 | pub fn new(action: models::Action) -> ChangePrimaryIpProtectionResponse { 24 | ChangePrimaryIpProtectionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_reverse_dns_entry_for_this_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeReverseDnsEntryForThisLoadBalancerResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_dns_ptr 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeReverseDnsEntryForThisLoadBalancerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeReverseDnsEntryForThisLoadBalancerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_dns_ptr 23 | pub fn new(action: models::Action) -> ChangeReverseDnsEntryForThisLoadBalancerResponse { 24 | ChangeReverseDnsEntryForThisLoadBalancerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_reverse_dns_entry_for_this_server_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeReverseDnsEntryForThisServerRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_dns_ptr 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeReverseDnsEntryForThisServerRequest { 17 | /// Hostname to set as a reverse DNS PTR entry, reset to original value if `null` 18 | #[serde(rename = "dns_ptr", deserialize_with = "Option::deserialize")] 19 | pub dns_ptr: Option, 20 | /// Primary IP address for which the reverse DNS entry should be set 21 | #[serde(rename = "ip")] 22 | pub ip: String, 23 | } 24 | 25 | impl ChangeReverseDnsEntryForThisServerRequest { 26 | /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_dns_ptr 27 | pub fn new(dns_ptr: Option, ip: String) -> ChangeReverseDnsEntryForThisServerRequest { 28 | ChangeReverseDnsEntryForThisServerRequest { dns_ptr, ip } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/change_reverse_dns_entry_for_this_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeReverseDnsEntryForThisServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_dns_ptr 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeReverseDnsEntryForThisServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeReverseDnsEntryForThisServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_dns_ptr 23 | pub fn new(action: models::Action) -> ChangeReverseDnsEntryForThisServerResponse { 24 | ChangeReverseDnsEntryForThisServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_reverse_dns_records_for_floating_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeReverseDnsRecordsForFloatingIpResponse : Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/change_dns_ptr 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeReverseDnsRecordsForFloatingIpResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeReverseDnsRecordsForFloatingIpResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/change_dns_ptr 23 | pub fn new(action: models::Action) -> ChangeReverseDnsRecordsForFloatingIpResponse { 24 | ChangeReverseDnsRecordsForFloatingIpResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_reverse_dns_records_for_primary_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeReverseDnsRecordsForPrimaryIpResponse : Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/change_dns_ptr 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeReverseDnsRecordsForPrimaryIpResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeReverseDnsRecordsForPrimaryIpResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/change_dns_ptr 23 | pub fn new(action: models::Action) -> ChangeReverseDnsRecordsForPrimaryIpResponse { 24 | ChangeReverseDnsRecordsForPrimaryIpResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_server_protection_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeServerProtectionResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeServerProtectionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeServerProtectionResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_protection 23 | pub fn new(action: models::Action) -> ChangeServerProtectionResponse { 24 | ChangeServerProtectionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_type_of_load_balancer_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeTypeOfLoadBalancerRequest : Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_type 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeTypeOfLoadBalancerRequest { 17 | /// ID or name of Load Balancer type the Load Balancer should migrate to 18 | #[serde(rename = "load_balancer_type")] 19 | pub load_balancer_type: String, 20 | } 21 | 22 | impl ChangeTypeOfLoadBalancerRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_type 24 | pub fn new(load_balancer_type: String) -> ChangeTypeOfLoadBalancerRequest { 25 | ChangeTypeOfLoadBalancerRequest { load_balancer_type } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/change_type_of_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeTypeOfLoadBalancerResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_type 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeTypeOfLoadBalancerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeTypeOfLoadBalancerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/change_type 23 | pub fn new(action: models::Action) -> ChangeTypeOfLoadBalancerResponse { 24 | ChangeTypeOfLoadBalancerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_type_of_server_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeTypeOfServerRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_type 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeTypeOfServerRequest { 17 | /// ID or name of Server type the Server should migrate to 18 | #[serde(rename = "server_type")] 19 | pub server_type: String, 20 | /// If false, do not upgrade the disk (this allows downgrading the Server type later) 21 | #[serde(rename = "upgrade_disk")] 22 | pub upgrade_disk: bool, 23 | } 24 | 25 | impl ChangeTypeOfServerRequest { 26 | /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_type 27 | pub fn new(server_type: String, upgrade_disk: bool) -> ChangeTypeOfServerRequest { 28 | ChangeTypeOfServerRequest { 29 | server_type, 30 | upgrade_disk, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/change_type_of_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeTypeOfServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_type 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeTypeOfServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeTypeOfServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/change_type 23 | pub fn new(action: models::Action) -> ChangeTypeOfServerResponse { 24 | ChangeTypeOfServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/change_volume_protection_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeVolumeProtectionRequest : Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeVolumeProtectionRequest { 17 | /// If true, prevents the Volume from being deleted 18 | #[serde(rename = "delete", skip_serializing_if = "Option::is_none")] 19 | pub delete: Option, 20 | } 21 | 22 | impl ChangeVolumeProtectionRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/change_protection 24 | pub fn new() -> ChangeVolumeProtectionRequest { 25 | ChangeVolumeProtectionRequest { delete: None } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/change_volume_protection_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ChangeVolumeProtectionResponse : Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/change_protection 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ChangeVolumeProtectionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ChangeVolumeProtectionResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/change_protection 23 | pub fn new(action: models::Action) -> ChangeVolumeProtectionResponse { 24 | ChangeVolumeProtectionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/create_certificate_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateCertificateResponse : Response to POST https://api.hetzner.cloud/v1/certificates 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateCertificateResponse { 17 | #[serde( 18 | rename = "action", 19 | default, 20 | with = "::serde_with::rust::double_option", 21 | skip_serializing_if = "Option::is_none" 22 | )] 23 | pub action: Option>>, 24 | #[serde(rename = "certificate")] 25 | pub certificate: Box, 26 | } 27 | 28 | impl CreateCertificateResponse { 29 | /// Response to POST https://api.hetzner.cloud/v1/certificates 30 | pub fn new(certificate: models::Certificate) -> CreateCertificateResponse { 31 | CreateCertificateResponse { 32 | action: None, 33 | certificate: Box::new(certificate), 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/models/create_firewall_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateFirewallResponse : Response to POST https://api.hetzner.cloud/v1/firewalls 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateFirewallResponse { 17 | #[serde(rename = "actions", skip_serializing_if = "Option::is_none")] 18 | pub actions: Option>, 19 | #[serde(rename = "firewall", skip_serializing_if = "Option::is_none")] 20 | pub firewall: Option>, 21 | } 22 | 23 | impl CreateFirewallResponse { 24 | /// Response to POST https://api.hetzner.cloud/v1/firewalls 25 | pub fn new() -> CreateFirewallResponse { 26 | CreateFirewallResponse { 27 | actions: None, 28 | firewall: None, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/create_floating_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateFloatingIpResponse : Response to POST https://api.hetzner.cloud/v1/floating_ips 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateFloatingIpResponse { 17 | #[serde(rename = "action", skip_serializing_if = "Option::is_none")] 18 | pub action: Option>, 19 | #[serde(rename = "floating_ip")] 20 | pub floating_ip: Box, 21 | } 22 | 23 | impl CreateFloatingIpResponse { 24 | /// Response to POST https://api.hetzner.cloud/v1/floating_ips 25 | pub fn new(floating_ip: models::FloatingIp) -> CreateFloatingIpResponse { 26 | CreateFloatingIpResponse { 27 | action: None, 28 | floating_ip: Box::new(floating_ip), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/create_image_from_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateImageFromServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/create_image 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateImageFromServerResponse { 17 | #[serde(rename = "action", skip_serializing_if = "Option::is_none")] 18 | pub action: Option>, 19 | #[serde(rename = "image", skip_serializing_if = "Option::is_none")] 20 | pub image: Option>, 21 | } 22 | 23 | impl CreateImageFromServerResponse { 24 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/create_image 25 | pub fn new() -> CreateImageFromServerResponse { 26 | CreateImageFromServerResponse { 27 | action: None, 28 | image: None, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/create_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateLoadBalancerResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateLoadBalancerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | #[serde(rename = "load_balancer")] 20 | pub load_balancer: Box, 21 | } 22 | 23 | impl CreateLoadBalancerResponse { 24 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers 25 | pub fn new( 26 | action: models::Action, 27 | load_balancer: models::LoadBalancer, 28 | ) -> CreateLoadBalancerResponse { 29 | CreateLoadBalancerResponse { 30 | action: Box::new(action), 31 | load_balancer: Box::new(load_balancer), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/create_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateNetworkResponse : Response to POST https://api.hetzner.cloud/v1/networks 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateNetworkResponse { 17 | #[serde(rename = "network", skip_serializing_if = "Option::is_none")] 18 | pub network: Option>, 19 | } 20 | 21 | impl CreateNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/networks 23 | pub fn new() -> CreateNetworkResponse { 24 | CreateNetworkResponse { network: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/create_placementgroup_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreatePlacementgroupResponse : Response to POST https://api.hetzner.cloud/v1/placement_groups 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreatePlacementgroupResponse { 17 | #[serde( 18 | rename = "action", 19 | default, 20 | with = "::serde_with::rust::double_option", 21 | skip_serializing_if = "Option::is_none" 22 | )] 23 | pub action: Option>>, 24 | #[serde(rename = "placement_group")] 25 | pub placement_group: Box, 26 | } 27 | 28 | impl CreatePlacementgroupResponse { 29 | /// Response to POST https://api.hetzner.cloud/v1/placement_groups 30 | pub fn new(placement_group: models::PlacementGroup) -> CreatePlacementgroupResponse { 31 | CreatePlacementgroupResponse { 32 | action: None, 33 | placement_group: Box::new(placement_group), 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/models/create_primary_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreatePrimaryIpResponse : Response to POST https://api.hetzner.cloud/v1/primary_ips 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreatePrimaryIpResponse { 17 | #[serde(rename = "action", skip_serializing_if = "Option::is_none")] 18 | pub action: Option>, 19 | #[serde(rename = "primary_ip")] 20 | pub primary_ip: Box, 21 | } 22 | 23 | impl CreatePrimaryIpResponse { 24 | /// Response to POST https://api.hetzner.cloud/v1/primary_ips 25 | pub fn new(primary_ip: models::PrimaryIp) -> CreatePrimaryIpResponse { 26 | CreatePrimaryIpResponse { 27 | action: None, 28 | primary_ip: Box::new(primary_ip), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/create_server_request_firewalls.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct CreateServerRequestFirewalls { 16 | /// ID of the Firewall 17 | #[serde(rename = "firewall")] 18 | pub firewall: i64, 19 | } 20 | 21 | impl CreateServerRequestFirewalls { 22 | pub fn new(firewall: i64) -> CreateServerRequestFirewalls { 23 | CreateServerRequestFirewalls { firewall } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/models/create_ssh_key_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateSshKeyRequest : Request for POST https://api.hetzner.cloud/v1/ssh_keys 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateSshKeyRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// Name of the SSH key 21 | #[serde(rename = "name")] 22 | pub name: String, 23 | /// Public key 24 | #[serde(rename = "public_key")] 25 | pub public_key: String, 26 | } 27 | 28 | impl CreateSshKeyRequest { 29 | /// Request for POST https://api.hetzner.cloud/v1/ssh_keys 30 | pub fn new(name: String, public_key: String) -> CreateSshKeyRequest { 31 | CreateSshKeyRequest { 32 | labels: None, 33 | name, 34 | public_key, 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/models/create_ssh_key_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateSshKeyResponse : Response to POST https://api.hetzner.cloud/v1/ssh_keys 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateSshKeyResponse { 17 | #[serde(rename = "ssh_key")] 18 | pub ssh_key: Box, 19 | } 20 | 21 | impl CreateSshKeyResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/ssh_keys 23 | pub fn new(ssh_key: models::SshKey) -> CreateSshKeyResponse { 24 | CreateSshKeyResponse { 25 | ssh_key: Box::new(ssh_key), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/create_volume_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreateVolumeResponse : Response to POST https://api.hetzner.cloud/v1/volumes 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreateVolumeResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | #[serde(rename = "next_actions")] 20 | pub next_actions: Vec, 21 | #[serde(rename = "volume")] 22 | pub volume: Box, 23 | } 24 | 25 | impl CreateVolumeResponse { 26 | /// Response to POST https://api.hetzner.cloud/v1/volumes 27 | pub fn new( 28 | action: models::Action, 29 | next_actions: Vec, 30 | volume: models::Volume, 31 | ) -> CreateVolumeResponse { 32 | CreateVolumeResponse { 33 | action: Box::new(action), 34 | next_actions, 35 | volume: Box::new(volume), 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/models/created_from.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// CreatedFrom : Information about the Server the Image was created from 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CreatedFrom { 17 | /// ID of the Server the Image was created from 18 | #[serde(rename = "id")] 19 | pub id: i64, 20 | /// Server name at the time the Image was created 21 | #[serde(rename = "name")] 22 | pub name: String, 23 | } 24 | 25 | impl CreatedFrom { 26 | /// Information about the Server the Image was created from 27 | pub fn new(id: i64, name: String) -> CreatedFrom { 28 | CreatedFrom { id, name } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/delete_route_from_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DeleteRouteFromNetworkResponse : Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/delete_route 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteRouteFromNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DeleteRouteFromNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/delete_route 23 | pub fn new(action: models::Action) -> DeleteRouteFromNetworkResponse { 24 | DeleteRouteFromNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/delete_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DeleteServerResponse : Response to DELETE https://api.hetzner.cloud/v1/servers/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteServerResponse { 17 | #[serde(rename = "action", skip_serializing_if = "Option::is_none")] 18 | pub action: Option>, 19 | } 20 | 21 | impl DeleteServerResponse { 22 | /// Response to DELETE https://api.hetzner.cloud/v1/servers/{id} 23 | pub fn new() -> DeleteServerResponse { 24 | DeleteServerResponse { action: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/delete_service_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DeleteServiceRequest : Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/delete_service 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteServiceRequest { 17 | /// The listen port of the service you want to delete 18 | #[serde(rename = "listen_port")] 19 | pub listen_port: i32, 20 | } 21 | 22 | impl DeleteServiceRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/delete_service 24 | pub fn new(listen_port: i32) -> DeleteServiceRequest { 25 | DeleteServiceRequest { listen_port } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/delete_service_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DeleteServiceResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/delete_service 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteServiceResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DeleteServiceResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/delete_service 23 | pub fn new(action: models::Action) -> DeleteServiceResponse { 24 | DeleteServiceResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/delete_subnet_from_network_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DeleteSubnetFromNetworkRequest : Request for POST https://api.hetzner.cloud/v1/networks/{id}/actions/delete_subnet 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteSubnetFromNetworkRequest { 17 | /// IP range in CIDR block notation of the subnet to delete. 18 | #[serde(rename = "ip_range")] 19 | pub ip_range: String, 20 | } 21 | 22 | impl DeleteSubnetFromNetworkRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/networks/{id}/actions/delete_subnet 24 | pub fn new(ip_range: String) -> DeleteSubnetFromNetworkRequest { 25 | DeleteSubnetFromNetworkRequest { ip_range } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/delete_subnet_from_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DeleteSubnetFromNetworkResponse : Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/delete_subnet 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteSubnetFromNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DeleteSubnetFromNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/delete_subnet 23 | pub fn new(action: models::Action) -> DeleteSubnetFromNetworkResponse { 24 | DeleteSubnetFromNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/detach_iso_from_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DetachIsoFromServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/detach_iso 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DetachIsoFromServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DetachIsoFromServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/detach_iso 23 | pub fn new(action: models::Action) -> DetachIsoFromServerResponse { 24 | DetachIsoFromServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/detach_load_balancer_from_network_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DetachLoadBalancerFromNetworkRequest : Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/detach_from_network 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DetachLoadBalancerFromNetworkRequest { 17 | /// ID of an existing network to detach the Load Balancer from 18 | #[serde(rename = "network")] 19 | pub network: i64, 20 | } 21 | 22 | impl DetachLoadBalancerFromNetworkRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/detach_from_network 24 | pub fn new(network: i64) -> DetachLoadBalancerFromNetworkRequest { 25 | DetachLoadBalancerFromNetworkRequest { network } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/detach_load_balancer_from_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DetachLoadBalancerFromNetworkResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/detach_from_network 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DetachLoadBalancerFromNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DetachLoadBalancerFromNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/detach_from_network 23 | pub fn new(action: models::Action) -> DetachLoadBalancerFromNetworkResponse { 24 | DetachLoadBalancerFromNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/detach_server_from_network_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DetachServerFromNetworkRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/detach_from_network 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DetachServerFromNetworkRequest { 17 | /// ID of an existing network to detach the Server from 18 | #[serde(rename = "network")] 19 | pub network: i64, 20 | } 21 | 22 | impl DetachServerFromNetworkRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/detach_from_network 24 | pub fn new(network: i64) -> DetachServerFromNetworkRequest { 25 | DetachServerFromNetworkRequest { network } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/detach_server_from_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DetachServerFromNetworkResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/detach_from_network 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DetachServerFromNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DetachServerFromNetworkResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/detach_from_network 23 | pub fn new(action: models::Action) -> DetachServerFromNetworkResponse { 24 | DetachServerFromNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/detach_volume_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DetachVolumeResponse : Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/detach 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DetachVolumeResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DetachVolumeResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/detach 23 | pub fn new(action: models::Action) -> DetachVolumeResponse { 24 | DetachVolumeResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/disable_backups_for_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DisableBackupsForServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/disable_backup 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DisableBackupsForServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DisableBackupsForServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/disable_backup 23 | pub fn new(action: models::Action) -> DisableBackupsForServerResponse { 24 | DisableBackupsForServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/disable_public_interface_of_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DisablePublicInterfaceOfLoadBalancerResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/disable_public_interface 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DisablePublicInterfaceOfLoadBalancerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DisablePublicInterfaceOfLoadBalancerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/disable_public_interface 23 | pub fn new(action: models::Action) -> DisablePublicInterfaceOfLoadBalancerResponse { 24 | DisablePublicInterfaceOfLoadBalancerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/disable_rescue_mode_for_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DisableRescueModeForServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/disable_rescue 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DisableRescueModeForServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl DisableRescueModeForServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/disable_rescue 23 | pub fn new(action: models::Action) -> DisableRescueModeForServerResponse { 24 | DisableRescueModeForServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/dns_ptr.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// DnsPtr : Request for POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/change_dns_ptr | Request for POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/change_dns_ptr 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DnsPtr { 17 | /// Domain Name to point to. PTR record content used for reverse DNS. | DNS pointer for the specific IP address 18 | #[serde(rename = "dns_ptr")] 19 | pub dns_ptr: String, 20 | /// Single IPv4 or IPv6 address to create pointer for. | Single IPv6 address of this Server for which the reverse DNS entry has been set up 21 | #[serde(rename = "ip")] 22 | pub ip: String, 23 | } 24 | 25 | impl DnsPtr { 26 | /// Request for POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/change_dns_ptr | Request for POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/change_dns_ptr 27 | pub fn new(dns_ptr: String, ip: String) -> DnsPtr { 28 | DnsPtr { dns_ptr, ip } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/enable_and_configure_backups_for_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// EnableAndConfigureBackupsForServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/enable_backup 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct EnableAndConfigureBackupsForServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl EnableAndConfigureBackupsForServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/enable_backup 23 | pub fn new(action: models::Action) -> EnableAndConfigureBackupsForServerResponse { 24 | EnableAndConfigureBackupsForServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/enable_public_interface_of_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// EnablePublicInterfaceOfLoadBalancerResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/enable_public_interface 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct EnablePublicInterfaceOfLoadBalancerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl EnablePublicInterfaceOfLoadBalancerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/enable_public_interface 23 | pub fn new(action: models::Action) -> EnablePublicInterfaceOfLoadBalancerResponse { 24 | EnablePublicInterfaceOfLoadBalancerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/enable_rescue_mode_for_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// EnableRescueModeForServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/enable_rescue 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct EnableRescueModeForServerResponse { 17 | #[serde(rename = "action", skip_serializing_if = "Option::is_none")] 18 | pub action: Option>, 19 | /// Password that will be set for this Server once the Action succeeds 20 | #[serde(rename = "root_password", skip_serializing_if = "Option::is_none")] 21 | pub root_password: Option, 22 | } 23 | 24 | impl EnableRescueModeForServerResponse { 25 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/enable_rescue 26 | pub fn new() -> EnableRescueModeForServerResponse { 27 | EnableRescueModeForServerResponse { 28 | action: None, 29 | root_password: None, 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/models/error.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// Error : Error message for the Action if an error occurred, otherwise null. 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct Error { 17 | /// Fixed error code for machines. 18 | #[serde(rename = "code")] 19 | pub code: String, 20 | /// Error message for humans. 21 | #[serde(rename = "message")] 22 | pub message: String, 23 | } 24 | 25 | impl Error { 26 | /// Error message for the Action if an error occurred, otherwise null. 27 | pub fn new(code: String, message: String) -> Error { 28 | Error { code, message } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/firewall_resource_id_applied_to_resources.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct FirewallResourceIdAppliedToResources { 16 | #[serde(rename = "server", skip_serializing_if = "Option::is_none")] 17 | pub server: Option>, 18 | /// Type of resource. 19 | #[serde(rename = "type", skip_serializing_if = "Option::is_none")] 20 | pub r#type: Option, 21 | } 22 | 23 | impl FirewallResourceIdAppliedToResources { 24 | pub fn new() -> FirewallResourceIdAppliedToResources { 25 | FirewallResourceIdAppliedToResources { 26 | server: None, 27 | r#type: None, 28 | } 29 | } 30 | } 31 | /// Type of resource. 32 | #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] 33 | pub enum Type { 34 | #[serde(rename = "server")] 35 | Server, 36 | } 37 | 38 | impl Default for Type { 39 | fn default() -> Type { 40 | Self::Server 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/models/get_action_for_certificate_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForCertificateResponse : Response to GET https://api.hetzner.cloud/v1/certificates/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForCertificateResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForCertificateResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/certificates/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForCertificateResponse { 24 | GetActionForCertificateResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_for_firewall_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForFirewallResponse : Response to GET https://api.hetzner.cloud/v1/firewalls/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForFirewallResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForFirewallResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/firewalls/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForFirewallResponse { 24 | GetActionForFirewallResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_for_floating_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForFloatingIpResponse : Response to GET https://api.hetzner.cloud/v1/floating_ips/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForFloatingIpResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForFloatingIpResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/floating_ips/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForFloatingIpResponse { 24 | GetActionForFloatingIpResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_for_image_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForImageResponse : Response to GET https://api.hetzner.cloud/v1/images/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForImageResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForImageResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/images/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForImageResponse { 24 | GetActionForImageResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_for_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForLoadBalancerResponse : Response to GET https://api.hetzner.cloud/v1/load_balancers/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForLoadBalancerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForLoadBalancerResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/load_balancers/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForLoadBalancerResponse { 24 | GetActionForLoadBalancerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_for_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForNetworkResponse : Response to GET https://api.hetzner.cloud/v1/networks/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForNetworkResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForNetworkResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/networks/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForNetworkResponse { 24 | GetActionForNetworkResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_for_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForServerResponse : Response to GET https://api.hetzner.cloud/v1/servers/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForServerResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/servers/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForServerResponse { 24 | GetActionForServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_for_volume_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionForVolumeResponse : Response to GET https://api.hetzner.cloud/v1/volumes/{id}/actions/{action_id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionForVolumeResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionForVolumeResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/volumes/{id}/actions/{action_id} 23 | pub fn new(action: models::Action) -> GetActionForVolumeResponse { 24 | GetActionForVolumeResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_action_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetActionResponse : Response to GET https://api.hetzner.cloud/v1/{resource}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetActionResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl GetActionResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/{resource}/actions 23 | pub fn new(action: models::Action) -> GetActionResponse { 24 | GetActionResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_certificate_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetCertificateResponse : Response to GET https://api.hetzner.cloud/v1/certificates/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetCertificateResponse { 17 | #[serde(rename = "certificate")] 18 | pub certificate: Box, 19 | } 20 | 21 | impl GetCertificateResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/certificates/{id} 23 | pub fn new(certificate: models::Certificate) -> GetCertificateResponse { 24 | GetCertificateResponse { 25 | certificate: Box::new(certificate), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_datacenter_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetDatacenterResponse : Response to GET https://api.hetzner.cloud/v1/datacenters/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetDatacenterResponse { 17 | #[serde(rename = "datacenter")] 18 | pub datacenter: Box, 19 | } 20 | 21 | impl GetDatacenterResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/datacenters/{id} 23 | pub fn new(datacenter: models::Datacenter) -> GetDatacenterResponse { 24 | GetDatacenterResponse { 25 | datacenter: Box::new(datacenter), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_firewall_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetFirewallResponse : Response to GET https://api.hetzner.cloud/v1/firewalls/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetFirewallResponse { 17 | #[serde(rename = "firewall")] 18 | pub firewall: Box, 19 | } 20 | 21 | impl GetFirewallResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/firewalls/{id} 23 | pub fn new(firewall: models::Firewall) -> GetFirewallResponse { 24 | GetFirewallResponse { 25 | firewall: Box::new(firewall), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_floating_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetFloatingIpResponse : Response to GET https://api.hetzner.cloud/v1/floating_ips/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetFloatingIpResponse { 17 | #[serde(rename = "floating_ip")] 18 | pub floating_ip: Box, 19 | } 20 | 21 | impl GetFloatingIpResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/floating_ips/{id} 23 | pub fn new(floating_ip: models::FloatingIp) -> GetFloatingIpResponse { 24 | GetFloatingIpResponse { 25 | floating_ip: Box::new(floating_ip), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_image_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetImageResponse : Response to GET https://api.hetzner.cloud/v1/images/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetImageResponse { 17 | #[serde(rename = "image", skip_serializing_if = "Option::is_none")] 18 | pub image: Option>, 19 | } 20 | 21 | impl GetImageResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/images/{id} 23 | pub fn new() -> GetImageResponse { 24 | GetImageResponse { image: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/get_iso_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetIsoResponse : Response to GET https://api.hetzner.cloud/v1/isos/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetIsoResponse { 17 | #[serde(rename = "iso")] 18 | pub iso: Box, 19 | } 20 | 21 | impl GetIsoResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/isos/{id} 23 | pub fn new(iso: models::Iso) -> GetIsoResponse { 24 | GetIsoResponse { iso: Box::new(iso) } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/get_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetLoadBalancerResponse : Response to GET https://api.hetzner.cloud/v1/load_balancers/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetLoadBalancerResponse { 17 | #[serde(rename = "load_balancer")] 18 | pub load_balancer: Box, 19 | } 20 | 21 | impl GetLoadBalancerResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/load_balancers/{id} 23 | pub fn new(load_balancer: models::LoadBalancer) -> GetLoadBalancerResponse { 24 | GetLoadBalancerResponse { 25 | load_balancer: Box::new(load_balancer), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_load_balancer_type_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetLoadBalancerTypeResponse : Response to GET https://api.hetzner.cloud/v1/load_balancer_types/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetLoadBalancerTypeResponse { 17 | #[serde(rename = "load_balancer_type", skip_serializing_if = "Option::is_none")] 18 | pub load_balancer_type: Option>, 19 | } 20 | 21 | impl GetLoadBalancerTypeResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/load_balancer_types/{id} 23 | pub fn new() -> GetLoadBalancerTypeResponse { 24 | GetLoadBalancerTypeResponse { 25 | load_balancer_type: None, 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_location_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetLocationResponse : Response to GET https://api.hetzner.cloud/v1/locations/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetLocationResponse { 17 | #[serde(rename = "location")] 18 | pub location: Box, 19 | } 20 | 21 | impl GetLocationResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/locations/{id} 23 | pub fn new(location: models::Location) -> GetLocationResponse { 24 | GetLocationResponse { 25 | location: Box::new(location), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_metrics_for_loadbalancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetMetricsForLoadbalancerResponse : Response to GET https://api.hetzner.cloud/v1/load_balancers/{id}/metrics 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetMetricsForLoadbalancerResponse { 17 | #[serde(rename = "metrics")] 18 | pub metrics: Box, 19 | } 20 | 21 | impl GetMetricsForLoadbalancerResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/load_balancers/{id}/metrics 23 | pub fn new(metrics: models::Metrics) -> GetMetricsForLoadbalancerResponse { 24 | GetMetricsForLoadbalancerResponse { 25 | metrics: Box::new(metrics), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_metrics_for_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetMetricsForServerResponse : Response to GET https://api.hetzner.cloud/v1/servers/{id}/metrics 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetMetricsForServerResponse { 17 | #[serde(rename = "metrics")] 18 | pub metrics: Box, 19 | } 20 | 21 | impl GetMetricsForServerResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/servers/{id}/metrics 23 | pub fn new(metrics: models::Metrics) -> GetMetricsForServerResponse { 24 | GetMetricsForServerResponse { 25 | metrics: Box::new(metrics), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetNetworkResponse : Response to GET https://api.hetzner.cloud/v1/networks/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetNetworkResponse { 17 | #[serde(rename = "network", skip_serializing_if = "Option::is_none")] 18 | pub network: Option>, 19 | } 20 | 21 | impl GetNetworkResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/networks/{id} 23 | pub fn new() -> GetNetworkResponse { 24 | GetNetworkResponse { network: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/get_placementgroup_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetPlacementgroupResponse : Response to GET https://api.hetzner.cloud/v1/placement_groups/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetPlacementgroupResponse { 17 | #[serde(rename = "placement_group")] 18 | pub placement_group: Box, 19 | } 20 | 21 | impl GetPlacementgroupResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/placement_groups/{id} 23 | pub fn new(placement_group: models::PlacementGroup) -> GetPlacementgroupResponse { 24 | GetPlacementgroupResponse { 25 | placement_group: Box::new(placement_group), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_primary_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetPrimaryIpResponse : Response to GET https://api.hetzner.cloud/v1/primary_ips/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetPrimaryIpResponse { 17 | #[serde(rename = "primary_ip")] 18 | pub primary_ip: Box, 19 | } 20 | 21 | impl GetPrimaryIpResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/primary_ips/{id} 23 | pub fn new(primary_ip: models::PrimaryIp) -> GetPrimaryIpResponse { 24 | GetPrimaryIpResponse { 25 | primary_ip: Box::new(primary_ip), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetServerResponse : Response to GET https://api.hetzner.cloud/v1/servers/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetServerResponse { 17 | #[serde(rename = "server", skip_serializing_if = "Option::is_none")] 18 | pub server: Option>, 19 | } 20 | 21 | impl GetServerResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/servers/{id} 23 | pub fn new() -> GetServerResponse { 24 | GetServerResponse { server: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/get_server_type_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetServerTypeResponse : Response to GET https://api.hetzner.cloud/v1/server_types/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetServerTypeResponse { 17 | #[serde(rename = "server_type")] 18 | pub server_type: Box, 19 | } 20 | 21 | impl GetServerTypeResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/server_types/{id} 23 | pub fn new(server_type: models::ServerType) -> GetServerTypeResponse { 24 | GetServerTypeResponse { 25 | server_type: Box::new(server_type), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_ssh_key_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetSshKeyResponse : Response to GET https://api.hetzner.cloud/v1/ssh_keys/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetSshKeyResponse { 17 | #[serde(rename = "ssh_key")] 18 | pub ssh_key: Box, 19 | } 20 | 21 | impl GetSshKeyResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/ssh_keys/{id} 23 | pub fn new(ssh_key: models::SshKey) -> GetSshKeyResponse { 24 | GetSshKeyResponse { 25 | ssh_key: Box::new(ssh_key), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/get_volume_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// GetVolumeResponse : Response to GET https://api.hetzner.cloud/v1/volumes/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetVolumeResponse { 17 | #[serde(rename = "volume")] 18 | pub volume: Box, 19 | } 20 | 21 | impl GetVolumeResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/volumes/{id} 23 | pub fn new(volume: models::Volume) -> GetVolumeResponse { 24 | GetVolumeResponse { 25 | volume: Box::new(volume), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/ip_type.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// IpType : Floating IP type | Type of [Floating IP](#floating-ips) the price is for. | Type of [Primary IP](#primary-ips) the price is for. | [Primary IP](#primary-ips) type. 15 | /// Floating IP type | Type of [Floating IP](#floating-ips) the price is for. | Type of [Primary IP](#primary-ips) the price is for. | [Primary IP](#primary-ips) type. 16 | #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] 17 | pub enum IpType { 18 | #[serde(rename = "ipv4")] 19 | Ipv4, 20 | #[serde(rename = "ipv6")] 21 | Ipv6, 22 | } 23 | 24 | impl std::fmt::Display for IpType { 25 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 26 | match self { 27 | Self::Ipv4 => write!(f, "ipv4"), 28 | Self::Ipv6 => write!(f, "ipv6"), 29 | } 30 | } 31 | } 32 | 33 | impl Default for IpType { 34 | fn default() -> IpType { 35 | Self::Ipv4 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/models/ipv4.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// Ipv4 : IP address (v4) and its reverse DNS entry of this Server 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct Ipv4 { 17 | /// If the IP is blocked by our anti abuse dept 18 | #[serde(rename = "blocked")] 19 | pub blocked: bool, 20 | /// Reverse DNS PTR entry for the IPv4 addresses of this Server 21 | #[serde(rename = "dns_ptr")] 22 | pub dns_ptr: String, 23 | /// ID of the Primary IP. 24 | #[serde(rename = "id", skip_serializing_if = "Option::is_none")] 25 | pub id: Option, 26 | /// IP address (v4) of this Server 27 | #[serde(rename = "ip")] 28 | pub ip: String, 29 | } 30 | 31 | impl Ipv4 { 32 | /// IP address (v4) and its reverse DNS entry of this Server 33 | pub fn new(blocked: bool, dns_ptr: String, ip: String) -> Ipv4 { 34 | Ipv4 { 35 | blocked, 36 | dns_ptr, 37 | id: None, 38 | ip, 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/models/label_selector.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// LabelSelector : Configuration for type LabelSelector, required if type is `label_selector` 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct LabelSelector { 17 | /// Label selector | The selector. 18 | #[serde(rename = "selector")] 19 | pub selector: String, 20 | } 21 | 22 | impl LabelSelector { 23 | /// Configuration for type LabelSelector, required if type is `label_selector` 24 | pub fn new(selector: String) -> LabelSelector { 25 | LabelSelector { selector } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/list_actions_for_certificate_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForCertificateResponse : Response to GET https://api.hetzner.cloud/v1/certificates/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForCertificateResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForCertificateResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/certificates/{id}/actions 25 | pub fn new( 26 | actions: Vec, 27 | meta: models::Meta, 28 | ) -> ListActionsForCertificateResponse { 29 | ListActionsForCertificateResponse { 30 | actions, 31 | meta: Box::new(meta), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_actions_for_firewall_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForFirewallResponse : Response to GET https://api.hetzner.cloud/v1/firewalls/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForFirewallResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForFirewallResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/firewalls/{id}/actions 25 | pub fn new(actions: Vec, meta: models::Meta) -> ListActionsForFirewallResponse { 26 | ListActionsForFirewallResponse { 27 | actions, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_actions_for_floating_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForFloatingIpResponse : Response to GET https://api.hetzner.cloud/v1/floating_ips/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForFloatingIpResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForFloatingIpResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/floating_ips/{id}/actions 25 | pub fn new( 26 | actions: Vec, 27 | meta: models::Meta, 28 | ) -> ListActionsForFloatingIpResponse { 29 | ListActionsForFloatingIpResponse { 30 | actions, 31 | meta: Box::new(meta), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_actions_for_image_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForImageResponse : Response to GET https://api.hetzner.cloud/v1/images/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForImageResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForImageResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/images/{id}/actions 25 | pub fn new(actions: Vec, meta: models::Meta) -> ListActionsForImageResponse { 26 | ListActionsForImageResponse { 27 | actions, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_actions_for_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForLoadBalancerResponse : Response to GET https://api.hetzner.cloud/v1/load_balancers/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForLoadBalancerResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForLoadBalancerResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/load_balancers/{id}/actions 25 | pub fn new( 26 | actions: Vec, 27 | meta: models::Meta, 28 | ) -> ListActionsForLoadBalancerResponse { 29 | ListActionsForLoadBalancerResponse { 30 | actions, 31 | meta: Box::new(meta), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_actions_for_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForNetworkResponse : Response to GET https://api.hetzner.cloud/v1/networks/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForNetworkResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForNetworkResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/networks/{id}/actions 25 | pub fn new(actions: Vec, meta: models::Meta) -> ListActionsForNetworkResponse { 26 | ListActionsForNetworkResponse { 27 | actions, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_actions_for_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForServerResponse : Response to GET https://api.hetzner.cloud/v1/servers/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForServerResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForServerResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/servers/{id}/actions 25 | pub fn new(actions: Vec, meta: models::Meta) -> ListActionsForServerResponse { 26 | ListActionsForServerResponse { 27 | actions, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_actions_for_volume_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsForVolumeResponse : Response to GET https://api.hetzner.cloud/v1/volumes/{id}/actions 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsForVolumeResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsForVolumeResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/volumes/{id}/actions 25 | pub fn new(actions: Vec, meta: models::Meta) -> ListActionsForVolumeResponse { 26 | ListActionsForVolumeResponse { 27 | actions, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_actions_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListActionsResponse : Response to GET https://api.hetzner.cloud/v1/{resource}/actions/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListActionsResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListActionsResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/{resource}/actions/{id} 25 | pub fn new(actions: Vec, meta: models::Meta) -> ListActionsResponse { 26 | ListActionsResponse { 27 | actions, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_certificates_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListCertificatesResponse : Response to GET https://api.hetzner.cloud/v1/certificates 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListCertificatesResponse { 17 | #[serde(rename = "certificates")] 18 | pub certificates: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListCertificatesResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/certificates 25 | pub fn new( 26 | certificates: Vec, 27 | meta: models::Meta, 28 | ) -> ListCertificatesResponse { 29 | ListCertificatesResponse { 30 | certificates, 31 | meta: Box::new(meta), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_firewalls_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListFirewallsResponse : Response to GET https://api.hetzner.cloud/v1/firewalls 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListFirewallsResponse { 17 | #[serde(rename = "firewalls")] 18 | pub firewalls: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListFirewallsResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/firewalls 25 | pub fn new(firewalls: Vec, meta: models::Meta) -> ListFirewallsResponse { 26 | ListFirewallsResponse { 27 | firewalls, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_floating_ips_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListFloatingIpsResponse : Response to GET https://api.hetzner.cloud/v1/floating_ips 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListFloatingIpsResponse { 17 | #[serde(rename = "floating_ips")] 18 | pub floating_ips: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListFloatingIpsResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/floating_ips 25 | pub fn new( 26 | floating_ips: Vec, 27 | meta: models::Meta, 28 | ) -> ListFloatingIpsResponse { 29 | ListFloatingIpsResponse { 30 | floating_ips, 31 | meta: Box::new(meta), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_images_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListImagesResponse : Response to GET https://api.hetzner.cloud/v1/images 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListImagesResponse { 17 | #[serde(rename = "images")] 18 | pub images: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListImagesResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/images 25 | pub fn new(images: Vec, meta: models::Meta) -> ListImagesResponse { 26 | ListImagesResponse { 27 | images, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_isos_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListIsosResponse : Response to GET https://api.hetzner.cloud/v1/isos 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListIsosResponse { 17 | #[serde(rename = "isos")] 18 | pub isos: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListIsosResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/isos 25 | pub fn new(isos: Vec, meta: models::Meta) -> ListIsosResponse { 26 | ListIsosResponse { 27 | isos, 28 | meta: Box::new(meta), 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_load_balancer_types_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListLoadBalancerTypesResponse : Response to GET https://api.hetzner.cloud/v1/load_balancer_types 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListLoadBalancerTypesResponse { 17 | #[serde(rename = "load_balancer_types")] 18 | pub load_balancer_types: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListLoadBalancerTypesResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/load_balancer_types 25 | pub fn new( 26 | load_balancer_types: Vec, 27 | meta: models::Meta, 28 | ) -> ListLoadBalancerTypesResponse { 29 | ListLoadBalancerTypesResponse { 30 | load_balancer_types, 31 | meta: Box::new(meta), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_load_balancers_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListLoadBalancersResponse : Response to GET https://api.hetzner.cloud/v1/load_balancers 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListLoadBalancersResponse { 17 | #[serde(rename = "load_balancers")] 18 | pub load_balancers: Vec, 19 | #[serde(rename = "meta")] 20 | pub meta: Box, 21 | } 22 | 23 | impl ListLoadBalancersResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/load_balancers 25 | pub fn new( 26 | load_balancers: Vec, 27 | meta: models::Meta, 28 | ) -> ListLoadBalancersResponse { 29 | ListLoadBalancersResponse { 30 | load_balancers, 31 | meta: Box::new(meta), 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_locations_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListLocationsResponse : Response to GET https://api.hetzner.cloud/v1/locations 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListLocationsResponse { 17 | /// List of [Locations](#locations). 18 | #[serde(rename = "locations")] 19 | pub locations: Vec, 20 | #[serde(rename = "meta")] 21 | pub meta: Box, 22 | } 23 | 24 | impl ListLocationsResponse { 25 | /// Response to GET https://api.hetzner.cloud/v1/locations 26 | pub fn new(locations: Vec, meta: models::Meta) -> ListLocationsResponse { 27 | ListLocationsResponse { 28 | locations, 29 | meta: Box::new(meta), 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/models/list_networks_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListNetworksResponse : Response to GET https://api.hetzner.cloud/v1/networks 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListNetworksResponse { 17 | #[serde(rename = "meta")] 18 | pub meta: Box, 19 | #[serde(rename = "networks")] 20 | pub networks: Vec, 21 | } 22 | 23 | impl ListNetworksResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/networks 25 | pub fn new(meta: models::Meta, networks: Vec) -> ListNetworksResponse { 26 | ListNetworksResponse { 27 | meta: Box::new(meta), 28 | networks, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_placementgroups_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListPlacementgroupsResponse : Response to GET https://api.hetzner.cloud/v1/placement_groups 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListPlacementgroupsResponse { 17 | #[serde(rename = "meta")] 18 | pub meta: Box, 19 | #[serde(rename = "placement_groups")] 20 | pub placement_groups: Vec, 21 | } 22 | 23 | impl ListPlacementgroupsResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/placement_groups 25 | pub fn new( 26 | meta: models::Meta, 27 | placement_groups: Vec, 28 | ) -> ListPlacementgroupsResponse { 29 | ListPlacementgroupsResponse { 30 | meta: Box::new(meta), 31 | placement_groups, 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_prices_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListPricesResponse : Response to GET https://api.hetzner.cloud/v1/pricing 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListPricesResponse { 17 | #[serde(rename = "pricing")] 18 | pub pricing: Box, 19 | } 20 | 21 | impl ListPricesResponse { 22 | /// Response to GET https://api.hetzner.cloud/v1/pricing 23 | pub fn new(pricing: models::ListPricesResponsePricing) -> ListPricesResponse { 24 | ListPricesResponse { 25 | pricing: Box::new(pricing), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/list_prices_response_pricing_floating_ips.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct ListPricesResponsePricingFloatingIps { 16 | /// Price of the [Floating IP](#floating-ips) type per [Location](#locations). 17 | #[serde(rename = "prices")] 18 | pub prices: Vec, 19 | #[serde(rename = "type")] 20 | pub r#type: models::IpType, 21 | } 22 | 23 | impl ListPricesResponsePricingFloatingIps { 24 | pub fn new( 25 | prices: Vec, 26 | r#type: models::IpType, 27 | ) -> ListPricesResponsePricingFloatingIps { 28 | ListPricesResponsePricingFloatingIps { prices, r#type } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/list_prices_response_pricing_image.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListPricesResponsePricingImage : Price of [Images](#images). 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListPricesResponsePricingImage { 17 | #[serde(rename = "price_per_gb_month")] 18 | pub price_per_gb_month: Box, 19 | } 20 | 21 | impl ListPricesResponsePricingImage { 22 | /// Price of [Images](#images). 23 | pub fn new(price_per_gb_month: models::Price) -> ListPricesResponsePricingImage { 24 | ListPricesResponsePricingImage { 25 | price_per_gb_month: Box::new(price_per_gb_month), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/list_prices_response_pricing_load_balancer_types.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct ListPricesResponsePricingLoadBalancerTypes { 16 | /// ID of the [Load Balancer Types](#load-balancer-types) the price is for. 17 | #[serde(rename = "id")] 18 | pub id: i64, 19 | /// Name of the [Load Balancer Types](#load-balancer-types) the price is for. 20 | #[serde(rename = "name")] 21 | pub name: String, 22 | /// Price of the [Load Balancer Types](#load-balancer-types) per [Location](#locations). 23 | #[serde(rename = "prices")] 24 | pub prices: Vec, 25 | } 26 | 27 | impl ListPricesResponsePricingLoadBalancerTypes { 28 | pub fn new( 29 | id: i64, 30 | name: String, 31 | prices: Vec, 32 | ) -> ListPricesResponsePricingLoadBalancerTypes { 33 | ListPricesResponsePricingLoadBalancerTypes { id, name, prices } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/models/list_prices_response_pricing_primary_ips.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct ListPricesResponsePricingPrimaryIps { 16 | /// Price of the [Primary IP](#primary-ips) type per [Location](#locations). 17 | #[serde(rename = "prices")] 18 | pub prices: Vec, 19 | #[serde(rename = "type")] 20 | pub r#type: models::IpType, 21 | } 22 | 23 | impl ListPricesResponsePricingPrimaryIps { 24 | pub fn new( 25 | prices: Vec, 26 | r#type: models::IpType, 27 | ) -> ListPricesResponsePricingPrimaryIps { 28 | ListPricesResponsePricingPrimaryIps { prices, r#type } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/list_prices_response_pricing_server_backup.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListPricesResponsePricingServerBackup : Price of [Server](#servers) backups. 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListPricesResponsePricingServerBackup { 17 | /// Price increase of the [Server](#servers) base price in percentage. 18 | #[serde(rename = "percentage")] 19 | pub percentage: String, 20 | } 21 | 22 | impl ListPricesResponsePricingServerBackup { 23 | /// Price of [Server](#servers) backups. 24 | pub fn new(percentage: String) -> ListPricesResponsePricingServerBackup { 25 | ListPricesResponsePricingServerBackup { percentage } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/list_prices_response_pricing_server_types.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct ListPricesResponsePricingServerTypes { 16 | /// ID of the [Server Types](#server-types) the price is for. 17 | #[serde(rename = "id")] 18 | pub id: i64, 19 | /// Name of the [Server Types](#server-types) the price is for. 20 | #[serde(rename = "name")] 21 | pub name: String, 22 | /// Price of the [Server Types](#server-types) per [Location](#locations). 23 | #[serde(rename = "prices")] 24 | pub prices: Vec, 25 | } 26 | 27 | impl ListPricesResponsePricingServerTypes { 28 | pub fn new( 29 | id: i64, 30 | name: String, 31 | prices: Vec, 32 | ) -> ListPricesResponsePricingServerTypes { 33 | ListPricesResponsePricingServerTypes { id, name, prices } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/models/list_prices_response_pricing_volume.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListPricesResponsePricingVolume : Price of [Volumes](#volumes). 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListPricesResponsePricingVolume { 17 | #[serde(rename = "price_per_gb_month")] 18 | pub price_per_gb_month: Box, 19 | } 20 | 21 | impl ListPricesResponsePricingVolume { 22 | /// Price of [Volumes](#volumes). 23 | pub fn new(price_per_gb_month: models::Price) -> ListPricesResponsePricingVolume { 24 | ListPricesResponsePricingVolume { 25 | price_per_gb_month: Box::new(price_per_gb_month), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/list_primary_ips_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListPrimaryIpsResponse : Response to GET https://api.hetzner.cloud/v1/primary_ips 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListPrimaryIpsResponse { 17 | #[serde(rename = "meta")] 18 | pub meta: Box, 19 | #[serde(rename = "primary_ips")] 20 | pub primary_ips: Vec, 21 | } 22 | 23 | impl ListPrimaryIpsResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/primary_ips 25 | pub fn new(meta: models::Meta, primary_ips: Vec) -> ListPrimaryIpsResponse { 26 | ListPrimaryIpsResponse { 27 | meta: Box::new(meta), 28 | primary_ips, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_server_types_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListServerTypesResponse : Response to GET https://api.hetzner.cloud/v1/server_types 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListServerTypesResponse { 17 | #[serde(rename = "meta")] 18 | pub meta: Box, 19 | #[serde(rename = "server_types")] 20 | pub server_types: Vec, 21 | } 22 | 23 | impl ListServerTypesResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/server_types 25 | pub fn new( 26 | meta: models::Meta, 27 | server_types: Vec, 28 | ) -> ListServerTypesResponse { 29 | ListServerTypesResponse { 30 | meta: Box::new(meta), 31 | server_types, 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/models/list_servers_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListServersResponse : Response to GET https://api.hetzner.cloud/v1/servers 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListServersResponse { 17 | #[serde(rename = "meta")] 18 | pub meta: Box, 19 | #[serde(rename = "servers")] 20 | pub servers: Vec, 21 | } 22 | 23 | impl ListServersResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/servers 25 | pub fn new(meta: models::Meta, servers: Vec) -> ListServersResponse { 26 | ListServersResponse { 27 | meta: Box::new(meta), 28 | servers, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_ssh_keys_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListSshKeysResponse : Response to GET https://api.hetzner.cloud/v1/ssh_keys 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListSshKeysResponse { 17 | #[serde(rename = "meta")] 18 | pub meta: Box, 19 | #[serde(rename = "ssh_keys")] 20 | pub ssh_keys: Vec, 21 | } 22 | 23 | impl ListSshKeysResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/ssh_keys 25 | pub fn new(meta: models::Meta, ssh_keys: Vec) -> ListSshKeysResponse { 26 | ListSshKeysResponse { 27 | meta: Box::new(meta), 28 | ssh_keys, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/list_volumes_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ListVolumesResponse : Response to GET https://api.hetzner.cloud/v1/volumes 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ListVolumesResponse { 17 | #[serde(rename = "meta")] 18 | pub meta: Box, 19 | #[serde(rename = "volumes")] 20 | pub volumes: Vec, 21 | } 22 | 23 | impl ListVolumesResponse { 24 | /// Response to GET https://api.hetzner.cloud/v1/volumes 25 | pub fn new(meta: models::Meta, volumes: Vec) -> ListVolumesResponse { 26 | ListVolumesResponse { 27 | meta: Box::new(meta), 28 | volumes, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/load_balancer_algorithm.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// LoadBalancerAlgorithm : Algorithm of the Load Balancer 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct LoadBalancerAlgorithm { 17 | /// Type of the algorithm. 18 | #[serde(rename = "type")] 19 | pub r#type: Type, 20 | } 21 | 22 | impl LoadBalancerAlgorithm { 23 | /// Algorithm of the Load Balancer 24 | pub fn new(r#type: Type) -> LoadBalancerAlgorithm { 25 | LoadBalancerAlgorithm { r#type } 26 | } 27 | } 28 | /// Type of the algorithm. 29 | #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] 30 | pub enum Type { 31 | #[serde(rename = "least_connections")] 32 | LeastConnections, 33 | #[serde(rename = "round_robin")] 34 | RoundRobin, 35 | } 36 | 37 | impl Default for Type { 38 | fn default() -> Type { 39 | Self::LeastConnections 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/models/load_balancer_private_net.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct LoadBalancerPrivateNet { 16 | /// IP address (v4) of this Load Balancer in this Network 17 | #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] 18 | pub ip: Option, 19 | /// ID of the Network 20 | #[serde(rename = "network", skip_serializing_if = "Option::is_none")] 21 | pub network: Option, 22 | } 23 | 24 | impl LoadBalancerPrivateNet { 25 | pub fn new() -> LoadBalancerPrivateNet { 26 | LoadBalancerPrivateNet { 27 | ip: None, 28 | network: None, 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/models/load_balancer_public_net.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// LoadBalancerPublicNet : Public network information 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct LoadBalancerPublicNet { 17 | /// Public Interface enabled or not 18 | #[serde(rename = "enabled")] 19 | pub enabled: bool, 20 | #[serde(rename = "ipv4")] 21 | pub ipv4: Box, 22 | #[serde(rename = "ipv6")] 23 | pub ipv6: Box, 24 | } 25 | 26 | impl LoadBalancerPublicNet { 27 | /// Public network information 28 | pub fn new( 29 | enabled: bool, 30 | ipv4: models::LoadBalancerPublicNetIpv4, 31 | ipv6: models::LoadBalancerPublicNetIpv6, 32 | ) -> LoadBalancerPublicNet { 33 | LoadBalancerPublicNet { 34 | enabled, 35 | ipv4: Box::new(ipv4), 36 | ipv6: Box::new(ipv6), 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/models/meta.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct Meta { 16 | #[serde(rename = "pagination")] 17 | pub pagination: Box, 18 | } 19 | 20 | impl Meta { 21 | pub fn new(pagination: models::Pagination) -> Meta { 22 | Meta { 23 | pagination: Box::new(pagination), 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/metrics_time_series.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct MetricsTimeSeries { 16 | /// Metrics Timestamps with values 17 | #[serde(rename = "values")] 18 | pub values: Vec>, 19 | } 20 | 21 | impl MetricsTimeSeries { 22 | pub fn new(values: Vec>) -> MetricsTimeSeries { 23 | MetricsTimeSeries { values } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/models/metrics_time_series_value.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] 15 | #[serde(untagged)] 16 | pub enum MetricsTimeSeriesValue { 17 | Number(f64), 18 | String(String), 19 | } 20 | 21 | impl Default for MetricsTimeSeriesValue { 22 | fn default() -> Self { 23 | Self::Number(Default::default()) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/models/power_off_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// PowerOffServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/poweroff 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PowerOffServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl PowerOffServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/poweroff 23 | pub fn new(action: models::Action) -> PowerOffServerResponse { 24 | PowerOffServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/power_on_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// PowerOnServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/poweron 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PowerOnServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl PowerOnServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/poweron 23 | pub fn new(action: models::Action) -> PowerOnServerResponse { 24 | PowerOnServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/price_per_time_monthly.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct PricePerTimeMonthly { 16 | /// Name of the [Location](#locations) the price is for. 17 | #[serde(rename = "location")] 18 | pub location: String, 19 | #[serde(rename = "price_monthly")] 20 | pub price_monthly: Box, 21 | } 22 | 23 | impl PricePerTimeMonthly { 24 | pub fn new(location: String, price_monthly: models::Price) -> PricePerTimeMonthly { 25 | PricePerTimeMonthly { 26 | location, 27 | price_monthly: Box::new(price_monthly), 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/price_per_time_without_traffic.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct PricePerTimeWithoutTraffic { 16 | /// Name of the [Location](#locations) the price is for. 17 | #[serde(rename = "location")] 18 | pub location: String, 19 | #[serde(rename = "price_hourly")] 20 | pub price_hourly: Box, 21 | #[serde(rename = "price_monthly")] 22 | pub price_monthly: Box, 23 | } 24 | 25 | impl PricePerTimeWithoutTraffic { 26 | pub fn new( 27 | location: String, 28 | price_hourly: models::Price, 29 | price_monthly: models::Price, 30 | ) -> PricePerTimeWithoutTraffic { 31 | PricePerTimeWithoutTraffic { 32 | location, 33 | price_hourly: Box::new(price_hourly), 34 | price_monthly: Box::new(price_monthly), 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/models/protection.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// Protection : Protection configuration for the Resource 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct Protection { 17 | /// Prevent the Resource from being deleted. 18 | #[serde(rename = "delete")] 19 | pub delete: bool, 20 | } 21 | 22 | impl Protection { 23 | /// Protection configuration for the Resource 24 | pub fn new(delete: bool) -> Protection { 25 | Protection { delete } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/rebuild_server_from_image_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// RebuildServerFromImageRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/rebuild 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RebuildServerFromImageRequest { 17 | /// ID or name of Image to rebuilt from. 18 | #[serde(rename = "image")] 19 | pub image: String, 20 | } 21 | 22 | impl RebuildServerFromImageRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/rebuild 24 | pub fn new(image: String) -> RebuildServerFromImageRequest { 25 | RebuildServerFromImageRequest { image } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/remove_from_placement_group_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// RemoveFromPlacementGroupResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/remove_from_placement_group 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RemoveFromPlacementGroupResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl RemoveFromPlacementGroupResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/remove_from_placement_group 23 | pub fn new(action: models::Action) -> RemoveFromPlacementGroupResponse { 24 | RemoveFromPlacementGroupResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/remove_from_resources_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// RemoveFromResourcesRequest : Request for POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/remove_from_resources 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RemoveFromResourcesRequest { 17 | /// Resources to remove the [Firewall](#firewalls) from. 18 | #[serde(rename = "remove_from")] 19 | pub remove_from: Vec, 20 | } 21 | 22 | impl RemoveFromResourcesRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/remove_from_resources 24 | pub fn new(remove_from: Vec) -> RemoveFromResourcesRequest { 25 | RemoveFromResourcesRequest { remove_from } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/remove_from_resources_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// RemoveFromResourcesResponse : Response to POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/remove_from_resources 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RemoveFromResourcesResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | } 20 | 21 | impl RemoveFromResourcesResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/remove_from_resources 23 | pub fn new(actions: Vec) -> RemoveFromResourcesResponse { 24 | RemoveFromResourcesResponse { actions } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/remove_target_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// RemoveTargetResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/remove_target 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RemoveTargetResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl RemoveTargetResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/remove_target 23 | pub fn new(action: models::Action) -> RemoveTargetResponse { 24 | RemoveTargetResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_certificate_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceCertificateRequest : Request for PUT https://api.hetzner.cloud/v1/certificates/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceCertificateRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// New Certificate name 21 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 22 | pub name: Option, 23 | } 24 | 25 | impl ReplaceCertificateRequest { 26 | /// Request for PUT https://api.hetzner.cloud/v1/certificates/{id} 27 | pub fn new() -> ReplaceCertificateRequest { 28 | ReplaceCertificateRequest { 29 | labels: None, 30 | name: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/replace_certificate_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceCertificateResponse : Response to PUT https://api.hetzner.cloud/v1/certificates/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceCertificateResponse { 17 | #[serde(rename = "certificate")] 18 | pub certificate: Box, 19 | } 20 | 21 | impl ReplaceCertificateResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/certificates/{id} 23 | pub fn new(certificate: models::Certificate) -> ReplaceCertificateResponse { 24 | ReplaceCertificateResponse { 25 | certificate: Box::new(certificate), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_firewall_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceFirewallRequest : Request for PUT https://api.hetzner.cloud/v1/firewalls/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceFirewallRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// Name of the [Firewall](#firewalls). Limited to a maximum of 128 characters. Must be unique per Project. 21 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 22 | pub name: Option, 23 | } 24 | 25 | impl ReplaceFirewallRequest { 26 | /// Request for PUT https://api.hetzner.cloud/v1/firewalls/{id} 27 | pub fn new() -> ReplaceFirewallRequest { 28 | ReplaceFirewallRequest { 29 | labels: None, 30 | name: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/replace_firewall_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceFirewallResponse : Response to PUT https://api.hetzner.cloud/v1/firewalls/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceFirewallResponse { 17 | #[serde(rename = "firewall")] 18 | pub firewall: Box, 19 | } 20 | 21 | impl ReplaceFirewallResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/firewalls/{id} 23 | pub fn new(firewall: models::Firewall) -> ReplaceFirewallResponse { 24 | ReplaceFirewallResponse { 25 | firewall: Box::new(firewall), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_floating_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceFloatingIpResponse : Response to PUT https://api.hetzner.cloud/v1/floating_ips/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceFloatingIpResponse { 17 | #[serde(rename = "floating_ip")] 18 | pub floating_ip: Box, 19 | } 20 | 21 | impl ReplaceFloatingIpResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/floating_ips/{id} 23 | pub fn new(floating_ip: models::FloatingIp) -> ReplaceFloatingIpResponse { 24 | ReplaceFloatingIpResponse { 25 | floating_ip: Box::new(floating_ip), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_image_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceImageResponse : Response to PUT https://api.hetzner.cloud/v1/images/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceImageResponse { 17 | #[serde(rename = "image", skip_serializing_if = "Option::is_none")] 18 | pub image: Option>, 19 | } 20 | 21 | impl ReplaceImageResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/images/{id} 23 | pub fn new() -> ReplaceImageResponse { 24 | ReplaceImageResponse { image: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/replace_load_balancer_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceLoadBalancerRequest : Request for PUT https://api.hetzner.cloud/v1/load_balancers/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceLoadBalancerRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// New Load Balancer name 21 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 22 | pub name: Option, 23 | } 24 | 25 | impl ReplaceLoadBalancerRequest { 26 | /// Request for PUT https://api.hetzner.cloud/v1/load_balancers/{id} 27 | pub fn new() -> ReplaceLoadBalancerRequest { 28 | ReplaceLoadBalancerRequest { 29 | labels: None, 30 | name: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/replace_load_balancer_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceLoadBalancerResponse : Response to PUT https://api.hetzner.cloud/v1/load_balancers/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceLoadBalancerResponse { 17 | #[serde(rename = "load_balancer")] 18 | pub load_balancer: Box, 19 | } 20 | 21 | impl ReplaceLoadBalancerResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/load_balancers/{id} 23 | pub fn new(load_balancer: models::LoadBalancer) -> ReplaceLoadBalancerResponse { 24 | ReplaceLoadBalancerResponse { 25 | load_balancer: Box::new(load_balancer), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_network_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceNetworkResponse : Response to PUT https://api.hetzner.cloud/v1/networks/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceNetworkResponse { 17 | #[serde(rename = "network", skip_serializing_if = "Option::is_none")] 18 | pub network: Option>, 19 | } 20 | 21 | impl ReplaceNetworkResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/networks/{id} 23 | pub fn new() -> ReplaceNetworkResponse { 24 | ReplaceNetworkResponse { network: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/replace_placementgroup_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplacePlacementgroupRequest : Request for PUT https://api.hetzner.cloud/v1/placement_groups/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplacePlacementgroupRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// New PlacementGroup name 21 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 22 | pub name: Option, 23 | } 24 | 25 | impl ReplacePlacementgroupRequest { 26 | /// Request for PUT https://api.hetzner.cloud/v1/placement_groups/{id} 27 | pub fn new() -> ReplacePlacementgroupRequest { 28 | ReplacePlacementgroupRequest { 29 | labels: None, 30 | name: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/replace_placementgroup_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplacePlacementgroupResponse : Response to PUT https://api.hetzner.cloud/v1/placement_groups/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplacePlacementgroupResponse { 17 | #[serde(rename = "placement_group")] 18 | pub placement_group: Box, 19 | } 20 | 21 | impl ReplacePlacementgroupResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/placement_groups/{id} 23 | pub fn new(placement_group: models::PlacementGroup) -> ReplacePlacementgroupResponse { 24 | ReplacePlacementgroupResponse { 25 | placement_group: Box::new(placement_group), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_primary_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplacePrimaryIpResponse : Response to PUT https://api.hetzner.cloud/v1/primary_ips/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplacePrimaryIpResponse { 17 | #[serde(rename = "primary_ip")] 18 | pub primary_ip: Box, 19 | } 20 | 21 | impl ReplacePrimaryIpResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/primary_ips/{id} 23 | pub fn new(primary_ip: models::PrimaryIp) -> ReplacePrimaryIpResponse { 24 | ReplacePrimaryIpResponse { 25 | primary_ip: Box::new(primary_ip), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_server_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceServerRequest : Request for PUT https://api.hetzner.cloud/v1/servers/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceServerRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// New name to set 21 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 22 | pub name: Option, 23 | } 24 | 25 | impl ReplaceServerRequest { 26 | /// Request for PUT https://api.hetzner.cloud/v1/servers/{id} 27 | pub fn new() -> ReplaceServerRequest { 28 | ReplaceServerRequest { 29 | labels: None, 30 | name: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/replace_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceServerResponse : Response to PUT https://api.hetzner.cloud/v1/servers/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceServerResponse { 17 | #[serde(rename = "server", skip_serializing_if = "Option::is_none")] 18 | pub server: Option>, 19 | } 20 | 21 | impl ReplaceServerResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/servers/{id} 23 | pub fn new() -> ReplaceServerResponse { 24 | ReplaceServerResponse { server: None } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/replace_ssh_key_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceSshKeyRequest : Request for PUT https://api.hetzner.cloud/v1/ssh_keys/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceSshKeyRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// New name Name to set 21 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 22 | pub name: Option, 23 | } 24 | 25 | impl ReplaceSshKeyRequest { 26 | /// Request for PUT https://api.hetzner.cloud/v1/ssh_keys/{id} 27 | pub fn new() -> ReplaceSshKeyRequest { 28 | ReplaceSshKeyRequest { 29 | labels: None, 30 | name: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/replace_ssh_key_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceSshKeyResponse : Response to PUT https://api.hetzner.cloud/v1/ssh_keys/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceSshKeyResponse { 17 | #[serde(rename = "ssh_key")] 18 | pub ssh_key: Box, 19 | } 20 | 21 | impl ReplaceSshKeyResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/ssh_keys/{id} 23 | pub fn new(ssh_key: models::SshKey) -> ReplaceSshKeyResponse { 24 | ReplaceSshKeyResponse { 25 | ssh_key: Box::new(ssh_key), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/replace_volume_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceVolumeRequest : Request for PUT https://api.hetzner.cloud/v1/volumes/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceVolumeRequest { 17 | /// User-defined labels (`key/value` pairs) for the Resource. For more information, see \"[Labels](#labels)\". 18 | #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] 19 | pub labels: Option>, 20 | /// New Volume name 21 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 22 | pub name: Option, 23 | } 24 | 25 | impl ReplaceVolumeRequest { 26 | /// Request for PUT https://api.hetzner.cloud/v1/volumes/{id} 27 | pub fn new() -> ReplaceVolumeRequest { 28 | ReplaceVolumeRequest { 29 | labels: None, 30 | name: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/models/replace_volume_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ReplaceVolumeResponse : Response to PUT https://api.hetzner.cloud/v1/volumes/{id} 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ReplaceVolumeResponse { 17 | #[serde(rename = "volume")] 18 | pub volume: Box, 19 | } 20 | 21 | impl ReplaceVolumeResponse { 22 | /// Response to PUT https://api.hetzner.cloud/v1/volumes/{id} 23 | pub fn new(volume: models::Volume) -> ReplaceVolumeResponse { 24 | ReplaceVolumeResponse { 25 | volume: Box::new(volume), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/reset_root_password_of_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ResetRootPasswordOfServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/reset_password 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ResetRootPasswordOfServerResponse { 17 | #[serde(rename = "action", skip_serializing_if = "Option::is_none")] 18 | pub action: Option>, 19 | /// Password that will be set for this Server once the Action succeeds 20 | #[serde(rename = "root_password", skip_serializing_if = "Option::is_none")] 21 | pub root_password: Option, 22 | } 23 | 24 | impl ResetRootPasswordOfServerResponse { 25 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/reset_password 26 | pub fn new() -> ResetRootPasswordOfServerResponse { 27 | ResetRootPasswordOfServerResponse { 28 | action: None, 29 | root_password: None, 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/models/reset_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ResetServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/reset 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ResetServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ResetServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/reset 23 | pub fn new(action: models::Action) -> ResetServerResponse { 24 | ResetServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/resize_volume_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ResizeVolumeRequest : Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/resize 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ResizeVolumeRequest { 17 | /// New Volume size in GB (must be greater than current size) 18 | #[serde(rename = "size")] 19 | pub size: f64, 20 | } 21 | 22 | impl ResizeVolumeRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/resize 24 | pub fn new(size: f64) -> ResizeVolumeRequest { 25 | ResizeVolumeRequest { size } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/resize_volume_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ResizeVolumeResponse : Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/resize 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ResizeVolumeResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ResizeVolumeResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/volumes/{id}/actions/resize 23 | pub fn new(action: models::Action) -> ResizeVolumeResponse { 24 | ResizeVolumeResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/resource.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 15 | pub struct Resource { 16 | /// ID of the Resource. | ID of resource referenced 17 | #[serde(rename = "id")] 18 | pub id: i64, 19 | /// Type of the Resource. | Type of resource referenced 20 | #[serde(rename = "type")] 21 | pub r#type: String, 22 | } 23 | 24 | impl Resource { 25 | pub fn new(id: i64, r#type: String) -> Resource { 26 | Resource { id, r#type } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/resource_id.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ResourceId : ID of the Resource 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ResourceId { 17 | /// ID of the Server. | ID of the [Server](#servers). | ID of the Server 18 | #[serde(rename = "id")] 19 | pub id: i64, 20 | } 21 | 22 | impl ResourceId { 23 | /// ID of the Resource 24 | pub fn new(id: i64) -> ResourceId { 25 | ResourceId { id } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/retry_issuance_or_renewal_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// RetryIssuanceOrRenewalResponse : Response to POST https://api.hetzner.cloud/v1/certificates/{id}/actions/retry 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RetryIssuanceOrRenewalResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl RetryIssuanceOrRenewalResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/certificates/{id}/actions/retry 23 | pub fn new(action: models::Action) -> RetryIssuanceOrRenewalResponse { 24 | RetryIssuanceOrRenewalResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/server_protection.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ServerProtection : Protection configuration for the Server 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ServerProtection { 17 | /// If true, prevents the Server from being deleted 18 | #[serde(rename = "delete")] 19 | pub delete: bool, 20 | /// If true, prevents the Server from being rebuilt 21 | #[serde(rename = "rebuild")] 22 | pub rebuild: bool, 23 | } 24 | 25 | impl ServerProtection { 26 | /// Protection configuration for the Server 27 | pub fn new(delete: bool, rebuild: bool) -> ServerProtection { 28 | ServerProtection { delete, rebuild } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/models/set_rules_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// SetRulesRequest : Request for POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/set_rules 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SetRulesRequest { 17 | /// Array of rules. Rules are limited to 50 entries per [Firewall](#firewalls) and [500 effective rules](https://docs.hetzner.com/cloud/firewalls/overview#limits). Existing rules will be replaced. 18 | #[serde(rename = "rules")] 19 | pub rules: Vec, 20 | } 21 | 22 | impl SetRulesRequest { 23 | /// Request for POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/set_rules 24 | pub fn new(rules: Vec) -> SetRulesRequest { 25 | SetRulesRequest { rules } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/models/set_rules_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// SetRulesResponse : Response to POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/set_rules 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SetRulesResponse { 17 | #[serde(rename = "actions")] 18 | pub actions: Vec, 19 | } 20 | 21 | impl SetRulesResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/firewalls/{id}/actions/set_rules 23 | pub fn new(actions: Vec) -> SetRulesResponse { 24 | SetRulesResponse { actions } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/models/shutdown_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// ShutdownServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/shutdown 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ShutdownServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl ShutdownServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/shutdown 23 | pub fn new(action: models::Action) -> ShutdownServerResponse { 24 | ShutdownServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/soft_reboot_server_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// SoftRebootServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/reboot 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SoftRebootServerResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl SoftRebootServerResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/reboot 23 | pub fn new(action: models::Action) -> SoftRebootServerResponse { 24 | SoftRebootServerResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/unassign_floating_ip_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// UnassignFloatingIpResponse : Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/unassign 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct UnassignFloatingIpResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl UnassignFloatingIpResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/floating_ips/{id}/actions/unassign 23 | pub fn new(action: models::Action) -> UnassignFloatingIpResponse { 24 | UnassignFloatingIpResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/unassign_primary_ip_from_resource_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// UnassignPrimaryIpFromResourceResponse : Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/unassign 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct UnassignPrimaryIpFromResourceResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl UnassignPrimaryIpFromResourceResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/unassign 23 | pub fn new(action: models::Action) -> UnassignPrimaryIpFromResourceResponse { 24 | UnassignPrimaryIpFromResourceResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/models/update_service_response.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Hetzner Cloud API 3 | * 4 | * Copied from the official API documentation for the Public Hetzner Cloud. 5 | * 6 | * The version of the OpenAPI document: 0.22.0 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use crate::models; 12 | use serde::{Deserialize, Serialize}; 13 | 14 | /// UpdateServiceResponse : Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/update_service 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct UpdateServiceResponse { 17 | #[serde(rename = "action")] 18 | pub action: Box, 19 | } 20 | 21 | impl UpdateServiceResponse { 22 | /// Response to POST https://api.hetzner.cloud/v1/load_balancers/{id}/actions/update_service 23 | pub fn new(action: models::Action) -> UpdateServiceResponse { 24 | UpdateServiceResponse { 25 | action: Box::new(action), 26 | } 27 | } 28 | } 29 | --------------------------------------------------------------------------------