hcloud 0.25.0

Unofficial Rust crate for accessing the Hetzner Cloud API
Documentation
/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 0.28.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListPricesResponsePricing {
    /// Currency the returned prices are expressed in, coded according to [ISO 4217](https://wikipedia.org/wiki/ISO_4217).
    #[serde(rename = "currency")]
    pub currency: String,
    #[serde(rename = "floating_ip")]
    pub floating_ip: Box<models::ListPricesResponsePricingFloatingIp>,
    /// Price of Floating IPs per type and per Location.
    #[serde(rename = "floating_ips")]
    pub floating_ips: Vec<models::ListPricesResponsePricingFloatingIps>,
    #[serde(rename = "image")]
    pub image: Box<models::ListPricesResponsePricingImage>,
    /// Price of Load Balancer per type and per Location.
    #[serde(rename = "load_balancer_types")]
    pub load_balancer_types: Vec<models::ListPricesResponsePricingLoadBalancerTypes>,
    /// Price of Primary IPs per type and per Location.
    #[serde(rename = "primary_ips")]
    pub primary_ips: Vec<models::ListPricesResponsePricingPrimaryIps>,
    #[serde(rename = "server_backup")]
    pub server_backup: Box<models::ListPricesResponsePricingServerBackup>,
    /// Price of Server per type and per Location.
    #[serde(rename = "server_types")]
    pub server_types: Vec<models::ListPricesResponsePricingServerTypes>,
    /// VAT rate used for calculating prices with VAT.
    #[serde(rename = "vat_rate")]
    pub vat_rate: String,
    #[serde(rename = "volume")]
    pub volume: Box<models::ListPricesResponsePricingVolume>,
}

impl ListPricesResponsePricing {
    pub fn new(
        currency: String,
        floating_ip: models::ListPricesResponsePricingFloatingIp,
        floating_ips: Vec<models::ListPricesResponsePricingFloatingIps>,
        image: models::ListPricesResponsePricingImage,
        load_balancer_types: Vec<models::ListPricesResponsePricingLoadBalancerTypes>,
        primary_ips: Vec<models::ListPricesResponsePricingPrimaryIps>,
        server_backup: models::ListPricesResponsePricingServerBackup,
        server_types: Vec<models::ListPricesResponsePricingServerTypes>,
        vat_rate: String,
        volume: models::ListPricesResponsePricingVolume,
    ) -> ListPricesResponsePricing {
        ListPricesResponsePricing {
            currency,
            floating_ip: Box::new(floating_ip),
            floating_ips,
            image: Box::new(image),
            load_balancer_types,
            primary_ips,
            server_backup: Box::new(server_backup),
            server_types,
            vat_rate,
            volume: Box::new(volume),
        }
    }
}