# coding: utf-8

"""
    Sparks OpenAPI

    Generated documentation for the Logicdrop Sparks API and OpenAPI clients.  Logicdrop Sparks lets users build rules, analyze data, and automate documents.  Use it to make decisions faster, generate documents better, and learn from your data.  ### Documentation - [User Documentation](https://docs.logicdrop.com)  ### Modules - [Sparks Compute](https://docs.logicdrop.com/rules/introduction) - [Sparks Decision Tables](https://docs.logicdrop.com/rules/authoring-decision-tables) - [Sparks Documents](https://docs.logicdrop.com/documents/introduction)  ### Clients - [OpenAPI Clients](https://docs.logicdrop.com/development/sample-clients)  ### Security - [Authorizing API Requests](https://docs.logicdrop.com/development/authorization)   # noqa: E501

    The version of the OpenAPI document: v_VERSION_._BUILD_
    Contact: support@logicdrop.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from logicdrop.sparks.openapi.configuration import Configuration


class ComputeRule(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'str',
        'name': 'str',
        'client': 'str',
        'project': 'str',
        'version': 'str',
        'build': 'int',
        'url': 'str',
        'agenda_group': 'str',
        'activation_group': 'str',
        'ruleflow_group': 'str',
        'no_loop': 'bool',
        'lock_on_active': 'bool',
        'enabled': 'bool',
        'log': 'bool',
        'ruleset': 'str',
        'description': 'str',
        'created': 'datetime',
        'modified': 'datetime',
        'tags': 'list[str]',
        'properties': 'dict(str, object)',
        'salience': 'int'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'client': 'client',
        'project': 'project',
        'version': 'version',
        'build': 'build',
        'url': 'url',
        'agenda_group': 'agendaGroup',
        'activation_group': 'activationGroup',
        'ruleflow_group': 'ruleflowGroup',
        'no_loop': 'noLoop',
        'lock_on_active': 'lockOnActive',
        'enabled': 'enabled',
        'log': 'log',
        'ruleset': 'ruleset',
        'description': 'description',
        'created': 'created',
        'modified': 'modified',
        'tags': 'tags',
        'properties': 'properties',
        'salience': 'salience'
    }

    def __init__(self, id=None, name=None, client=None, project=None, version=None, build=None, url=None, agenda_group=None, activation_group=None, ruleflow_group=None, no_loop=None, lock_on_active=None, enabled=None, log=None, ruleset=None, description=None, created=None, modified=None, tags=None, properties=None, salience=None, local_vars_configuration=None):  # noqa: E501
        """ComputeRule - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._name = None
        self._client = None
        self._project = None
        self._version = None
        self._build = None
        self._url = None
        self._agenda_group = None
        self._activation_group = None
        self._ruleflow_group = None
        self._no_loop = None
        self._lock_on_active = None
        self._enabled = None
        self._log = None
        self._ruleset = None
        self._description = None
        self._created = None
        self._modified = None
        self._tags = None
        self._properties = None
        self._salience = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if client is not None:
            self.client = client
        if project is not None:
            self.project = project
        if version is not None:
            self.version = version
        if build is not None:
            self.build = build
        if url is not None:
            self.url = url
        if agenda_group is not None:
            self.agenda_group = agenda_group
        if activation_group is not None:
            self.activation_group = activation_group
        if ruleflow_group is not None:
            self.ruleflow_group = ruleflow_group
        if no_loop is not None:
            self.no_loop = no_loop
        if lock_on_active is not None:
            self.lock_on_active = lock_on_active
        if enabled is not None:
            self.enabled = enabled
        if log is not None:
            self.log = log
        if ruleset is not None:
            self.ruleset = ruleset
        if description is not None:
            self.description = description
        if created is not None:
            self.created = created
        if modified is not None:
            self.modified = modified
        if tags is not None:
            self.tags = tags
        if properties is not None:
            self.properties = properties
        if salience is not None:
            self.salience = salience

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


        :return: The id of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ComputeRule.


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

        self._id = id

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


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

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


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

        self._name = name

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


        :return: The client of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._client

    @client.setter
    def client(self, client):
        """Sets the client of this ComputeRule.


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

        self._client = client

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


        :return: The project of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._project

    @project.setter
    def project(self, project):
        """Sets the project of this ComputeRule.


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

        self._project = project

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


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

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


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

        self._version = version

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


        :return: The build of this ComputeRule.  # noqa: E501
        :rtype: int
        """
        return self._build

    @build.setter
    def build(self, build):
        """Sets the build of this ComputeRule.


        :param build: The build of this ComputeRule.  # noqa: E501
        :type: int
        """

        self._build = build

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


        :return: The url of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this ComputeRule.


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

        self._url = url

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


        :return: The agenda_group of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._agenda_group

    @agenda_group.setter
    def agenda_group(self, agenda_group):
        """Sets the agenda_group of this ComputeRule.


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

        self._agenda_group = agenda_group

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


        :return: The activation_group of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._activation_group

    @activation_group.setter
    def activation_group(self, activation_group):
        """Sets the activation_group of this ComputeRule.


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

        self._activation_group = activation_group

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


        :return: The ruleflow_group of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._ruleflow_group

    @ruleflow_group.setter
    def ruleflow_group(self, ruleflow_group):
        """Sets the ruleflow_group of this ComputeRule.


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

        self._ruleflow_group = ruleflow_group

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


        :return: The no_loop of this ComputeRule.  # noqa: E501
        :rtype: bool
        """
        return self._no_loop

    @no_loop.setter
    def no_loop(self, no_loop):
        """Sets the no_loop of this ComputeRule.


        :param no_loop: The no_loop of this ComputeRule.  # noqa: E501
        :type: bool
        """

        self._no_loop = no_loop

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


        :return: The lock_on_active of this ComputeRule.  # noqa: E501
        :rtype: bool
        """
        return self._lock_on_active

    @lock_on_active.setter
    def lock_on_active(self, lock_on_active):
        """Sets the lock_on_active of this ComputeRule.


        :param lock_on_active: The lock_on_active of this ComputeRule.  # noqa: E501
        :type: bool
        """

        self._lock_on_active = lock_on_active

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


        :return: The enabled of this ComputeRule.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this ComputeRule.


        :param enabled: The enabled of this ComputeRule.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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


        :return: The log of this ComputeRule.  # noqa: E501
        :rtype: bool
        """
        return self._log

    @log.setter
    def log(self, log):
        """Sets the log of this ComputeRule.


        :param log: The log of this ComputeRule.  # noqa: E501
        :type: bool
        """

        self._log = log

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


        :return: The ruleset of this ComputeRule.  # noqa: E501
        :rtype: str
        """
        return self._ruleset

    @ruleset.setter
    def ruleset(self, ruleset):
        """Sets the ruleset of this ComputeRule.


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

        self._ruleset = ruleset

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


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

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


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

        self._description = description

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


        :return: The created of this ComputeRule.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this ComputeRule.


        :param created: The created of this ComputeRule.  # noqa: E501
        :type: datetime
        """

        self._created = created

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


        :return: The modified of this ComputeRule.  # noqa: E501
        :rtype: datetime
        """
        return self._modified

    @modified.setter
    def modified(self, modified):
        """Sets the modified of this ComputeRule.


        :param modified: The modified of this ComputeRule.  # noqa: E501
        :type: datetime
        """

        self._modified = modified

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


        :return: The tags of this ComputeRule.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

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


        :param tags: The tags of this ComputeRule.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

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


        :return: The properties of this ComputeRule.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this ComputeRule.


        :param properties: The properties of this ComputeRule.  # noqa: E501
        :type: dict(str, object)
        """

        self._properties = properties

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


        :return: The salience of this ComputeRule.  # noqa: E501
        :rtype: int
        """
        return self._salience

    @salience.setter
    def salience(self, salience):
        """Sets the salience of this ComputeRule.


        :param salience: The salience of this ComputeRule.  # noqa: E501
        :type: int
        """

        self._salience = salience

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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