autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Manager
 *
 * 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::manager::models;
use serde::{Deserialize, Serialize};

/// TimeQualifierName : The name of the time period qualifier code.     Note that for the patient's deductible, `Calendar Year` indicates the patient's total deductible amount for the year, while `Remaining` indicates the amount left to meet the deductible. Visit [Payer benefit response](https://www.stedi.com/docs/healthcare/eligibility-patient-responsibility-benefits#deductible) to learn more about deductibles.  Payers may sometimes return other non-compliant values.
/// The name of the time period qualifier code.     Note that for the patient's deductible, `Calendar Year` indicates the patient's total deductible amount for the year, while `Remaining` indicates the amount left to meet the deductible. Visit [Payer benefit response](https://www.stedi.com/docs/healthcare/eligibility-patient-responsibility-benefits#deductible) to learn more about deductibles.  Payers may sometimes return other non-compliant values.
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TimeQualifierName {
    #[serde(rename = "Hour")]
    Hour,
    #[serde(rename = "Day")]
    Day,
    #[serde(rename = "24 Hours")]
    Variant24Hours,
    #[serde(rename = "Years")]
    Years,
    #[serde(rename = "Service Year")]
    ServiceYear,
    #[serde(rename = "Calendar Year")]
    CalendarYear,
    #[serde(rename = "Year to Date")]
    YearToDate,
    #[serde(rename = "Contract")]
    Contract,
    #[serde(rename = "Episode")]
    Episode,
    #[serde(rename = "Visit")]
    Visit,
    #[serde(rename = "Outlier")]
    Outlier,
    #[serde(rename = "Remaining")]
    Remaining,
    #[serde(rename = "Exceeded")]
    Exceeded,
    #[serde(rename = "Not Exceeded")]
    NotExceeded,
    #[serde(rename = "Lifetime")]
    Lifetime,
    #[serde(rename = "Lifetime Remaining")]
    LifetimeRemaining,
    #[serde(rename = "Month")]
    Month,
    #[serde(rename = "Week")]
    Week,
    #[serde(rename = "Admission")]
    Admission,
    /// Any value not defined in the spec (payers may return non-compliant values).
    #[serde(untagged)]
    UnknownValue(String),

}

impl std::fmt::Display for TimeQualifierName {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Hour => write!(f, "Hour"),
            Self::Day => write!(f, "Day"),
            Self::Variant24Hours => write!(f, "24 Hours"),
            Self::Years => write!(f, "Years"),
            Self::ServiceYear => write!(f, "Service Year"),
            Self::CalendarYear => write!(f, "Calendar Year"),
            Self::YearToDate => write!(f, "Year to Date"),
            Self::Contract => write!(f, "Contract"),
            Self::Episode => write!(f, "Episode"),
            Self::Visit => write!(f, "Visit"),
            Self::Outlier => write!(f, "Outlier"),
            Self::Remaining => write!(f, "Remaining"),
            Self::Exceeded => write!(f, "Exceeded"),
            Self::NotExceeded => write!(f, "Not Exceeded"),
            Self::Lifetime => write!(f, "Lifetime"),
            Self::LifetimeRemaining => write!(f, "Lifetime Remaining"),
            Self::Month => write!(f, "Month"),
            Self::Week => write!(f, "Week"),
            Self::Admission => write!(f, "Admission"),
            Self::UnknownValue(s) => write!(f, "{s}"),
        }
    }
}

impl Default for TimeQualifierName {
    fn default() -> TimeQualifierName {
        Self::Hour
    }
}