# 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 ContentDocument(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 = {
        'name': 'str',
        'content_type': 'ContentType',
        'content_sub_type': 'str',
        'locale': 'str',
        'content_module_list': 'List[ContentModule]',
    }

    attribute_map = {
        'name': 'name',
        'content_type': 'contentType',
        'content_sub_type': 'contentSubType',
        'locale': 'locale',
        'content_module_list': 'contentModuleList',
    }

    def __init__(self, name=None, content_type=None, content_sub_type=None, locale=None, content_module_list=None, _configuration=None):  # noqa: E501
        """ContentDocument - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._content_type = None
        self._content_sub_type = None
        self._locale = None
        self._content_module_list = None
        self.discriminator = None

        self.name = name
        self.content_type = content_type
        if content_sub_type is not None:
            self.content_sub_type = content_sub_type
        self.locale = locale
        self.content_module_list = content_module_list

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

        The A+ Content document name.  # noqa: E501

        :return: The name of this ContentDocument.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ContentDocument.

        The A+ Content document name.  # noqa: E501

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

        self._name = name

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


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

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


        :param content_type: The content_type of this ContentDocument.  # 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 ContentDocument.  # 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 ContentDocument.  # 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 ContentDocument.

        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 ContentDocument.  # 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 locale(self):
        """Gets the locale of this ContentDocument.  # 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 ContentDocument.  # noqa: E501
        :rtype: str
        """
        return self._locale

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

        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 ContentDocument.  # 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 content_module_list(self):
        """Gets the content_module_list of this ContentDocument.  # noqa: E501

        A list of A+ Content modules.  # noqa: E501

        :return: The content_module_list of this ContentDocument.  # noqa: E501
        :rtype: List[ContentModule]
        """
        return self._content_module_list

    @content_module_list.setter
    def content_module_list(self, content_module_list):
        """Sets the content_module_list of this ContentDocument.

        A list of A+ Content modules.  # noqa: E501

        :param content_module_list: The content_module_list of this ContentDocument.  # noqa: E501
        :type: List[ContentModule]
        """
        if self._configuration.client_side_validation and content_module_list is None:
            raise ValueError("Invalid value for `content_module_list`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                content_module_list is not None and len(content_module_list) > 100):
            raise ValueError("Invalid value for `content_module_list`, number of items must be less than or equal to `100`")  # noqa: E501
        if (self._configuration.client_side_validation and
                content_module_list is not None and len(content_module_list) < 1):
            raise ValueError("Invalid value for `content_module_list`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._content_module_list = content_module_list

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

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