# coding: utf-8

"""
    Workspace Data Service

    This page lists current APIs. As of v0.2, all APIs are subject to change without notice.   # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from wds_client.configuration import Configuration


class GenericJob(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_type': 'str',
        'status': 'str',
        'created': 'datetime',
        'updated': 'datetime',
        'error_message': 'str',
        'input': 'object',
        'result': 'object'
    }

    attribute_map = {
        'job_id': 'jobId',
        'job_type': 'jobType',
        'status': 'status',
        'created': 'created',
        'updated': 'updated',
        'error_message': 'errorMessage',
        'input': 'input',
        'result': 'result'
    }

    def __init__(self, job_id=None, job_type=None, status=None, created=None, updated=None, error_message=None, input=None, result=None, local_vars_configuration=None):  # noqa: E501
        """GenericJob - 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_type = None
        self._status = None
        self._created = None
        self._updated = None
        self._error_message = None
        self._input = None
        self._result = None
        self.discriminator = None

        self.job_id = job_id
        self.job_type = job_type
        self.status = status
        self.created = created
        self.updated = updated
        if error_message is not None:
            self.error_message = error_message
        if input is not None:
            self.input = input
        if result is not None:
            self.result = result

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


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

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


        :param job_id: The job_id of this GenericJob.  # 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_type(self):
        """Gets the job_type of this GenericJob.  # noqa: E501


        :return: The job_type of this GenericJob.  # noqa: E501
        :rtype: str
        """
        return self._job_type

    @job_type.setter
    def job_type(self, job_type):
        """Sets the job_type of this GenericJob.


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

        self._job_type = job_type

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


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

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


        :param status: The status of this GenericJob.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and status is None:  # noqa: E501
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        allowed_values = ["CREATED", "QUEUED", "RUNNING", "SUCCEEDED", "ERROR", "CANCELLED", "UNKNOWN"]  # 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 created(self):
        """Gets the created of this GenericJob.  # noqa: E501


        :return: The created of this GenericJob.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this GenericJob.


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

        self._created = created

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


        :return: The updated of this GenericJob.  # noqa: E501
        :rtype: datetime
        """
        return self._updated

    @updated.setter
    def updated(self, updated):
        """Sets the updated of this GenericJob.


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

        self._updated = updated

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


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

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


        :param error_message: The error_message of this GenericJob.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

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

        Input arguments for this job  # noqa: E501

        :return: The input of this GenericJob.  # noqa: E501
        :rtype: object
        """
        return self._input

    @input.setter
    def input(self, input):
        """Sets the input of this GenericJob.

        Input arguments for this job  # noqa: E501

        :param input: The input of this GenericJob.  # noqa: E501
        :type: object
        """

        self._input = input

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

        Result of this job  # noqa: E501

        :return: The result of this GenericJob.  # noqa: E501
        :rtype: object
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this GenericJob.

        Result of this job  # noqa: E501

        :param result: The result of this GenericJob.  # noqa: E501
        :type: object
        """

        self._result = result

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

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