# coding: utf-8

"""
    Managed Ray API

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

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class JobEventFields(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 = {
        'ha_job_id': 'str',
        'error_type': 'HaJobErrorTypes',
        'has_additional_sensitive_message': 'bool',
        'event_type': 'HaJobStates'
    }

    attribute_map = {
        'ha_job_id': 'ha_job_id',
        'error_type': 'error_type',
        'has_additional_sensitive_message': 'has_additional_sensitive_message',
        'event_type': 'event_type'
    }

    def __init__(self, ha_job_id=None, error_type=None, has_additional_sensitive_message=False, event_type=None, local_vars_configuration=None):  # noqa: E501
        """JobEventFields - 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._ha_job_id = None
        self._error_type = None
        self._has_additional_sensitive_message = None
        self._event_type = None
        self.discriminator = None

        if ha_job_id is not None:
            self.ha_job_id = ha_job_id
        if error_type is not None:
            self.error_type = error_type
        if has_additional_sensitive_message is not None:
            self.has_additional_sensitive_message = has_additional_sensitive_message
        if event_type is not None:
            self.event_type = event_type

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

        The id of the Job.  # noqa: E501

        :return: The ha_job_id of this JobEventFields.  # noqa: E501
        :rtype: str
        """
        return self._ha_job_id

    @ha_job_id.setter
    def ha_job_id(self, ha_job_id):
        """Sets the ha_job_id of this JobEventFields.

        The id of the Job.  # noqa: E501

        :param ha_job_id: The ha_job_id of this JobEventFields.  # noqa: E501
        :type: str
        """

        self._ha_job_id = ha_job_id

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

        Type of Job error. Only populated for JOB type events that are in error state  # noqa: E501

        :return: The error_type of this JobEventFields.  # noqa: E501
        :rtype: HaJobErrorTypes
        """
        return self._error_type

    @error_type.setter
    def error_type(self, error_type):
        """Sets the error_type of this JobEventFields.

        Type of Job error. Only populated for JOB type events that are in error state  # noqa: E501

        :param error_type: The error_type of this JobEventFields.  # noqa: E501
        :type: HaJobErrorTypes
        """

        self._error_type = error_type

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

        Whether we have additional sensitive message details stored that can be subsequently fetched.  # noqa: E501

        :return: The has_additional_sensitive_message of this JobEventFields.  # noqa: E501
        :rtype: bool
        """
        return self._has_additional_sensitive_message

    @has_additional_sensitive_message.setter
    def has_additional_sensitive_message(self, has_additional_sensitive_message):
        """Sets the has_additional_sensitive_message of this JobEventFields.

        Whether we have additional sensitive message details stored that can be subsequently fetched.  # noqa: E501

        :param has_additional_sensitive_message: The has_additional_sensitive_message of this JobEventFields.  # noqa: E501
        :type: bool
        """

        self._has_additional_sensitive_message = has_additional_sensitive_message

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

        Type of job event  # noqa: E501

        :return: The event_type of this JobEventFields.  # noqa: E501
        :rtype: HaJobStates
        """
        return self._event_type

    @event_type.setter
    def event_type(self, event_type):
        """Sets the event_type of this JobEventFields.

        Type of job event  # noqa: E501

        :param event_type: The event_type of this JobEventFields.  # noqa: E501
        :type: HaJobStates
        """

        self._event_type = event_type

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

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