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};

/// DependentGender : Code indiciating the patient's gender. Can be set to `F` - Female, `M` - Male, or `U` - Unknown.  You should set this property to `U` when the patient declines to answer or does not identify as male or female. Note that some payers may reject the claim if the patient's gender doesn't match the gender they have recorded in their member records.
/// Code indiciating the patient's gender. Can be set to `F` - Female, `M` - Male, or `U` - Unknown.  You should set this property to `U` when the patient declines to answer or does not identify as male or female. Note that some payers may reject the claim if the patient's gender doesn't match the gender they have recorded in their member records.
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DependentGender {
    #[serde(rename = "M")]
    M,
    #[serde(rename = "F")]
    F,
    #[serde(rename = "U")]
    U,
    /// Any value not defined in the spec (payers may return non-compliant values).
    #[serde(untagged)]
    UnknownValue(String),

}

impl std::fmt::Display for DependentGender {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::M => write!(f, "M"),
            Self::F => write!(f, "F"),
            Self::U => write!(f, "U"),
            Self::UnknownValue(s) => write!(f, "{s}"),
        }
    }
}

impl Default for DependentGender {
    fn default() -> DependentGender {
        Self::M
    }
}