hcloud/models/
load_balancer_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.28.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct LoadBalancerType {
16    /// Point in time when the Load Balancer type is deprecated (in ISO-8601 format).
17    #[serde(rename = "deprecated", deserialize_with = "Option::deserialize")]
18    pub deprecated: Option<String>,
19    /// Description of the Load Balancer type.
20    #[serde(rename = "description")]
21    pub description: String,
22    /// ID of the Load Balancer type.
23    #[serde(rename = "id")]
24    pub id: i64,
25    /// Number of SSL Certificates that can be assigned to a single Load Balancer.
26    #[serde(rename = "max_assigned_certificates")]
27    pub max_assigned_certificates: i64,
28    /// Number of maximum simultaneous open connections.
29    #[serde(rename = "max_connections")]
30    pub max_connections: i64,
31    /// Number of services a Load Balancer of this type can have.
32    #[serde(rename = "max_services")]
33    pub max_services: i64,
34    /// Number of targets a single Load Balancer can have.
35    #[serde(rename = "max_targets")]
36    pub max_targets: i64,
37    /// Unique identifier of the Load Balancer type.
38    #[serde(rename = "name")]
39    pub name: String,
40    /// Price per Location.
41    #[serde(rename = "prices")]
42    pub prices: Vec<models::PricePerTime>,
43}
44
45impl LoadBalancerType {
46    pub fn new(
47        deprecated: Option<String>,
48        description: String,
49        id: i64,
50        max_assigned_certificates: i64,
51        max_connections: i64,
52        max_services: i64,
53        max_targets: i64,
54        name: String,
55        prices: Vec<models::PricePerTime>,
56    ) -> LoadBalancerType {
57        LoadBalancerType {
58            deprecated,
59            description,
60            id,
61            max_assigned_certificates,
62            max_connections,
63            max_services,
64            max_targets,
65            name,
66            prices,
67        }
68    }
69}