tmflib 0.1.37

Interface library for processing TMF payloads
Documentation
use crate::common::entity::Entity;
use crate::TimePeriod;
use serde::{Deserialize, Serialize};

///Performance Indicator Specification Relationship Full Value Object
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct PerformanceIndicatorSpecRelationshipFvo {
    ///Base entity schema for use in TMForum Open-APIs. Property.
    #[serde(flatten)]
    pub entity: Entity,
    /// The type of relationship such as 'dependsOn', 'relatesTo', 'isComposedOf'
    #[serde(rename = "relationshipType")]
    pub relationship_type: String,
    ///The association role for this service specification
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role: Option<String>,
    ///A period of time, either as a deadline (endDateTime only) a startDateTime only, or both
    #[serde(rename = "validFor")]
    pub valid_for: TimePeriod,
}
impl std::fmt::Display for PerformanceIndicatorSpecRelationshipFvo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
        write!(f, "{}", serde_json::to_string(self).unwrap())
    }
}
impl std::ops::Deref for PerformanceIndicatorSpecRelationshipFvo {
    type Target = Entity;
    fn deref(&self) -> &Self::Target {
        &self.entity
    }
}
impl std::ops::DerefMut for PerformanceIndicatorSpecRelationshipFvo {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.entity
    }
}