# coding: utf-8

"""
    Selling Partner API for Merchant Fulfillment

    The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from src.api_models.mfn_api.swagger_client.configuration import Configuration


class PackageDimensions(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 = {
        'length': 'PackageDimension',
        'width': 'PackageDimension',
        'height': 'PackageDimension',
        'unit': 'UnitOfLength',
        'predefined_package_dimensions': 'PredefinedPackageDimensions'
    }

    attribute_map = {
        'length': 'Length',
        'width': 'Width',
        'height': 'Height',
        'unit': 'Unit',
        'predefined_package_dimensions': 'PredefinedPackageDimensions'
    }

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

        self._length = None
        self._width = None
        self._height = None
        self._unit = None
        self._predefined_package_dimensions = None
        self.discriminator = None

        if length is not None:
            self.length = length
        if width is not None:
            self.width = width
        if height is not None:
            self.height = height
        if unit is not None:
            self.unit = unit
        if predefined_package_dimensions is not None:
            self.predefined_package_dimensions = predefined_package_dimensions

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

        The length dimension. If you don't specify PredefinedPackageDimensions, you must specify the Length.  # noqa: E501

        :return: The length of this PackageDimensions.  # noqa: E501
        :rtype: PackageDimension
        """
        return self._length

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

        The length dimension. If you don't specify PredefinedPackageDimensions, you must specify the Length.  # noqa: E501

        :param length: The length of this PackageDimensions.  # noqa: E501
        :type: PackageDimension
        """

        self._length = length

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

        The width dimension. If you don't specify PredefinedPackageDimensions, you must specify the Width.  # noqa: E501

        :return: The width of this PackageDimensions.  # noqa: E501
        :rtype: PackageDimension
        """
        return self._width

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

        The width dimension. If you don't specify PredefinedPackageDimensions, you must specify the Width.  # noqa: E501

        :param width: The width of this PackageDimensions.  # noqa: E501
        :type: PackageDimension
        """

        self._width = width

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

        The height dimension. If you don't specify PredefinedPackageDimensions, you must specify the Height.  # noqa: E501

        :return: The height of this PackageDimensions.  # noqa: E501
        :rtype: PackageDimension
        """
        return self._height

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

        The height dimension. If you don't specify PredefinedPackageDimensions, you must specify the Height.  # noqa: E501

        :param height: The height of this PackageDimensions.  # noqa: E501
        :type: PackageDimension
        """

        self._height = height

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

        The unit of measurement. If you don't specify PredefinedPackageDimensions, you must specify the Unit.  # noqa: E501

        :return: The unit of this PackageDimensions.  # noqa: E501
        :rtype: UnitOfLength
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this PackageDimensions.

        The unit of measurement. If you don't specify PredefinedPackageDimensions, you must specify the Unit.  # noqa: E501

        :param unit: The unit of this PackageDimensions.  # noqa: E501
        :type: UnitOfLength
        """

        self._unit = unit

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


        :return: The predefined_package_dimensions of this PackageDimensions.  # noqa: E501
        :rtype: PredefinedPackageDimensions
        """
        return self._predefined_package_dimensions

    @predefined_package_dimensions.setter
    def predefined_package_dimensions(self, predefined_package_dimensions):
        """Sets the predefined_package_dimensions of this PackageDimensions.


        :param predefined_package_dimensions: The predefined_package_dimensions of this PackageDimensions.  # noqa: E501
        :type: PredefinedPackageDimensions
        """

        self._predefined_package_dimensions = predefined_package_dimensions

    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(PackageDimensions, 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, PackageDimensions):
            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, PackageDimensions):
            return True

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