# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class RuleSchemaRuleproperties(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',
        'catalogue': 'RuleSchemaRulepropertiesCatalogue',
        'contributor': 'str',
        '_date': 'str',
        'helper_files': 'list[RuleSchemaRulepropertiesHelperfiles]',
        'supported_devices': 'RuleSchemaRulepropertiesSupporteddevices',
        'supported_healthbot_version': 'str',
        'version': 'int',
        'apply_macro': 'list[ApplyMacroSchema]'
    }

    attribute_map = {
        'author': 'author',
        'catalogue': 'catalogue',
        'contributor': 'contributor',
        '_date': 'date',
        'helper_files': 'helper-files',
        'supported_devices': 'supported-devices',
        'supported_healthbot_version': 'supported-healthbot-version',
        'version': 'version',
        'apply_macro': 'apply-macro'
    }

    def __init__(self, author=None, catalogue=None, contributor=None, _date=None, helper_files=None, supported_devices=None, supported_healthbot_version=None, version=None, apply_macro=None):  # noqa: E501
        """RuleSchemaRuleproperties - a model defined in Swagger"""  # noqa: E501

        self._author = None
        self._catalogue = None
        self._contributor = None
        self.__date = None
        self._helper_files = None
        self._supported_devices = None
        self._supported_healthbot_version = None
        self._version = None
        self._apply_macro = None
        self.discriminator = None

        if author is not None:
            self.author = author
        if catalogue is not None:
            self.catalogue = catalogue
        if contributor is not None:
            self.contributor = contributor
        if _date is not None:
            self._date = _date
        if helper_files is not None:
            self.helper_files = helper_files
        if supported_devices is not None:
            self.supported_devices = supported_devices
        if supported_healthbot_version is not None:
            self.supported_healthbot_version = supported_healthbot_version
        if version is not None:
            self.version = version
        if apply_macro is not None:
            self.apply_macro = apply_macro

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

        E-mail address of the rule writer  # noqa: E501

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

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

        E-mail address of the rule writer  # noqa: E501

        :param author: The author of this RuleSchemaRuleproperties.  # noqa: E501
        :type: str
        """
        if author is not None and not re.search(r'^([\\w\\-_\\.]+)@([\\w])+[.][\\w]+$', author):  # noqa: E501
            raise ValueError(r"Invalid value for `author`, must be a follow pattern or equal to `/^([\\w\\-_\\.]+)@([\\w])+[.][\\w]+$/`")  # noqa: E501

        self._author = author

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


        :return: The catalogue of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: RuleSchemaRulepropertiesCatalogue
        """
        return self._catalogue

    @catalogue.setter
    def catalogue(self, catalogue):
        """Sets the catalogue of this RuleSchemaRuleproperties.


        :param catalogue: The catalogue of this RuleSchemaRuleproperties.  # noqa: E501
        :type: RuleSchemaRulepropertiesCatalogue
        """

        self._catalogue = catalogue

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


        :return: The contributor of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: str
        """
        return self._contributor

    @contributor.setter
    def contributor(self, contributor):
        """Sets the contributor of this RuleSchemaRuleproperties.


        :param contributor: The contributor of this RuleSchemaRuleproperties.  # noqa: E501
        :type: str
        """
        allowed_values = ["juniper", "external"]  # noqa: E501
        if contributor not in allowed_values:
            raise ValueError(
                "Invalid value for `contributor` ({0}), must be one of {1}"  # noqa: E501
                .format(contributor, allowed_values)
            )

        self._contributor = contributor

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


        :return: The _date of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: str
        """
        return self.__date

    @_date.setter
    def _date(self, _date):
        """Sets the _date of this RuleSchemaRuleproperties.


        :param _date: The _date of this RuleSchemaRuleproperties.  # noqa: E501
        :type: str
        """
        if _date is not None and not re.search(r'^(19|20)\\d\\d[\/](0[1-9]|1[012])[\/](0[1-9]|[12][0-9]|3[01])$', _date):  # noqa: E501
            raise ValueError(r"Invalid value for `_date`, must be a follow pattern or equal to `/^(19|20)\\d\\d[\/](0[1-9]|1[012])[\/](0[1-9]|[12][0-9]|3[01])$/`")  # noqa: E501

        self.__date = _date

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


        :return: The helper_files of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: list[RuleSchemaRulepropertiesHelperfiles]
        """
        return self._helper_files

    @helper_files.setter
    def helper_files(self, helper_files):
        """Sets the helper_files of this RuleSchemaRuleproperties.


        :param helper_files: The helper_files of this RuleSchemaRuleproperties.  # noqa: E501
        :type: list[RuleSchemaRulepropertiesHelperfiles]
        """

        self._helper_files = helper_files

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


        :return: The supported_devices of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: RuleSchemaRulepropertiesSupporteddevices
        """
        return self._supported_devices

    @supported_devices.setter
    def supported_devices(self, supported_devices):
        """Sets the supported_devices of this RuleSchemaRuleproperties.


        :param supported_devices: The supported_devices of this RuleSchemaRuleproperties.  # noqa: E501
        :type: RuleSchemaRulepropertiesSupporteddevices
        """

        self._supported_devices = supported_devices

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

        Healthbot version in which is rule is supported  # noqa: E501

        :return: The supported_healthbot_version of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: str
        """
        return self._supported_healthbot_version

    @supported_healthbot_version.setter
    def supported_healthbot_version(self, supported_healthbot_version):
        """Sets the supported_healthbot_version of this RuleSchemaRuleproperties.

        Healthbot version in which is rule is supported  # noqa: E501

        :param supported_healthbot_version: The supported_healthbot_version of this RuleSchemaRuleproperties.  # noqa: E501
        :type: str
        """
        if supported_healthbot_version is not None and not re.search(r'^(\\d){1,2}[-.](\\d){1,2}[-.](\\d){1,2}$', supported_healthbot_version):  # noqa: E501
            raise ValueError(r"Invalid value for `supported_healthbot_version`, must be a follow pattern or equal to `/^(\\d){1,2}[-.](\\d){1,2}[-.](\\d){1,2}$/`")  # noqa: E501

        self._supported_healthbot_version = supported_healthbot_version

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

        Rule version, an integer value needs to be incremented for any major change  # noqa: E501

        :return: The version of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: int
        """
        return self._version

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

        Rule version, an integer value needs to be incremented for any major change  # noqa: E501

        :param version: The version of this RuleSchemaRuleproperties.  # noqa: E501
        :type: int
        """

        self._version = version

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


        :return: The apply_macro of this RuleSchemaRuleproperties.  # noqa: E501
        :rtype: list[ApplyMacroSchema]
        """
        return self._apply_macro

    @apply_macro.setter
    def apply_macro(self, apply_macro):
        """Sets the apply_macro of this RuleSchemaRuleproperties.


        :param apply_macro: The apply_macro of this RuleSchemaRuleproperties.  # noqa: E501
        :type: list[ApplyMacroSchema]
        """

        self._apply_macro = apply_macro

    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(RuleSchemaRuleproperties, 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, RuleSchemaRuleproperties):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
