/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 3.1.0 (3.1)
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CablePath {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(rename = "origin_type", skip_serializing_if = "Option::is_none")]
    pub origin_type: Option<String>,
    #[serde(rename = "origin", skip_serializing_if = "Option::is_none")]
    pub origin: Option<Box<crate::models::PathEndpoint>>,
    #[serde(rename = "destination_type", skip_serializing_if = "Option::is_none")]
    pub destination_type: Option<String>,
    #[serde(
        rename = "destination",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub destination: Option<Option<Box<crate::models::PathEndpoint>>>,
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<Vec<crate::models::CableTermination>>,
    #[serde(rename = "origin_id")]
    pub origin_id: uuid::Uuid,
    #[serde(
        rename = "destination_id",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub destination_id: Option<Option<uuid::Uuid>>,
    #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
    #[serde(rename = "is_split", skip_serializing_if = "Option::is_none")]
    pub is_split: Option<bool>,
}

impl CablePath {
    pub fn new(origin_id: uuid::Uuid) -> CablePath {
        CablePath {
            id: None,
            origin_type: None,
            origin: None,
            destination_type: None,
            destination: None,
            path: None,
            origin_id,
            destination_id: None,
            is_active: None,
            is_split: None,
        }
    }
}
