# 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 ComputeRuleset(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',
        'artifact': 'str',
        'version': 'str',
        'build': 'int',
        'url': 'str',
        'source': 'str',
        'package': 'str',
        'identity': 'bool',
        'stateless': 'bool',
        'description': 'str',
        'created': 'datetime',
        'modified': 'datetime',
        'tags': 'list[str]',
        'properties': 'dict(str, object)',
        'imports': 'list[str]',
        'globals': 'dict(str, str)',
        'types': 'list[RuleType]'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'client': 'client',
        'project': 'project',
        'artifact': 'artifact',
        'version': 'version',
        'build': 'build',
        'url': 'url',
        'source': 'source',
        'package': 'package',
        'identity': 'identity',
        'stateless': 'stateless',
        'description': 'description',
        'created': 'created',
        'modified': 'modified',
        'tags': 'tags',
        'properties': 'properties',
        'imports': 'imports',
        'globals': 'globals',
        'types': 'types'
    }

    def __init__(self, id=None, name=None, client=None, project=None, artifact=None, version=None, build=None, url=None, source=None, package=None, identity=None, stateless=None, description=None, created=None, modified=None, tags=None, properties=None, imports=None, globals=None, types=None, local_vars_configuration=None):  # noqa: E501
        """ComputeRuleset - 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._artifact = None
        self._version = None
        self._build = None
        self._url = None
        self._source = None
        self._package = None
        self._identity = None
        self._stateless = None
        self._description = None
        self._created = None
        self._modified = None
        self._tags = None
        self._properties = None
        self._imports = None
        self._globals = None
        self._types = 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 artifact is not None:
            self.artifact = artifact
        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 source is not None:
            self.source = source
        if package is not None:
            self.package = package
        if identity is not None:
            self.identity = identity
        if stateless is not None:
            self.stateless = stateless
        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 imports is not None:
            self.imports = imports
        if globals is not None:
            self.globals = globals
        if types is not None:
            self.types = types

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


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

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


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

        self._id = id

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


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

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


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

        self._name = name

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


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

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


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

        self._client = client

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


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

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


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

        self._project = project

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


        :return: The artifact of this ComputeRuleset.  # noqa: E501
        :rtype: str
        """
        return self._artifact

    @artifact.setter
    def artifact(self, artifact):
        """Sets the artifact of this ComputeRuleset.


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

        self._artifact = artifact

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


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

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


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

        self._version = version

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


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

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


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

        self._build = build

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


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

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


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

        self._url = url

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


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

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


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

        self._source = source

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


        :return: The package of this ComputeRuleset.  # noqa: E501
        :rtype: str
        """
        return self._package

    @package.setter
    def package(self, package):
        """Sets the package of this ComputeRuleset.


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

        self._package = package

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


        :return: The identity of this ComputeRuleset.  # noqa: E501
        :rtype: bool
        """
        return self._identity

    @identity.setter
    def identity(self, identity):
        """Sets the identity of this ComputeRuleset.


        :param identity: The identity of this ComputeRuleset.  # noqa: E501
        :type: bool
        """

        self._identity = identity

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


        :return: The stateless of this ComputeRuleset.  # noqa: E501
        :rtype: bool
        """
        return self._stateless

    @stateless.setter
    def stateless(self, stateless):
        """Sets the stateless of this ComputeRuleset.


        :param stateless: The stateless of this ComputeRuleset.  # noqa: E501
        :type: bool
        """

        self._stateless = stateless

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


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

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


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

        self._description = description

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


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

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


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

        self._created = created

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


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

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


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

        self._modified = modified

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


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

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


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

        self._tags = tags

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


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

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


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

        self._properties = properties

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


        :return: The imports of this ComputeRuleset.  # noqa: E501
        :rtype: list[str]
        """
        return self._imports

    @imports.setter
    def imports(self, imports):
        """Sets the imports of this ComputeRuleset.


        :param imports: The imports of this ComputeRuleset.  # noqa: E501
        :type: list[str]
        """

        self._imports = imports

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


        :return: The globals of this ComputeRuleset.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._globals

    @globals.setter
    def globals(self, globals):
        """Sets the globals of this ComputeRuleset.


        :param globals: The globals of this ComputeRuleset.  # noqa: E501
        :type: dict(str, str)
        """

        self._globals = globals

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


        :return: The types of this ComputeRuleset.  # noqa: E501
        :rtype: list[RuleType]
        """
        return self._types

    @types.setter
    def types(self, types):
        """Sets the types of this ComputeRuleset.


        :param types: The types of this ComputeRuleset.  # noqa: E501
        :type: list[RuleType]
        """

        self._types = types

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

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