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

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


@JsonMap({"id_": "id", "full_name": "fullName"})
class RosterPerson(BaseModel):
    """RosterPerson

    :param id_: id_, defaults to None
    :type id_: float, optional
    :param full_name: full_name, defaults to None
    :type full_name: str, optional
    :param link: link, defaults to None
    :type link: str, optional
    """

    def __init__(self, id_: float = None, full_name: str = None, link: str = None):
        if id_ is not None:
            self.id_ = id_
        if full_name is not None:
            self.full_name = full_name
        if link is not None:
            self.link = link


@JsonMap({"type_": "type"})
class RosterPosition(BaseModel):
    """RosterPosition

    :param code: code, defaults to None
    :type code: str, optional
    :param name: name, defaults to None
    :type name: str, optional
    :param type_: type_, defaults to None
    :type type_: str, optional
    :param abbreviation: abbreviation, defaults to None
    :type abbreviation: str, optional
    """

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


@JsonMap({"jersey_number": "jerseyNumber"})
class Roster(BaseModel):
    """Roster

    :param person: person, defaults to None
    :type person: RosterPerson, optional
    :param jersey_number: jersey_number, defaults to None
    :type jersey_number: float, optional
    :param position: position, defaults to None
    :type position: RosterPosition, optional
    """

    def __init__(
        self,
        person: RosterPerson = None,
        jersey_number: float = None,
        position: RosterPosition = None,
    ):
        if person is not None:
            self.person = self._define_object(person, RosterPerson)
        if jersey_number is not None:
            self.jersey_number = jersey_number
        if position is not None:
            self.position = self._define_object(position, RosterPosition)
