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

    Do not edit the class manually.
    """
    def __init__(self, order_id: int=None, weight: float=None, region: int=None, delivery_hours: List[str]=None):  # noqa: E501
        """OrderItem - a model defined in Swagger

        :param order_id: The order_id of this OrderItem.  # noqa: E501
        :type order_id: int
        :param weight: The weight of this OrderItem.  # noqa: E501
        :type weight: float
        :param region: The region of this OrderItem.  # noqa: E501
        :type region: int
        :param delivery_hours: The delivery_hours of this OrderItem.  # noqa: E501
        :type delivery_hours: List[str]
        """
        self.swagger_types = {
            'order_id': int,
            'weight': float,
            'region': int,
            'delivery_hours': List[str]
        }

        self.attribute_map = {
            'order_id': 'order_id',
            'weight': 'weight',
            'region': 'region',
            'delivery_hours': 'delivery_hours'
        }
        self._order_id = order_id
        self._weight = weight
        self._region = region
        self._delivery_hours = delivery_hours

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

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

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


        :return: The order_id of this OrderItem.
        :rtype: int
        """
        return self._order_id

    @order_id.setter
    def order_id(self, order_id: int):
        """Sets the order_id of this OrderItem.


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

        self._order_id = order_id

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


        :return: The weight of this OrderItem.
        :rtype: float
        """
        return self._weight

    @weight.setter
    def weight(self, weight: float):
        """Sets the weight of this OrderItem.


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

        self._weight = weight

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


        :return: The region of this OrderItem.
        :rtype: int
        """
        return self._region

    @region.setter
    def region(self, region: int):
        """Sets the region of this OrderItem.


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

        self._region = region

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


        :return: The delivery_hours of this OrderItem.
        :rtype: List[str]
        """
        return self._delivery_hours

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


        :param delivery_hours: The delivery_hours of this OrderItem.
        :type delivery_hours: List[str]
        """
        if delivery_hours is None:
            raise ValueError("Invalid value for `delivery_hours`, must not be `None`")  # noqa: E501

        self._delivery_hours = delivery_hours
