# coding: utf-8

"""
    The Selling Partner API for FBA inbound operations.

    The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.

    The version of the OpenAPI document: 2024-03-20
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class Dimensions(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 = {
        'height': 'float',
        'length': 'float',
        'unit_of_measurement': 'UnitOfMeasurement',
        'width': 'float',
    }

    attribute_map = {
        'height': 'height',
        'length': 'length',
        'unit_of_measurement': 'unitOfMeasurement',
        'width': 'width',
    }

    def __init__(self, height=None, length=None, unit_of_measurement=None, width=None, _configuration=None):  # noqa: E501
        """Dimensions - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._height = None
        self._length = None
        self._unit_of_measurement = None
        self._width = None
        self.discriminator = None

        self.height = height
        self.length = length
        self.unit_of_measurement = unit_of_measurement
        self.width = width

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

        The height of a package.  # noqa: E501

        :return: The height of this Dimensions.  # noqa: E501
        :rtype: float
        """
        return self._height

    @height.setter
    def height(self, height):
        """Sets the height of this Dimensions.

        The height of a package.  # noqa: E501

        :param height: The height of this Dimensions.  # noqa: E501
        :type: float
        """
        if self._configuration.client_side_validation and height is None:
            raise ValueError("Invalid value for `height`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                height is not None and height > 1E+5):  # noqa: E501
            raise ValueError("Invalid value for `height`, must be a value less than or equal to `1E+5`")  # noqa: E501
        if (self._configuration.client_side_validation and
                height is not None and height < 0):  # noqa: E501
            raise ValueError("Invalid value for `height`, must be a value greater than or equal to `0`")  # noqa: E501

        self._height = height

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

        The length of a package.  # noqa: E501

        :return: The length of this Dimensions.  # noqa: E501
        :rtype: float
        """
        return self._length

    @length.setter
    def length(self, length):
        """Sets the length of this Dimensions.

        The length of a package.  # noqa: E501

        :param length: The length of this Dimensions.  # noqa: E501
        :type: float
        """
        if self._configuration.client_side_validation and length is None:
            raise ValueError("Invalid value for `length`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                length is not None and length > 1E+5):  # noqa: E501
            raise ValueError("Invalid value for `length`, must be a value less than or equal to `1E+5`")  # noqa: E501
        if (self._configuration.client_side_validation and
                length is not None and length < 0):  # noqa: E501
            raise ValueError("Invalid value for `length`, must be a value greater than or equal to `0`")  # noqa: E501

        self._length = length

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


        :return: The unit_of_measurement of this Dimensions.  # noqa: E501
        :rtype: UnitOfMeasurement
        """
        return self._unit_of_measurement

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


        :param unit_of_measurement: The unit_of_measurement of this Dimensions.  # noqa: E501
        :type: UnitOfMeasurement
        """
        if self._configuration.client_side_validation and unit_of_measurement is None:
            raise ValueError("Invalid value for `unit_of_measurement`, must not be `None`")  # noqa: E501

        self._unit_of_measurement = unit_of_measurement

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

        The width of a package.  # noqa: E501

        :return: The width of this Dimensions.  # noqa: E501
        :rtype: float
        """
        return self._width

    @width.setter
    def width(self, width):
        """Sets the width of this Dimensions.

        The width of a package.  # noqa: E501

        :param width: The width of this Dimensions.  # noqa: E501
        :type: float
        """
        if self._configuration.client_side_validation and width is None:
            raise ValueError("Invalid value for `width`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                width is not None and width > 1E+5):  # noqa: E501
            raise ValueError("Invalid value for `width`, must be a value less than or equal to `1E+5`")  # noqa: E501
        if (self._configuration.client_side_validation and
                width is not None and width < 0):  # noqa: E501
            raise ValueError("Invalid value for `width`, must be a value greater than or equal to `0`")  # noqa: E501

        self._width = width

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
