# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from swagger_server.models.base_model_ import Model
from swagger_server import util


class Medal(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    def __init__(self, rank: str=None, sport_id: int=None, athlete_id: int=None):  # noqa: E501
        """Medal - a model defined in Swagger

        :param rank: The rank of this Medal.  # noqa: E501
        :type rank: str
        :param sport_id: The sport_id of this Medal.  # noqa: E501
        :type sport_id: int
        :param athlete_id: The athlete_id of this Medal.  # noqa: E501
        :type athlete_id: int
        """
        self.swagger_types = {
            'rank': str,
            'sport_id': int,
            'athlete_id': int
        }

        self.attribute_map = {
            'rank': 'rank',
            'sport_id': 'sportID',
            'athlete_id': 'athleteID'
        }
        self._rank = rank
        self._sport_id = sport_id
        self._athlete_id = athlete_id

    @classmethod
    def from_dict(cls, dikt) -> 'Medal':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Medal of this Medal.  # noqa: E501
        :rtype: Medal
        """
        return util.deserialize_model(dikt, cls)

    @property
    def rank(self) -> str:
        """Gets the rank of this Medal.


        :return: The rank of this Medal.
        :rtype: str
        """
        return self._rank

    @rank.setter
    def rank(self, rank: str):
        """Sets the rank of this Medal.


        :param rank: The rank of this Medal.
        :type rank: str
        """
        allowed_values = ["gold", "silver", "bronze"]  # noqa: E501
        if rank not in allowed_values:
            raise ValueError(
                "Invalid value for `rank` ({0}), must be one of {1}"
                .format(rank, allowed_values)
            )

        self._rank = rank

    @property
    def sport_id(self) -> int:
        """Gets the sport_id of this Medal.


        :return: The sport_id of this Medal.
        :rtype: int
        """
        return self._sport_id

    @sport_id.setter
    def sport_id(self, sport_id: int):
        """Sets the sport_id of this Medal.


        :param sport_id: The sport_id of this Medal.
        :type sport_id: int
        """

        self._sport_id = sport_id

    @property
    def athlete_id(self) -> int:
        """Gets the athlete_id of this Medal.


        :return: The athlete_id of this Medal.
        :rtype: int
        """
        return self._athlete_id

    @athlete_id.setter
    def athlete_id(self, athlete_id: int):
        """Sets the athlete_id of this Medal.


        :param athlete_id: The athlete_id of this Medal.
        :type athlete_id: int
        """

        self._athlete_id = athlete_id