# coding: utf-8

"""
    Teleagronom

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

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

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'id': 'int',
        'seller': 'FertilizerSeller',
        'price': 'float',
        'date_from': 'datetime',
        'date_to': 'datetime',
        'fertilizer': 'int',
        'unit_of_measurement': 'int'
    }

    attribute_map = {
        'id': 'id',
        'seller': 'seller',
        'price': 'price',
        'date_from': 'date_from',
        'date_to': 'date_to',
        'fertilizer': 'fertilizer',
        'unit_of_measurement': 'unit_of_measurement'
    }

    def __init__(self, id=None, seller=None, price=None, date_from=None, date_to=None, fertilizer=None, unit_of_measurement=None):  # noqa: E501
        """FertilizerToSeller - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._seller = None
        self._price = None
        self._date_from = None
        self._date_to = None
        self._fertilizer = None
        self._unit_of_measurement = None
        self.discriminator = None
        self.id = id
        self.seller = seller
        if price is not None:
            self.price = price
        if date_from is not None:
            self.date_from = date_from
        if date_to is not None:
            self.date_to = date_to
        self.fertilizer = fertilizer
        if unit_of_measurement is not None:
            self.unit_of_measurement = unit_of_measurement

    @property
    def id(self):
        """Gets the id of this FertilizerToSeller.  # noqa: E501


        :return: The id of this FertilizerToSeller.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this FertilizerToSeller.


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

        self._id = id

    @property
    def seller(self):
        """Gets the seller of this FertilizerToSeller.  # noqa: E501


        :return: The seller of this FertilizerToSeller.  # noqa: E501
        :rtype: FertilizerSeller
        """
        return self._seller

    @seller.setter
    def seller(self, seller):
        """Sets the seller of this FertilizerToSeller.


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

        self._seller = seller

    @property
    def price(self):
        """Gets the price of this FertilizerToSeller.  # noqa: E501


        :return: The price of this FertilizerToSeller.  # noqa: E501
        :rtype: float
        """
        return self._price

    @price.setter
    def price(self, price):
        """Sets the price of this FertilizerToSeller.


        :param price: The price of this FertilizerToSeller.  # noqa: E501
        :type: float
        """

        self._price = price

    @property
    def date_from(self):
        """Gets the date_from of this FertilizerToSeller.  # noqa: E501


        :return: The date_from of this FertilizerToSeller.  # noqa: E501
        :rtype: datetime
        """
        return self._date_from

    @date_from.setter
    def date_from(self, date_from):
        """Sets the date_from of this FertilizerToSeller.


        :param date_from: The date_from of this FertilizerToSeller.  # noqa: E501
        :type: datetime
        """

        self._date_from = date_from

    @property
    def date_to(self):
        """Gets the date_to of this FertilizerToSeller.  # noqa: E501


        :return: The date_to of this FertilizerToSeller.  # noqa: E501
        :rtype: datetime
        """
        return self._date_to

    @date_to.setter
    def date_to(self, date_to):
        """Sets the date_to of this FertilizerToSeller.


        :param date_to: The date_to of this FertilizerToSeller.  # noqa: E501
        :type: datetime
        """

        self._date_to = date_to

    @property
    def fertilizer(self):
        """Gets the fertilizer of this FertilizerToSeller.  # noqa: E501


        :return: The fertilizer of this FertilizerToSeller.  # noqa: E501
        :rtype: int
        """
        return self._fertilizer

    @fertilizer.setter
    def fertilizer(self, fertilizer):
        """Sets the fertilizer of this FertilizerToSeller.


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

        self._fertilizer = fertilizer

    @property
    def unit_of_measurement(self):
        """Gets the unit_of_measurement of this FertilizerToSeller.  # noqa: E501


        :return: The unit_of_measurement of this FertilizerToSeller.  # noqa: E501
        :rtype: int
        """
        return self._unit_of_measurement

    @unit_of_measurement.setter
    def unit_of_measurement(self, unit_of_measurement):
        """Sets the unit_of_measurement of this FertilizerToSeller.


        :param unit_of_measurement: The unit_of_measurement of this FertilizerToSeller.  # noqa: E501
        :type: int
        """

        self._unit_of_measurement = unit_of_measurement

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(FertilizerToSeller, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, FertilizerToSeller):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
