# 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 ProductionJobEvent(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',
        'created_at': 'datetime',
        'event_type': 'HaJobStates',
        'error_type': 'HaJobErrorTypes',
        'level': 'HaJobEventLevel',
        'message': 'str',
        'origin': 'HaJobEventOrigin',
        'ha_job_id': 'str',
        'cluster_id': 'str',
        'metadata': 'object',
        'has_additional_sensitive_message': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'created_at': 'created_at',
        'event_type': 'event_type',
        'error_type': 'error_type',
        'level': 'level',
        'message': 'message',
        'origin': 'origin',
        'ha_job_id': 'ha_job_id',
        'cluster_id': 'cluster_id',
        'metadata': 'metadata',
        'has_additional_sensitive_message': 'has_additional_sensitive_message'
    }

    def __init__(self, id=None, created_at=None, event_type=None, error_type=None, level=None, message=None, origin=None, ha_job_id=None, cluster_id=None, metadata=None, has_additional_sensitive_message=False, local_vars_configuration=None):  # noqa: E501
        """ProductionJobEvent - 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._created_at = None
        self._event_type = None
        self._error_type = None
        self._level = None
        self._message = None
        self._origin = None
        self._ha_job_id = None
        self._cluster_id = None
        self._metadata = None
        self._has_additional_sensitive_message = None
        self.discriminator = None

        self.id = id
        self.created_at = created_at
        if event_type is not None:
            self.event_type = event_type
        if error_type is not None:
            self.error_type = error_type
        if level is not None:
            self.level = level
        if message is not None:
            self.message = message
        self.origin = origin
        self.ha_job_id = ha_job_id
        if cluster_id is not None:
            self.cluster_id = cluster_id
        if metadata is not None:
            self.metadata = metadata
        if has_additional_sensitive_message is not None:
            self.has_additional_sensitive_message = has_additional_sensitive_message

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

        Id of the Job event  # noqa: E501

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

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

        Id of the Job event  # noqa: E501

        :param id: The id of this ProductionJobEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        The time this event was created.  # noqa: E501

        :return: The created_at of this ProductionJobEvent.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this ProductionJobEvent.

        The time this event was created.  # noqa: E501

        :param created_at: The created_at of this ProductionJobEvent.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and created_at is None:  # noqa: E501
            raise ValueError("Invalid value for `created_at`, must not be `None`")  # noqa: E501

        self._created_at = created_at

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

        Type of Job event  # noqa: E501

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

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

        Type of Job event  # noqa: E501

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

        self._event_type = event_type

    @property
    def error_type(self):
        """Gets the error_type of this ProductionJobEvent.  # 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 ProductionJobEvent.  # noqa: E501
        :rtype: HaJobErrorTypes
        """
        return self._error_type

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

        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 ProductionJobEvent.  # noqa: E501
        :type: HaJobErrorTypes
        """

        self._error_type = error_type

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

        Level of Job event  # noqa: E501

        :return: The level of this ProductionJobEvent.  # noqa: E501
        :rtype: HaJobEventLevel
        """
        return self._level

    @level.setter
    def level(self, level):
        """Sets the level of this ProductionJobEvent.

        Level of Job event  # noqa: E501

        :param level: The level of this ProductionJobEvent.  # noqa: E501
        :type: HaJobEventLevel
        """

        self._level = level

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

        Message of Job event  # noqa: E501

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

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

        Message of Job event  # noqa: E501

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

        self._message = message

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

        The origin of the Job events.  # noqa: E501

        :return: The origin of this ProductionJobEvent.  # noqa: E501
        :rtype: HaJobEventOrigin
        """
        return self._origin

    @origin.setter
    def origin(self, origin):
        """Sets the origin of this ProductionJobEvent.

        The origin of the Job events.  # noqa: E501

        :param origin: The origin of this ProductionJobEvent.  # noqa: E501
        :type: HaJobEventOrigin
        """
        if self.local_vars_configuration.client_side_validation and origin is None:  # noqa: E501
            raise ValueError("Invalid value for `origin`, must not be `None`")  # noqa: E501

        self._origin = origin

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

        The id of the Job.  # noqa: E501

        :return: The ha_job_id of this ProductionJobEvent.  # 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 ProductionJobEvent.

        The id of the Job.  # noqa: E501

        :param ha_job_id: The ha_job_id of this ProductionJobEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and ha_job_id is None:  # noqa: E501
            raise ValueError("Invalid value for `ha_job_id`, must not be `None`")  # noqa: E501

        self._ha_job_id = ha_job_id

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

        The associated cluster id.Present only for Job event and only when the cluster is associated with the event.  # noqa: E501

        :return: The cluster_id of this ProductionJobEvent.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this ProductionJobEvent.

        The associated cluster id.Present only for Job event and only when the cluster is associated with the event.  # noqa: E501

        :param cluster_id: The cluster_id of this ProductionJobEvent.  # noqa: E501
        :type: str
        """

        self._cluster_id = cluster_id

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

        The metadata of the event  # noqa: E501

        :return: The metadata of this ProductionJobEvent.  # noqa: E501
        :rtype: object
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this ProductionJobEvent.

        The metadata of the event  # noqa: E501

        :param metadata: The metadata of this ProductionJobEvent.  # noqa: E501
        :type: object
        """

        self._metadata = metadata

    @property
    def has_additional_sensitive_message(self):
        """Gets the has_additional_sensitive_message of this ProductionJobEvent.  # 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 ProductionJobEvent.  # 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 ProductionJobEvent.

        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 ProductionJobEvent.  # noqa: E501
        :type: bool
        """

        self._has_additional_sensitive_message = has_additional_sensitive_message

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

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