# coding: utf-8

"""
    Dokumenty CITES

    API pro datový řadič dokumentů CITES ### Verze 1.0.0    - public   - developers  ### Verze 1.1.0    - admins   - additional   - statement   - attachments   - registration_cards   - permit   # noqa: E501

    OpenAPI spec version: 1.1.0
    Contact: info@sysnet.cz
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class GoodsQuantityType(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 = {
        'metric': 'str',
        'amount': 'float',
        'units': 'str'
    }

    attribute_map = {
        'metric': 'metric',
        'amount': 'amount',
        'units': 'units'
    }

    def __init__(self, metric='number', amount=1, units=None):  # noqa: E501
        """GoodsQuantityType - a model defined in Swagger"""  # noqa: E501
        self._metric = None
        self._amount = None
        self._units = None
        self.discriminator = None
        if metric is not None:
            self.metric = metric
        if amount is not None:
            self.amount = amount
        if units is not None:
            self.units = units

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

        Metrika (hmotnost, počet, objem, jiná)  # noqa: E501

        :return: The metric of this GoodsQuantityType.  # noqa: E501
        :rtype: str
        """
        return self._metric

    @metric.setter
    def metric(self, metric):
        """Sets the metric of this GoodsQuantityType.

        Metrika (hmotnost, počet, objem, jiná)  # noqa: E501

        :param metric: The metric of this GoodsQuantityType.  # noqa: E501
        :type: str
        """
        allowed_values = ["weight", "number", "volume", "other"]  # noqa: E501
        if metric not in allowed_values:
            raise ValueError(
                "Invalid value for `metric` ({0}), must be one of {1}"  # noqa: E501
                .format(metric, allowed_values)
            )

        self._metric = metric

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

        Množství  # noqa: E501

        :return: The amount of this GoodsQuantityType.  # noqa: E501
        :rtype: float
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this GoodsQuantityType.

        Množství  # noqa: E501

        :param amount: The amount of this GoodsQuantityType.  # noqa: E501
        :type: float
        """

        self._amount = amount

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

        Jednotky  # noqa: E501

        :return: The units of this GoodsQuantityType.  # noqa: E501
        :rtype: str
        """
        return self._units

    @units.setter
    def units(self, units):
        """Sets the units of this GoodsQuantityType.

        Jednotky  # noqa: E501

        :param units: The units of this GoodsQuantityType.  # noqa: E501
        :type: str
        """

        self._units = units

    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(GoodsQuantityType, 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, GoodsQuantityType):
            return False

        return self.__dict__ == other.__dict__

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