/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 4b3f595
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// LoadBalancerSelectedTarget : Resolved label selector target Servers. Only present for type \"label_selector\".
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LoadBalancerSelectedTarget {
    /// List of health statuses of the services on this target. Only present for target types \"server\" and \"ip\".
    #[serde(rename = "health_status", skip_serializing_if = "Option::is_none")]
    pub health_status: Option<Vec<models::LoadBalancerTargetHealthStatus>>,
    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
    pub server: Option<Box<models::ResourceId>>,
    /// Type of the resource. Here always \"server\".
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    /// Use the private network IP instead of the public IP. Only present for target types \"server\" and \"label_selector\".
    #[serde(rename = "use_private_ip", skip_serializing_if = "Option::is_none")]
    pub use_private_ip: Option<bool>,
}

impl LoadBalancerSelectedTarget {
    /// Resolved label selector target Servers. Only present for type \"label_selector\".
    pub fn new() -> LoadBalancerSelectedTarget {
        LoadBalancerSelectedTarget {
            health_status: None,
            server: None,
            r#type: None,
            use_private_ip: None,
        }
    }
}
