# coding: utf-8

"""
    herd

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    OpenAPI spec version: 0.178.0-SNAPSHOT
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class WorkflowError(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 = {
        'error_message': 'str',
        'retries_left': 'int',
        'error_stack_trace': 'str'
    }

    attribute_map = {
        'error_message': 'errorMessage',
        'retries_left': 'retriesLeft',
        'error_stack_trace': 'errorStackTrace'
    }

    def __init__(self, error_message=None, retries_left=None, error_stack_trace=None):  # noqa: E501
        """WorkflowError - a model defined in OpenAPI"""  # noqa: E501

        self._error_message = None
        self._retries_left = None
        self._error_stack_trace = None
        self.discriminator = None

        self.error_message = error_message
        if retries_left is not None:
            self.retries_left = retries_left
        if error_stack_trace is not None:
            self.error_stack_trace = error_stack_trace

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

        Error message  # noqa: E501

        :return: The error_message of this WorkflowError.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this WorkflowError.

        Error message  # noqa: E501

        :param error_message: The error_message of this WorkflowError.  # noqa: E501
        :type: str
        """
        if error_message is None:
            raise ValueError("Invalid value for `error_message`, must not be `None`")  # noqa: E501

        self._error_message = error_message

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

        Number of retries left  # noqa: E501

        :return: The retries_left of this WorkflowError.  # noqa: E501
        :rtype: int
        """
        return self._retries_left

    @retries_left.setter
    def retries_left(self, retries_left):
        """Sets the retries_left of this WorkflowError.

        Number of retries left  # noqa: E501

        :param retries_left: The retries_left of this WorkflowError.  # noqa: E501
        :type: int
        """

        self._retries_left = retries_left

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

        The error stack trace  # noqa: E501

        :return: The error_stack_trace of this WorkflowError.  # noqa: E501
        :rtype: str
        """
        return self._error_stack_trace

    @error_stack_trace.setter
    def error_stack_trace(self, error_stack_trace):
        """Sets the error_stack_trace of this WorkflowError.

        The error stack trace  # noqa: E501

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

        self._error_stack_trace = error_stack_trace

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

        return self.__dict__ == other.__dict__

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