# coding: utf-8

"""
    Selling Partner API for A+ Content Management

    Use the A+ Content API to build applications that help selling partners add rich marketing content to their Amazon product detail pages. Selling partners can use A+ content to share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners use content modules to add images and text.

    The version of the OpenAPI document: 2020-11-01
    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 PublishRecord(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 = {
        'marketplace_id': 'str',
        'locale': 'str',
        'asin': 'str',
        'content_type': 'ContentType',
        'content_sub_type': 'str',
        'content_reference_key': 'str',
    }

    attribute_map = {
        'marketplace_id': 'marketplaceId',
        'locale': 'locale',
        'asin': 'asin',
        'content_type': 'contentType',
        'content_sub_type': 'contentSubType',
        'content_reference_key': 'contentReferenceKey',
    }

    def __init__(self, marketplace_id=None, locale=None, asin=None, content_type=None, content_sub_type=None, content_reference_key=None, _configuration=None):  # noqa: E501
        """PublishRecord - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._marketplace_id = None
        self._locale = None
        self._asin = None
        self._content_type = None
        self._content_sub_type = None
        self._content_reference_key = None
        self.discriminator = None

        self.marketplace_id = marketplace_id
        self.locale = locale
        self.asin = asin
        self.content_type = content_type
        if content_sub_type is not None:
            self.content_sub_type = content_sub_type
        self.content_reference_key = content_reference_key

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

        The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).  # noqa: E501

        :return: The marketplace_id of this PublishRecord.  # noqa: E501
        :rtype: str
        """
        return self._marketplace_id

    @marketplace_id.setter
    def marketplace_id(self, marketplace_id):
        """Sets the marketplace_id of this PublishRecord.

        The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).  # noqa: E501

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

        self._marketplace_id = marketplace_id

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

        The IETF language tag, which supports the primary language subtag and one secondary language subtag. The secondary language subtag is usually a regional designation. This doesn't support subtags other than the primary and secondary subtags. **Pattern:** ^[a-z]{2,}-[A-Z0-9]{2,}$  # noqa: E501

        :return: The locale of this PublishRecord.  # noqa: E501
        :rtype: str
        """
        return self._locale

    @locale.setter
    def locale(self, locale):
        """Sets the locale of this PublishRecord.

        The IETF language tag, which supports the primary language subtag and one secondary language subtag. The secondary language subtag is usually a regional designation. This doesn't support subtags other than the primary and secondary subtags. **Pattern:** ^[a-z]{2,}-[A-Z0-9]{2,}$  # noqa: E501

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

        self._locale = locale

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

        The Amazon Standard Identification Number (ASIN).  # noqa: E501

        :return: The asin of this PublishRecord.  # noqa: E501
        :rtype: str
        """
        return self._asin

    @asin.setter
    def asin(self, asin):
        """Sets the asin of this PublishRecord.

        The Amazon Standard Identification Number (ASIN).  # noqa: E501

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

        self._asin = asin

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


        :return: The content_type of this PublishRecord.  # noqa: E501
        :rtype: ContentType
        """
        return self._content_type

    @content_type.setter
    def content_type(self, content_type):
        """Sets the content_type of this PublishRecord.


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

        self._content_type = content_type

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

        The A+ Content document subtype. This represents a special-purpose type of an A+ Content document. Not every A+ Content document type has a subtype, and subtypes can change at any time.  # noqa: E501

        :return: The content_sub_type of this PublishRecord.  # noqa: E501
        :rtype: str
        """
        return self._content_sub_type

    @content_sub_type.setter
    def content_sub_type(self, content_sub_type):
        """Sets the content_sub_type of this PublishRecord.

        The A+ Content document subtype. This represents a special-purpose type of an A+ Content document. Not every A+ Content document type has a subtype, and subtypes can change at any time.  # noqa: E501

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

        self._content_sub_type = content_sub_type

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

        A unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier.  # noqa: E501

        :return: The content_reference_key of this PublishRecord.  # noqa: E501
        :rtype: str
        """
        return self._content_reference_key

    @content_reference_key.setter
    def content_reference_key(self, content_reference_key):
        """Sets the content_reference_key of this PublishRecord.

        A unique reference key for the A+ Content document. A content reference key cannot form a permalink and might change in the future. A content reference key is not guaranteed to match any A+ content identifier.  # noqa: E501

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

        self._content_reference_key = content_reference_key

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

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