# 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 LabelData(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 = {
        'label_sequence_number': 'int',
        'label_format': 'str',
        'carrier_code': 'str',
        'tracking_id': 'str',
        'label': 'str',
    }

    attribute_map = {
        'label_sequence_number': 'labelSequenceNumber',
        'label_format': 'labelFormat',
        'carrier_code': 'carrierCode',
        'tracking_id': 'trackingId',
        'label': 'label',
    }

    def __init__(self, label_sequence_number=None, label_format=None, carrier_code=None, tracking_id=None, label=None, _configuration=None):  # noqa: E501
        """LabelData - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._label_sequence_number = None
        self._label_format = None
        self._carrier_code = None
        self._tracking_id = None
        self._label = None
        self.discriminator = None

        if label_sequence_number is not None:
            self.label_sequence_number = label_sequence_number
        if label_format is not None:
            self.label_format = label_format
        if carrier_code is not None:
            self.carrier_code = carrier_code
        if tracking_id is not None:
            self.tracking_id = tracking_id
        if label is not None:
            self.label = label

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

        A sequential number assigned to each label within a shipment.  # noqa: E501

        :return: The label_sequence_number of this LabelData.  # noqa: E501
        :rtype: int
        """
        return self._label_sequence_number

    @label_sequence_number.setter
    def label_sequence_number(self, label_sequence_number):
        """Sets the label_sequence_number of this LabelData.

        A sequential number assigned to each label within a shipment.  # noqa: E501

        :param label_sequence_number: The label_sequence_number of this LabelData.  # noqa: E501
        :type: int
        """

        self._label_sequence_number = label_sequence_number

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

        The format of the label.  # noqa: E501

        :return: The label_format of this LabelData.  # noqa: E501
        :rtype: str
        """
        return self._label_format

    @label_format.setter
    def label_format(self, label_format):
        """Sets the label_format of this LabelData.

        The format of the label.  # noqa: E501

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

        self._label_format = label_format

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

        Unique identification of the carrier.  # noqa: E501

        :return: The carrier_code of this LabelData.  # noqa: E501
        :rtype: str
        """
        return self._carrier_code

    @carrier_code.setter
    def carrier_code(self, carrier_code):
        """Sets the carrier_code of this LabelData.

        Unique identification of the carrier.  # noqa: E501

        :param carrier_code: The carrier_code of this LabelData.  # noqa: E501
        :type: str
        """

        self._carrier_code = carrier_code

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

        Tracking Id for the transportation.  # noqa: E501

        :return: The tracking_id of this LabelData.  # noqa: E501
        :rtype: str
        """
        return self._tracking_id

    @tracking_id.setter
    def tracking_id(self, tracking_id):
        """Sets the tracking_id of this LabelData.

        Tracking Id for the transportation.  # noqa: E501

        :param tracking_id: The tracking_id of this LabelData.  # noqa: E501
        :type: str
        """

        self._tracking_id = tracking_id

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

        The base-64 encoded string that represents the shipment label.  # noqa: E501

        :return: The label of this LabelData.  # noqa: E501
        :rtype: str
        """
        return self._label

    @label.setter
    def label(self, label):
        """Sets the label of this LabelData.

        The base-64 encoded string that represents the shipment label.  # noqa: E501

        :param label: The label of this LabelData.  # noqa: E501
        :type: str
        """

        self._label = label

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

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