# coding: utf-8

"""
    The Selling Partner API for FBA inbound operations.

    The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.

    The version of the OpenAPI document: 2024-03-20
    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 BoxIdentifierInput(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 = {
        'external_container_identifier': 'str',
        'external_container_identifier_type': 'BoxIdentifierType',
        'package_id': 'str',
    }

    attribute_map = {
        'external_container_identifier': 'externalContainerIdentifier',
        'external_container_identifier_type': 'externalContainerIdentifierType',
        'package_id': 'packageId',
    }

    def __init__(self, external_container_identifier=None, external_container_identifier_type=None, package_id=None, _configuration=None):  # noqa: E501
        """BoxIdentifierInput - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._external_container_identifier = None
        self._external_container_identifier_type = None
        self._package_id = None
        self.discriminator = None

        if external_container_identifier is not None:
            self.external_container_identifier = external_container_identifier
        self.external_container_identifier_type = external_container_identifier_type
        self.package_id = package_id

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

        The custom identifier for a certain box.  # noqa: E501

        :return: The external_container_identifier of this BoxIdentifierInput.  # noqa: E501
        :rtype: str
        """
        return self._external_container_identifier

    @external_container_identifier.setter
    def external_container_identifier(self, external_container_identifier):
        """Sets the external_container_identifier of this BoxIdentifierInput.

        The custom identifier for a certain box.  # noqa: E501

        :param external_container_identifier: The external_container_identifier of this BoxIdentifierInput.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                external_container_identifier is not None and len(external_container_identifier) > 1024):
            raise ValueError("Invalid value for `external_container_identifier`, length must be less than or equal to `1024`")  # noqa: E501
        if (self._configuration.client_side_validation and
                external_container_identifier is not None and len(external_container_identifier) < 1):
            raise ValueError("Invalid value for `external_container_identifier`, length must be greater than or equal to `1`")  # noqa: E501

        self._external_container_identifier = external_container_identifier

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


        :return: The external_container_identifier_type of this BoxIdentifierInput.  # noqa: E501
        :rtype: BoxIdentifierType
        """
        return self._external_container_identifier_type

    @external_container_identifier_type.setter
    def external_container_identifier_type(self, external_container_identifier_type):
        """Sets the external_container_identifier_type of this BoxIdentifierInput.


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

        self._external_container_identifier_type = external_container_identifier_type

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

        Primary key to uniquely identify a Box Package.  # noqa: E501

        :return: The package_id of this BoxIdentifierInput.  # noqa: E501
        :rtype: str
        """
        return self._package_id

    @package_id.setter
    def package_id(self, package_id):
        """Sets the package_id of this BoxIdentifierInput.

        Primary key to uniquely identify a Box Package.  # noqa: E501

        :param package_id: The package_id of this BoxIdentifierInput.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and package_id is None:
            raise ValueError("Invalid value for `package_id`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                package_id is not None and len(package_id) > 38):
            raise ValueError("Invalid value for `package_id`, length must be less than or equal to `38`")  # noqa: E501
        if (self._configuration.client_side_validation and
                package_id is not None and len(package_id) < 38):
            raise ValueError("Invalid value for `package_id`, length must be greater than or equal to `38`")  # noqa: E501
        if (self._configuration.client_side_validation and
                package_id is not None and not re.search(r'^[a-zA-Z0-9-]*$', package_id)):  # noqa: E501
            raise ValueError(r"Invalid value for `package_id`, must be a follow pattern or equal to `/^[a-zA-Z0-9-]*$/`")  # noqa: E501

        self._package_id = package_id

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

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