# 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 Assertion(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 = {
        '_property': 'str',
        'should': 'str',
        'expect': 'object',
        'message': 'str',
        'status': 'str',
        'enabled': 'bool'
    }

    attribute_map = {
        '_property': 'property',
        'should': 'should',
        'expect': 'expect',
        'message': 'message',
        'status': 'status',
        'enabled': 'enabled'
    }

    def __init__(self, _property=None, should=None, expect=None, message=None, status=None, enabled=None, local_vars_configuration=None):  # noqa: E501
        """Assertion - 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.__property = None
        self._should = None
        self._expect = None
        self._message = None
        self._status = None
        self._enabled = None
        self.discriminator = None

        if _property is not None:
            self._property = _property
        if should is not None:
            self.should = should
        if expect is not None:
            self.expect = expect
        if message is not None:
            self.message = message
        if status is not None:
            self.status = status
        if enabled is not None:
            self.enabled = enabled

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

        Attribute to test  # noqa: E501

        :return: The _property of this Assertion.  # noqa: E501
        :rtype: str
        """
        return self.__property

    @_property.setter
    def _property(self, _property):
        """Sets the _property of this Assertion.

        Attribute to test  # noqa: E501

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

        self.__property = _property

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

        Test to perform  # noqa: E501

        :return: The should of this Assertion.  # noqa: E501
        :rtype: str
        """
        return self._should

    @should.setter
    def should(self, should):
        """Sets the should of this Assertion.

        Test to perform  # noqa: E501

        :param should: The should of this Assertion.  # noqa: E501
        :type: str
        """
        allowed_values = ["EQUAL", "NOT_EQUAL"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and should not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `should` ({0}), must be one of {1}"  # noqa: E501
                .format(should, allowed_values)
            )

        self._should = should

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

        Expected result  # noqa: E501

        :return: The expect of this Assertion.  # noqa: E501
        :rtype: object
        """
        return self._expect

    @expect.setter
    def expect(self, expect):
        """Sets the expect of this Assertion.

        Expected result  # noqa: E501

        :param expect: The expect of this Assertion.  # noqa: E501
        :type: object
        """

        self._expect = expect

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

        Response  # noqa: E501

        :return: The message of this Assertion.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this Assertion.

        Response  # noqa: E501

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

        self._message = message

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

        Status of the assertion  # noqa: E501

        :return: The status of this Assertion.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Assertion.

        Status of the assertion  # noqa: E501

        :param status: The status of this Assertion.  # noqa: E501
        :type: str
        """
        allowed_values = ["PASS", "FAIL"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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

        Enabled?  # noqa: E501

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

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

        Enabled?  # noqa: E501

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

        self._enabled = enabled

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

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