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

from __future__ import annotations
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .state_of_country import StateOfCountry


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

    :param code: Country code.
    :type code: str
    :param name: Country name.
    :type name: str
    :param visa_support: Identifies if Deel provides visa support for employees being hired in this country.
    :type visa_support: bool
    :param eor_support: Identifies if Deel support EoR in this country.
    :type eor_support: bool
    :param state_type: Identifies the type of sub-territory within a country where local laws may apply. Some countries may have states, provinces, prefectures or regions.
    :type state_type: str
    :param states: states
    :type states: List[StateOfCountry]
    """

    def __init__(
        self,
        code: str,
        name: str,
        visa_support: bool,
        eor_support: bool,
        state_type: str,
        states: List[StateOfCountry],
    ):
        self.code = self._pattern_matching(code, "^[A-Z]{2}$", "code")
        self.name = name
        self.visa_support = visa_support
        self.eor_support = eor_support
        self.state_type = state_type
        self.states = self._define_list(states, StateOfCountry)
