# 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 Requirement(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    def __init__(self, source: str=None, category: str=None, number: str=None, type: str=None, memo: str=None, variable_number: float=None, applicable_days: List[str]=None):  # noqa: E501
        """Requirement - a model defined in Swagger

        :param source: The source of this Requirement.  # noqa: E501
        :type source: str
        :param category: The category of this Requirement.  # noqa: E501
        :type category: str
        :param number: The number of this Requirement.  # noqa: E501
        :type number: str
        :param type: The type of this Requirement.  # noqa: E501
        :type type: str
        :param memo: The memo of this Requirement.  # noqa: E501
        :type memo: str
        :param variable_number: The variable_number of this Requirement.  # noqa: E501
        :type variable_number: float
        :param applicable_days: The applicable_days of this Requirement.  # noqa: E501
        :type applicable_days: List[str]
        """
        self.swagger_types = {
            'source': str,
            'category': str,
            'number': str,
            'type': str,
            'memo': str,
            'variable_number': float,
            'applicable_days': List[str]
        }

        self.attribute_map = {
            'source': 'source',
            'category': 'category',
            'number': 'number',
            'type': 'type',
            'memo': 'memo',
            'variable_number': 'variable-number',
            'applicable_days': 'applicable-days'
        }
        self._source = source
        self._category = category
        self._number = number
        self._type = type
        self._memo = memo
        self._variable_number = variable_number
        self._applicable_days = applicable_days

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

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

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

        if obsolete, it is referencing the travelers' dictionary (https://github.com/TOMP-WG/TOMP-API/blob/master/documents/CROW%20passenger%20characteristics.xlsx)  # noqa: E501

        :return: The source of this Requirement.
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source: str):
        """Sets the source of this Requirement.

        if obsolete, it is referencing the travelers' dictionary (https://github.com/TOMP-WG/TOMP-API/blob/master/documents/CROW%20passenger%20characteristics.xlsx)  # noqa: E501

        :param source: The source of this Requirement.
        :type source: str
        """

        self._source = source

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

        references to the first column of the specification initial values [ HR, AV, HV, AB, AER, K, ZR, RR ]  # noqa: E501

        :return: The category of this Requirement.
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category: str):
        """Sets the category of this Requirement.

        references to the first column of the specification initial values [ HR, AV, HV, AB, AER, K, ZR, RR ]  # noqa: E501

        :param category: The category of this Requirement.
        :type category: str
        """
        if category is None:
            raise ValueError("Invalid value for `category`, must not be `None`")  # noqa: E501

        self._category = category

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

        references to the second column of the specification  # noqa: E501

        :return: The number of this Requirement.
        :rtype: str
        """
        return self._number

    @number.setter
    def number(self, number: str):
        """Sets the number of this Requirement.

        references to the second column of the specification  # noqa: E501

        :param number: The number of this Requirement.
        :type number: str
        """
        if number is None:
            raise ValueError("Invalid value for `number`, must not be `None`")  # noqa: E501

        self._number = number

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

        conditionally extra information, referencing to the 3th column  # noqa: E501

        :return: The type of this Requirement.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type: str):
        """Sets the type of this Requirement.

        conditionally extra information, referencing to the 3th column  # noqa: E501

        :param type: The type of this Requirement.
        :type type: str
        """

        self._type = type

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

        extra field for detailed information, not standardized  # noqa: E501

        :return: The memo of this Requirement.
        :rtype: str
        """
        return self._memo

    @memo.setter
    def memo(self, memo: str):
        """Sets the memo of this Requirement.

        extra field for detailed information, not standardized  # noqa: E501

        :param memo: The memo of this Requirement.
        :type memo: str
        """

        self._memo = memo

    @property
    def variable_number(self) -> float:
        """Gets the variable_number of this Requirement.

        in some requirements there is references to '[variable number]' e.g. of meters (like ZR06)  # noqa: E501

        :return: The variable_number of this Requirement.
        :rtype: float
        """
        return self._variable_number

    @variable_number.setter
    def variable_number(self, variable_number: float):
        """Sets the variable_number of this Requirement.

        in some requirements there is references to '[variable number]' e.g. of meters (like ZR06)  # noqa: E501

        :param variable_number: The variable_number of this Requirement.
        :type variable_number: float
        """

        self._variable_number = variable_number

    @property
    def applicable_days(self) -> List[str]:
        """Gets the applicable_days of this Requirement.

        days of week that are applicable  # noqa: E501

        :return: The applicable_days of this Requirement.
        :rtype: List[str]
        """
        return self._applicable_days

    @applicable_days.setter
    def applicable_days(self, applicable_days: List[str]):
        """Sets the applicable_days of this Requirement.

        days of week that are applicable  # noqa: E501

        :param applicable_days: The applicable_days of this Requirement.
        :type applicable_days: List[str]
        """
        allowed_values = ["MO", "TU", "WE", "TH", "FR", "SA", "SU"]  # noqa: E501
        if not set(applicable_days).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `applicable_days` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(applicable_days) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._applicable_days = applicable_days
