# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

    OpenAPI spec version: 4.14.0
    Contact: support@rackn.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class ContentMetaData(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 = {
        'author': 'str',
        'code_source': 'str',
        'color': 'str',
        'copyright': 'str',
        'description': 'str',
        'display_name': 'str',
        'doc_url': 'str',
        'documentation': 'str',
        'icon': 'str',
        'license': 'str',
        'name': 'str',
        'order': 'str',
        'overwritable': 'bool',
        'prerequisites': 'str',
        'required_features': 'str',
        'source': 'str',
        'tags': 'str',
        'type': 'str',
        'version': 'str',
        'writable': 'bool'
    }

    attribute_map = {
        'author': 'Author',
        'code_source': 'CodeSource',
        'color': 'Color',
        'copyright': 'Copyright',
        'description': 'Description',
        'display_name': 'DisplayName',
        'doc_url': 'DocUrl',
        'documentation': 'Documentation',
        'icon': 'Icon',
        'license': 'License',
        'name': 'Name',
        'order': 'Order',
        'overwritable': 'Overwritable',
        'prerequisites': 'Prerequisites',
        'required_features': 'RequiredFeatures',
        'source': 'Source',
        'tags': 'Tags',
        'type': 'Type',
        'version': 'Version',
        'writable': 'Writable'
    }

    def __init__(self, author=None, code_source=None, color=None, copyright=None, description=None, display_name=None, doc_url=None, documentation=None, icon=None, license=None, name=None, order=None, overwritable=None, prerequisites=None, required_features=None, source=None, tags=None, type=None, version=None, writable=None, _configuration=None):  # noqa: E501
        """ContentMetaData - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._author = None
        self._code_source = None
        self._color = None
        self._copyright = None
        self._description = None
        self._display_name = None
        self._doc_url = None
        self._documentation = None
        self._icon = None
        self._license = None
        self._name = None
        self._order = None
        self._overwritable = None
        self._prerequisites = None
        self._required_features = None
        self._source = None
        self._tags = None
        self._type = None
        self._version = None
        self._writable = None
        self.discriminator = None

        if author is not None:
            self.author = author
        if code_source is not None:
            self.code_source = code_source
        if color is not None:
            self.color = color
        if copyright is not None:
            self.copyright = copyright
        if description is not None:
            self.description = description
        if display_name is not None:
            self.display_name = display_name
        if doc_url is not None:
            self.doc_url = doc_url
        if documentation is not None:
            self.documentation = documentation
        if icon is not None:
            self.icon = icon
        if license is not None:
            self.license = license
        self.name = name
        if order is not None:
            self.order = order
        if overwritable is not None:
            self.overwritable = overwritable
        if prerequisites is not None:
            self.prerequisites = prerequisites
        if required_features is not None:
            self.required_features = required_features
        if source is not None:
            self.source = source
        if tags is not None:
            self.tags = tags
        if type is not None:
            self.type = type
        if version is not None:
            self.version = version
        if writable is not None:
            self.writable = writable

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

        Author should contain the name of the author along with their email address.  # noqa: E501

        :return: The author of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._author

    @author.setter
    def author(self, author):
        """Sets the author of this ContentMetaData.

        Author should contain the name of the author along with their email address.  # noqa: E501

        :param author: The author of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._author = author

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

        CodeSource should be a URL to the repository that this content was built from, if applicable.  # noqa: E501

        :return: The code_source of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._code_source

    @code_source.setter
    def code_source(self, code_source):
        """Sets the code_source of this ContentMetaData.

        CodeSource should be a URL to the repository that this content was built from, if applicable.  # noqa: E501

        :param code_source: The code_source of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._code_source = code_source

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

        Color is the color the Icon should show up as in the UX.  Color names must be one of the ones available from https://react.semantic-ui.com/elements/button/#types-basic-shorthand  # noqa: E501

        :return: The color of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._color

    @color.setter
    def color(self, color):
        """Sets the color of this ContentMetaData.

        Color is the color the Icon should show up as in the UX.  Color names must be one of the ones available from https://react.semantic-ui.com/elements/button/#types-basic-shorthand  # noqa: E501

        :param color: The color of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._color = color

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

        Copyright is the copyright terms for this content.  # noqa: E501

        :return: The copyright of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._copyright

    @copyright.setter
    def copyright(self, copyright):
        """Sets the copyright of this ContentMetaData.

        Copyright is the copyright terms for this content.  # noqa: E501

        :param copyright: The copyright of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._copyright = copyright

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

        Description is a one or two line description of what the content bundle provides.  # noqa: E501

        :return: The description of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ContentMetaData.

        Description is a one or two line description of what the content bundle provides.  # noqa: E501

        :param description: The description of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._description = description

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

        DisplayName is the froiendly name the UX will use by default.  # noqa: E501

        :return: The display_name of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this ContentMetaData.

        DisplayName is the froiendly name the UX will use by default.  # noqa: E501

        :param display_name: The display_name of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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

        DocUrl should contain a link to external documentation for this content, if available.  # noqa: E501

        :return: The doc_url of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._doc_url

    @doc_url.setter
    def doc_url(self, doc_url):
        """Sets the doc_url of this ContentMetaData.

        DocUrl should contain a link to external documentation for this content, if available.  # noqa: E501

        :param doc_url: The doc_url of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._doc_url = doc_url

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

        Documentation should contain Sphinx RST formatted documentation for the content bundle describing its usage.  # noqa: E501

        :return: The documentation of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._documentation

    @documentation.setter
    def documentation(self, documentation):
        """Sets the documentation of this ContentMetaData.

        Documentation should contain Sphinx RST formatted documentation for the content bundle describing its usage.  # noqa: E501

        :param documentation: The documentation of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._documentation = documentation

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

        Icon is the icon that should be used to represent this content bundle. We use icons from https://react.semantic-ui.com/elements/icon/  # noqa: E501

        :return: The icon of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._icon

    @icon.setter
    def icon(self, icon):
        """Sets the icon of this ContentMetaData.

        Icon is the icon that should be used to represent this content bundle. We use icons from https://react.semantic-ui.com/elements/icon/  # noqa: E501

        :param icon: The icon of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._icon = icon

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

        License should be the name of the license that governs the terms the content is made available under.  # noqa: E501

        :return: The license of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._license

    @license.setter
    def license(self, license):
        """Sets the license of this ContentMetaData.

        License should be the name of the license that governs the terms the content is made available under.  # noqa: E501

        :param license: The license of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._license = license

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

        Name is the name of the content bundle.  Name must be unique across all content bundles loaded into a given dr-provision instance.  # noqa: E501

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

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

        Name is the name of the content bundle.  Name must be unique across all content bundles loaded into a given dr-provision instance.  # noqa: E501

        :param name: The name of this ContentMetaData.  # 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

        self._name = name

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

        Order gives a hint about the relaitve importance of this content when the UX is rendering it.  Deprecated, can be left blank.  # noqa: E501

        :return: The order of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._order

    @order.setter
    def order(self, order):
        """Sets the order of this ContentMetaData.

        Order gives a hint about the relaitve importance of this content when the UX is rendering it.  Deprecated, can be left blank.  # noqa: E501

        :param order: The order of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._order = order

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

        Overwritable controls whether objects provided by this content store can be overridden by identically identified objects from another content bundle.  This will be false for everything but the BasicStore. This field is read-only, and cannot be changed via the API.  # noqa: E501

        :return: The overwritable of this ContentMetaData.  # noqa: E501
        :rtype: bool
        """
        return self._overwritable

    @overwritable.setter
    def overwritable(self, overwritable):
        """Sets the overwritable of this ContentMetaData.

        Overwritable controls whether objects provided by this content store can be overridden by identically identified objects from another content bundle.  This will be false for everything but the BasicStore. This field is read-only, and cannot be changed via the API.  # noqa: E501

        :param overwritable: The overwritable of this ContentMetaData.  # noqa: E501
        :type: bool
        """

        self._overwritable = overwritable

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

        Prerequisites is also a comma-separated list that contains other (possibly version-qualified) content bundles that must be present for this content bundle to load into dr-provision.  Each entry in the Prerequisites list should be in for format of name: version constraints.  The colon and the version constraints may be omitted if there are no version restrictions on the required content bundle.  See ../doc/arch/content-package.rst for more detailed info.  # noqa: E501

        :return: The prerequisites of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._prerequisites

    @prerequisites.setter
    def prerequisites(self, prerequisites):
        """Sets the prerequisites of this ContentMetaData.

        Prerequisites is also a comma-separated list that contains other (possibly version-qualified) content bundles that must be present for this content bundle to load into dr-provision.  Each entry in the Prerequisites list should be in for format of name: version constraints.  The colon and the version constraints may be omitted if there are no version restrictions on the required content bundle.  See ../doc/arch/content-package.rst for more detailed info.  # noqa: E501

        :param prerequisites: The prerequisites of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._prerequisites = prerequisites

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

        RequiredFeatures is a comma-separated list of features that dr-provision must provide for the content bundle to operate properly. These correspond to the Features field in the Info struct.  # noqa: E501

        :return: The required_features of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._required_features

    @required_features.setter
    def required_features(self, required_features):
        """Sets the required_features of this ContentMetaData.

        RequiredFeatures is a comma-separated list of features that dr-provision must provide for the content bundle to operate properly. These correspond to the Features field in the Info struct.  # noqa: E501

        :param required_features: The required_features of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._required_features = required_features

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

        Source is mostly deprecated, replaced by Author and CodeSource. It can be left blank.  # noqa: E501

        :return: The source of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this ContentMetaData.

        Source is mostly deprecated, replaced by Author and CodeSource. It can be left blank.  # noqa: E501

        :param source: The source of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._source = source

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

        Tags is used in the UX to categorize content bundles according to various criteria.  It should be a comma-separated list of single words.  # noqa: E501

        :return: The tags of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this ContentMetaData.

        Tags is used in the UX to categorize content bundles according to various criteria.  It should be a comma-separated list of single words.  # noqa: E501

        :param tags: The tags of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._tags = tags

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

        Type contains what type of content bundle this is.  It is read-only, and cannot be changed voa the API.  # noqa: E501

        :return: The type of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this ContentMetaData.

        Type contains what type of content bundle this is.  It is read-only, and cannot be changed voa the API.  # noqa: E501

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

        self._type = type

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

        Version is a Semver-compliant string describing the version of the content as a whole.  If left empty, the version is assumed to be 0.0.0  # noqa: E501

        :return: The version of this ContentMetaData.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this ContentMetaData.

        Version is a Semver-compliant string describing the version of the content as a whole.  If left empty, the version is assumed to be 0.0.0  # noqa: E501

        :param version: The version of this ContentMetaData.  # noqa: E501
        :type: str
        """

        self._version = version

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

        Writable controls whether objects provided by this content can be modified independently via the API. This will be false for everything but the BackingStore.  It is read-only, and cannot be changed via the API.  # noqa: E501

        :return: The writable of this ContentMetaData.  # noqa: E501
        :rtype: bool
        """
        return self._writable

    @writable.setter
    def writable(self, writable):
        """Sets the writable of this ContentMetaData.

        Writable controls whether objects provided by this content can be modified independently via the API. This will be false for everything but the BackingStore.  It is read-only, and cannot be changed via the API.  # noqa: E501

        :param writable: The writable of this ContentMetaData.  # noqa: E501
        :type: bool
        """

        self._writable = writable

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

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