# 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 Containers(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 = {
        'container_type': 'str',
        'container_sequence_number': 'str',
        'container_identifiers': 'List[ContainerIdentification]',
        'tracking_number': 'str',
        'dimensions': 'Dimensions',
        'weight': 'Weight',
        'tier': 'int',
        'block': 'int',
        'inner_containers_details': 'InnerContainersDetails',
        'packed_items': 'List[PackedItems]',
    }

    attribute_map = {
        'container_type': 'containerType',
        'container_sequence_number': 'containerSequenceNumber',
        'container_identifiers': 'containerIdentifiers',
        'tracking_number': 'trackingNumber',
        'dimensions': 'dimensions',
        'weight': 'weight',
        'tier': 'tier',
        'block': 'block',
        'inner_containers_details': 'innerContainersDetails',
        'packed_items': 'packedItems',
    }

    def __init__(self, container_type=None, container_sequence_number=None, container_identifiers=None, tracking_number=None, dimensions=None, weight=None, tier=None, block=None, inner_containers_details=None, packed_items=None, _configuration=None):  # noqa: E501
        """Containers - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._container_type = None
        self._container_sequence_number = None
        self._container_identifiers = None
        self._tracking_number = None
        self._dimensions = None
        self._weight = None
        self._tier = None
        self._block = None
        self._inner_containers_details = None
        self._packed_items = None
        self.discriminator = None

        self.container_type = container_type
        if container_sequence_number is not None:
            self.container_sequence_number = container_sequence_number
        self.container_identifiers = container_identifiers
        if tracking_number is not None:
            self.tracking_number = tracking_number
        if dimensions is not None:
            self.dimensions = dimensions
        if weight is not None:
            self.weight = weight
        if tier is not None:
            self.tier = tier
        if block is not None:
            self.block = block
        if inner_containers_details is not None:
            self.inner_containers_details = inner_containers_details
        if packed_items is not None:
            self.packed_items = packed_items

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

        The type of container.  # noqa: E501

        :return: The container_type of this Containers.  # noqa: E501
        :rtype: str
        """
        return self._container_type

    @container_type.setter
    def container_type(self, container_type):
        """Sets the container_type of this Containers.

        The type of container.  # noqa: E501

        :param container_type: The container_type of this Containers.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and container_type is None:
            raise ValueError("Invalid value for `container_type`, must not be `None`")  # noqa: E501
        allowed_values = ["carton", "pallet"]  # noqa: E501
        if (self._configuration.client_side_validation and
                container_type not in allowed_values):
            raise ValueError(
                "Invalid value for `container_type` ({0}), must be one of {1}"  # noqa: E501
                .format(container_type, allowed_values)
            )

        self._container_type = container_type

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

        An integer that must be submitted for multi-box shipments only, where one item may come in separate packages.  # noqa: E501

        :return: The container_sequence_number of this Containers.  # noqa: E501
        :rtype: str
        """
        return self._container_sequence_number

    @container_sequence_number.setter
    def container_sequence_number(self, container_sequence_number):
        """Sets the container_sequence_number of this Containers.

        An integer that must be submitted for multi-box shipments only, where one item may come in separate packages.  # noqa: E501

        :param container_sequence_number: The container_sequence_number of this Containers.  # noqa: E501
        :type: str
        """

        self._container_sequence_number = container_sequence_number

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

        A list of carton identifiers.  # noqa: E501

        :return: The container_identifiers of this Containers.  # noqa: E501
        :rtype: List[ContainerIdentification]
        """
        return self._container_identifiers

    @container_identifiers.setter
    def container_identifiers(self, container_identifiers):
        """Sets the container_identifiers of this Containers.

        A list of carton identifiers.  # noqa: E501

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

        self._container_identifiers = container_identifiers

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

        The tracking number used for identifying the shipment.  # noqa: E501

        :return: The tracking_number of this Containers.  # noqa: E501
        :rtype: str
        """
        return self._tracking_number

    @tracking_number.setter
    def tracking_number(self, tracking_number):
        """Sets the tracking_number of this Containers.

        The tracking number used for identifying the shipment.  # noqa: E501

        :param tracking_number: The tracking_number of this Containers.  # noqa: E501
        :type: str
        """

        self._tracking_number = tracking_number

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


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

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


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

        self._dimensions = dimensions

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


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

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


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

        self._weight = weight

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

        Number of layers per pallet.  # noqa: E501

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

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

        Number of layers per pallet.  # noqa: E501

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

        self._tier = tier

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

        Number of cartons per layer on the pallet.  # noqa: E501

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

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

        Number of cartons per layer on the pallet.  # noqa: E501

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

        self._block = block

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


        :return: The inner_containers_details of this Containers.  # noqa: E501
        :rtype: InnerContainersDetails
        """
        return self._inner_containers_details

    @inner_containers_details.setter
    def inner_containers_details(self, inner_containers_details):
        """Sets the inner_containers_details of this Containers.


        :param inner_containers_details: The inner_containers_details of this Containers.  # noqa: E501
        :type: InnerContainersDetails
        """

        self._inner_containers_details = inner_containers_details

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

        A list of packed items.  # noqa: E501

        :return: The packed_items of this Containers.  # noqa: E501
        :rtype: List[PackedItems]
        """
        return self._packed_items

    @packed_items.setter
    def packed_items(self, packed_items):
        """Sets the packed_items of this Containers.

        A list of packed items.  # noqa: E501

        :param packed_items: The packed_items of this Containers.  # noqa: E501
        :type: List[PackedItems]
        """

        self._packed_items = packed_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(Containers, 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, Containers):
            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, Containers):
            return True

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