# 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 JobWithReport(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 = {
        'job_id': 'str',
        'job_name': 'str',
        'job_state': 'HaJobStates',
        'job_report': 'JobReport',
        'created_at': 'datetime',
        'finished_at': 'datetime'
    }

    attribute_map = {
        'job_id': 'job_id',
        'job_name': 'job_name',
        'job_state': 'job_state',
        'job_report': 'job_report',
        'created_at': 'created_at',
        'finished_at': 'finished_at'
    }

    def __init__(self, job_id=None, job_name=None, job_state=None, job_report=None, created_at=None, finished_at=None, local_vars_configuration=None):  # noqa: E501
        """JobWithReport - 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._job_id = None
        self._job_name = None
        self._job_state = None
        self._job_report = None
        self._created_at = None
        self._finished_at = None
        self.discriminator = None

        self.job_id = job_id
        self.job_name = job_name
        self.job_state = job_state
        if job_report is not None:
            self.job_report = job_report
        self.created_at = created_at
        if finished_at is not None:
            self.finished_at = finished_at

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


        :return: The job_id of this JobWithReport.  # noqa: E501
        :rtype: str
        """
        return self._job_id

    @job_id.setter
    def job_id(self, job_id):
        """Sets the job_id of this JobWithReport.


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

        self._job_id = job_id

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


        :return: The job_name of this JobWithReport.  # noqa: E501
        :rtype: str
        """
        return self._job_name

    @job_name.setter
    def job_name(self, job_name):
        """Sets the job_name of this JobWithReport.


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

        self._job_name = job_name

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


        :return: The job_state of this JobWithReport.  # noqa: E501
        :rtype: HaJobStates
        """
        return self._job_state

    @job_state.setter
    def job_state(self, job_state):
        """Sets the job_state of this JobWithReport.


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

        self._job_state = job_state

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


        :return: The job_report of this JobWithReport.  # noqa: E501
        :rtype: JobReport
        """
        return self._job_report

    @job_report.setter
    def job_report(self, job_report):
        """Sets the job_report of this JobWithReport.


        :param job_report: The job_report of this JobWithReport.  # noqa: E501
        :type: JobReport
        """

        self._job_report = job_report

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


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

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


        :param created_at: The created_at of this JobWithReport.  # 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 finished_at(self):
        """Gets the finished_at of this JobWithReport.  # noqa: E501


        :return: The finished_at of this JobWithReport.  # noqa: E501
        :rtype: datetime
        """
        return self._finished_at

    @finished_at.setter
    def finished_at(self, finished_at):
        """Sets the finished_at of this JobWithReport.


        :param finished_at: The finished_at of this JobWithReport.  # noqa: E501
        :type: datetime
        """

        self._finished_at = finished_at

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

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