# coding: utf-8

"""
    Selling Partner API for Direct Fulfillment Shipping

    Use the Selling Partner API for Direct Fulfillment Shipping to access a direct fulfillment vendor's shipping data.

    The version of the OpenAPI document: 2021-12-28
    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 Container(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_identifier': 'str',
        'tracking_number': 'str',
        'manifest_id': 'str',
        'manifest_date': 'str',
        'ship_method': 'str',
        'scac_code': 'str',
        'carrier': 'str',
        'container_sequence_number': 'int',
        'dimensions': 'Dimensions',
        'weight': 'Weight',
        'packed_items': 'List[PackedItem]',
    }

    attribute_map = {
        'container_type': 'containerType',
        'container_identifier': 'containerIdentifier',
        'tracking_number': 'trackingNumber',
        'manifest_id': 'manifestId',
        'manifest_date': 'manifestDate',
        'ship_method': 'shipMethod',
        'scac_code': 'scacCode',
        'carrier': 'carrier',
        'container_sequence_number': 'containerSequenceNumber',
        'dimensions': 'dimensions',
        'weight': 'weight',
        'packed_items': 'packedItems',
    }

    def __init__(self, container_type=None, container_identifier=None, tracking_number=None, manifest_id=None, manifest_date=None, ship_method=None, scac_code=None, carrier=None, container_sequence_number=None, dimensions=None, weight=None, packed_items=None, _configuration=None):  # noqa: E501
        """Container - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._container_type = None
        self._container_identifier = None
        self._tracking_number = None
        self._manifest_id = None
        self._manifest_date = None
        self._ship_method = None
        self._scac_code = None
        self._carrier = None
        self._container_sequence_number = None
        self._dimensions = None
        self._weight = None
        self._packed_items = None
        self.discriminator = None

        self.container_type = container_type
        self.container_identifier = container_identifier
        if tracking_number is not None:
            self.tracking_number = tracking_number
        if manifest_id is not None:
            self.manifest_id = manifest_id
        if manifest_date is not None:
            self.manifest_date = manifest_date
        if ship_method is not None:
            self.ship_method = ship_method
        if scac_code is not None:
            self.scac_code = scac_code
        if carrier is not None:
            self.carrier = carrier
        if container_sequence_number is not None:
            self.container_sequence_number = container_sequence_number
        if dimensions is not None:
            self.dimensions = dimensions
        self.weight = weight
        self.packed_items = packed_items

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

        The type of container.  # noqa: E501

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

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

        The type of container.  # noqa: E501

        :param container_type: The container_type of this Container.  # 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_identifier(self):
        """Gets the container_identifier of this Container.  # noqa: E501

        The container identifier.  # noqa: E501

        :return: The container_identifier of this Container.  # noqa: E501
        :rtype: str
        """
        return self._container_identifier

    @container_identifier.setter
    def container_identifier(self, container_identifier):
        """Sets the container_identifier of this Container.

        The container identifier.  # noqa: E501

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

        self._container_identifier = container_identifier

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

        The tracking number.  # noqa: E501

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

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

        The tracking number.  # noqa: E501

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

        self._tracking_number = tracking_number

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

        The manifest identifier.  # noqa: E501

        :return: The manifest_id of this Container.  # noqa: E501
        :rtype: str
        """
        return self._manifest_id

    @manifest_id.setter
    def manifest_id(self, manifest_id):
        """Sets the manifest_id of this Container.

        The manifest identifier.  # noqa: E501

        :param manifest_id: The manifest_id of this Container.  # noqa: E501
        :type: str
        """

        self._manifest_id = manifest_id

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

        The date of the manifest.  # noqa: E501

        :return: The manifest_date of this Container.  # noqa: E501
        :rtype: str
        """
        return self._manifest_date

    @manifest_date.setter
    def manifest_date(self, manifest_date):
        """Sets the manifest_date of this Container.

        The date of the manifest.  # noqa: E501

        :param manifest_date: The manifest_date of this Container.  # noqa: E501
        :type: str
        """

        self._manifest_date = manifest_date

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

        The shipment method. This property is required when calling the `submitShipmentConfirmations` operation, and optional otherwise.  # noqa: E501

        :return: The ship_method of this Container.  # noqa: E501
        :rtype: str
        """
        return self._ship_method

    @ship_method.setter
    def ship_method(self, ship_method):
        """Sets the ship_method of this Container.

        The shipment method. This property is required when calling the `submitShipmentConfirmations` operation, and optional otherwise.  # noqa: E501

        :param ship_method: The ship_method of this Container.  # noqa: E501
        :type: str
        """

        self._ship_method = ship_method

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

        SCAC code required for NA VOC vendors only.  # noqa: E501

        :return: The scac_code of this Container.  # noqa: E501
        :rtype: str
        """
        return self._scac_code

    @scac_code.setter
    def scac_code(self, scac_code):
        """Sets the scac_code of this Container.

        SCAC code required for NA VOC vendors only.  # noqa: E501

        :param scac_code: The scac_code of this Container.  # noqa: E501
        :type: str
        """

        self._scac_code = scac_code

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

        Carrier required for EU VOC vendors only.  # noqa: E501

        :return: The carrier of this Container.  # noqa: E501
        :rtype: str
        """
        return self._carrier

    @carrier.setter
    def carrier(self, carrier):
        """Sets the carrier of this Container.

        Carrier required for EU VOC vendors only.  # noqa: E501

        :param carrier: The carrier of this Container.  # noqa: E501
        :type: str
        """

        self._carrier = carrier

    @property
    def container_sequence_number(self):
        """Gets the container_sequence_number of this Container.  # 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 Container.  # noqa: E501
        :rtype: int
        """
        return self._container_sequence_number

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

        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 Container.  # noqa: E501
        :type: int
        """

        self._container_sequence_number = container_sequence_number

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


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

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


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

        self._dimensions = dimensions

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


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

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


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

        self._weight = weight

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

        A list of packed items.  # noqa: E501

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

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

        A list of packed items.  # noqa: E501

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

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

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