autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Healthcare
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2024-04-01
 * Contact: healthcare@stedi.com
 * Generated by: https://openapi-generator.tech
 */

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

/// RelationToSubscriberCodeName : The name of the `relationToSubscriberCode`.
/// The name of the `relationToSubscriberCode`.
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RelationToSubscriberCodeName {
    #[serde(rename = "Spouse")]
    Spouse,
    #[serde(rename = "Child")]
    Child,
    #[serde(rename = "Employee")]
    Employee,
    #[serde(rename = "Unknown")]
    Unknown,
    #[serde(rename = "Organ Donor")]
    OrganDonor,
    #[serde(rename = "Cadaver Donor")]
    CadaverDonor,
    #[serde(rename = "Life Partner")]
    LifePartner,
    #[serde(rename = "Other Relationship")]
    OtherRelationship,
    /// Any value not defined in the spec (payers may return non-compliant values).
    #[serde(untagged)]
    UnknownValue(String),

}

impl std::fmt::Display for RelationToSubscriberCodeName {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Spouse => write!(f, "Spouse"),
            Self::Child => write!(f, "Child"),
            Self::Employee => write!(f, "Employee"),
            Self::Unknown => write!(f, "Unknown"),
            Self::OrganDonor => write!(f, "Organ Donor"),
            Self::CadaverDonor => write!(f, "Cadaver Donor"),
            Self::LifePartner => write!(f, "Life Partner"),
            Self::OtherRelationship => write!(f, "Other Relationship"),
            Self::UnknownValue(s) => write!(f, "{s}"),
        }
    }
}

impl Default for RelationToSubscriberCodeName {
    fn default() -> RelationToSubscriberCodeName {
        Self::Spouse
    }
}