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

from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel


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

    :param id_: id_, defaults to None
    :type id_: int, optional
    :param name: name, defaults to None
    :type name: str, optional
    """

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


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

    :param id_: id_, defaults to None
    :type id_: int, optional
    :param name: name, defaults to None
    :type name: str, optional
    """

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


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

    :param id_: id_, defaults to None
    :type id_: int, optional
    :param name: name, defaults to None
    :type name: str, optional
    :param organization_structure: organization_structure, defaults to None
    :type organization_structure: OrganizationStructure, optional
    """

    def __init__(
        self,
        id_: int = None,
        name: str = None,
        organization_structure: OrganizationStructure = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if name is not None:
            self.name = name
        if organization_structure is not None:
            self.organization_structure = self._define_object(
                organization_structure, OrganizationStructure
            )


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

    :param id_: id_, defaults to None
    :type id_: str, optional
    :param role: role, defaults to None
    :type role: Role, optional
    :param team: team, defaults to None
    :type team: DataTeam, optional
    :param is_supportive: is_supportive, defaults to None
    :type is_supportive: bool, optional
    """

    def __init__(
        self,
        id_: str = None,
        role: Role = None,
        team: DataTeam = None,
        is_supportive: bool = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if role is not None:
            self.role = self._define_object(role, Role)
        if team is not None:
            self.team = self._define_object(team, DataTeam)
        if is_supportive is not None:
            self.is_supportive = is_supportive


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

    :param data: data, defaults to None
    :type data: List[GetHrisPositionContainerData], optional
    """

    def __init__(self, data: List[GetHrisPositionContainerData] = None):
        if data is not None:
            self.data = self._define_list(data, GetHrisPositionContainerData)
