# coding: utf-8

"""
    Selling Partner API for Retail Procurement Shipments

    The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.

    The version of the OpenAPI document: v1
    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 Pallet(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 = {
        'pallet_identifiers': 'List[ContainerIdentification]',
        'tier': 'int',
        'block': 'int',
        'dimensions': 'Dimensions',
        'weight': 'Weight',
        'carton_reference_details': 'CartonReferenceDetails',
        'items': 'List[ContainerItem]',
    }

    attribute_map = {
        'pallet_identifiers': 'palletIdentifiers',
        'tier': 'tier',
        'block': 'block',
        'dimensions': 'dimensions',
        'weight': 'weight',
        'carton_reference_details': 'cartonReferenceDetails',
        'items': 'items',
    }

    def __init__(self, pallet_identifiers=None, tier=None, block=None, dimensions=None, weight=None, carton_reference_details=None, items=None, _configuration=None):  # noqa: E501
        """Pallet - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._pallet_identifiers = None
        self._tier = None
        self._block = None
        self._dimensions = None
        self._weight = None
        self._carton_reference_details = None
        self._items = None
        self.discriminator = None

        self.pallet_identifiers = pallet_identifiers
        if tier is not None:
            self.tier = tier
        if block is not None:
            self.block = block
        if dimensions is not None:
            self.dimensions = dimensions
        if weight is not None:
            self.weight = weight
        if carton_reference_details is not None:
            self.carton_reference_details = carton_reference_details
        if items is not None:
            self.items = items

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

        A list of pallet identifiers.  # noqa: E501

        :return: The pallet_identifiers of this Pallet.  # noqa: E501
        :rtype: List[ContainerIdentification]
        """
        return self._pallet_identifiers

    @pallet_identifiers.setter
    def pallet_identifiers(self, pallet_identifiers):
        """Sets the pallet_identifiers of this Pallet.

        A list of pallet identifiers.  # noqa: E501

        :param pallet_identifiers: The pallet_identifiers of this Pallet.  # noqa: E501
        :type: List[ContainerIdentification]
        """
        if self._configuration.client_side_validation and pallet_identifiers is None:
            raise ValueError("Invalid value for `pallet_identifiers`, must not be `None`")  # noqa: E501

        self._pallet_identifiers = pallet_identifiers

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

        Number of layers per pallet. Only applicable to container type Pallet.  # noqa: E501

        :return: The tier of this Pallet.  # noqa: E501
        :rtype: int
        """
        return self._tier

    @tier.setter
    def tier(self, tier):
        """Sets the tier of this Pallet.

        Number of layers per pallet. Only applicable to container type Pallet.  # noqa: E501

        :param tier: The tier of this Pallet.  # noqa: E501
        :type: int
        """

        self._tier = tier

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

        Number of cartons per layer on the pallet. Only applicable to container type Pallet.  # noqa: E501

        :return: The block of this Pallet.  # noqa: E501
        :rtype: int
        """
        return self._block

    @block.setter
    def block(self, block):
        """Sets the block of this Pallet.

        Number of cartons per layer on the pallet. Only applicable to container type Pallet.  # noqa: E501

        :param block: The block of this Pallet.  # noqa: E501
        :type: int
        """

        self._block = block

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


        :return: The dimensions of this Pallet.  # noqa: E501
        :rtype: Dimensions
        """
        return self._dimensions

    @dimensions.setter
    def dimensions(self, dimensions):
        """Sets the dimensions of this Pallet.


        :param dimensions: The dimensions of this Pallet.  # noqa: E501
        :type: Dimensions
        """

        self._dimensions = dimensions

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


        :return: The weight of this Pallet.  # noqa: E501
        :rtype: Weight
        """
        return self._weight

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


        :param weight: The weight of this Pallet.  # noqa: E501
        :type: Weight
        """

        self._weight = weight

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


        :return: The carton_reference_details of this Pallet.  # noqa: E501
        :rtype: CartonReferenceDetails
        """
        return self._carton_reference_details

    @carton_reference_details.setter
    def carton_reference_details(self, carton_reference_details):
        """Sets the carton_reference_details of this Pallet.


        :param carton_reference_details: The carton_reference_details of this Pallet.  # noqa: E501
        :type: CartonReferenceDetails
        """

        self._carton_reference_details = carton_reference_details

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

        A list of container item details.  # noqa: E501

        :return: The items of this Pallet.  # noqa: E501
        :rtype: List[ContainerItem]
        """
        return self._items

    @items.setter
    def items(self, items):
        """Sets the items of this Pallet.

        A list of container item details.  # noqa: E501

        :param items: The items of this Pallet.  # noqa: E501
        :type: List[ContainerItem]
        """

        self._items = items

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

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