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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .legal_entity_type import LegalEntityType


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

    :param id_: Unique identifier of this resource.
    :type id_: str
    :param name: name
    :type name: str
    :param country: country, defaults to None
    :type country: str, optional
    :param entity_type: entity_type
    :type entity_type: LegalEntityType
    :param entity_subtype: entity_subtype
    :type entity_subtype: str
    """

    def __init__(
        self,
        id_: str,
        name: str,
        entity_type: LegalEntityType,
        entity_subtype: str,
        country: str = None,
    ):
        self.id_ = id_
        self.name = name
        if country is not None:
            self.country = country
        self.entity_type = self._enum_matching(
            entity_type, LegalEntityType.list(), "entity_type"
        )
        self.entity_subtype = entity_subtype
