# This file was generated by liblab | https://liblab.com/

from enum import Enum
from .utils.json_map import JsonMap
from .base import BaseModel


@JsonMap({})
class Provider(BaseModel):
    """Provider

    :param name: Name of the provider., defaults to None
    :type name: str, optional
    """

    def __init__(self, name: str = None):
        if name is not None:
            self.name = name


class OfferStatus(Enum):
    """An enumeration representing different categories.

    :cvar OFFERED: "Offered"
    :vartype OFFERED: str
    :cvar NOT_OFFERED: "Not offered"
    :vartype NOT_OFFERED: str
    """

    OFFERED = "Offered"
    NOT_OFFERED = "Not offered"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, OfferStatus._member_map_.values()))


@JsonMap({})
class EorContractBenefitsPlan(BaseModel):
    """EorContractBenefitsPlan

    :param name: Name of the plan., defaults to None
    :type name: str, optional
    """

    def __init__(self, name: str = None):
        if name is not None:
            self.name = name


@JsonMap({})
class EnrollmentDetailsPlan(BaseModel):
    """EnrollmentDetailsPlan

    :param name: Name of the plan., defaults to None
    :type name: str, optional
    """

    def __init__(self, name: str = None):
        if name is not None:
            self.name = name


@JsonMap({})
class Standard(BaseModel):
    """Standard

    :param monthly_cost: Standard monthly cost., defaults to None
    :type monthly_cost: str, optional
    :param monthly_contribution: Standard monthly contribution., defaults to None
    :type monthly_contribution: str, optional
    """

    def __init__(self, monthly_cost: str = None, monthly_contribution: str = None):
        if monthly_cost is not None:
            self.monthly_cost = monthly_cost
        if monthly_contribution is not None:
            self.monthly_contribution = monthly_contribution


@JsonMap({})
class Current(BaseModel):
    """Current

    :param monthly_cost: Current monthly cost., defaults to None
    :type monthly_cost: str, optional
    :param monthly_contribution: Current monthly contribution., defaults to None
    :type monthly_contribution: str, optional
    """

    def __init__(self, monthly_cost: str = None, monthly_contribution: str = None):
        if monthly_cost is not None:
            self.monthly_cost = monthly_cost
        if monthly_contribution is not None:
            self.monthly_contribution = monthly_contribution


@JsonMap({})
class EnrollmentDetails(BaseModel):
    """EnrollmentDetails

    :param status: Status of the enrollment., defaults to None
    :type status: str, optional
    :param plan: plan, defaults to None
    :type plan: EnrollmentDetailsPlan, optional
    :param standard: standard, defaults to None
    :type standard: Standard, optional
    :param current: current, defaults to None
    :type current: Current, optional
    """

    def __init__(
        self,
        status: str = None,
        plan: EnrollmentDetailsPlan = None,
        standard: Standard = None,
        current: Current = None,
    ):
        if status is not None:
            self.status = status
        if plan is not None:
            self.plan = self._define_object(plan, EnrollmentDetailsPlan)
        if standard is not None:
            self.standard = self._define_object(standard, Standard)
        if current is not None:
            self.current = self._define_object(current, Current)


@JsonMap({"id_": "id"})
class EorContractBenefits(BaseModel):
    """EorContractBenefits

    :param id_: Unique identifier of the benefit., defaults to None
    :type id_: str, optional
    :param name: Name of the benefit., defaults to None
    :type name: str, optional
    :param provider: provider, defaults to None
    :type provider: Provider, optional
    :param offer_status: Status of the offer., defaults to None
    :type offer_status: OfferStatus, optional
    :param plan: plan, defaults to None
    :type plan: EorContractBenefitsPlan, optional
    :param enrollment_details: enrollment_details, defaults to None
    :type enrollment_details: EnrollmentDetails, optional
    """

    def __init__(
        self,
        id_: str = None,
        name: str = None,
        provider: Provider = None,
        offer_status: OfferStatus = None,
        plan: EorContractBenefitsPlan = None,
        enrollment_details: EnrollmentDetails = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if name is not None:
            self.name = name
        if provider is not None:
            self.provider = self._define_object(provider, Provider)
        if offer_status is not None:
            self.offer_status = self._enum_matching(
                offer_status, OfferStatus.list(), "offer_status"
            )
        if plan is not None:
            self.plan = self._define_object(plan, EorContractBenefitsPlan)
        if enrollment_details is not None:
            self.enrollment_details = self._define_object(
                enrollment_details, EnrollmentDetails
            )
