# coding: utf-8

"""
    Vidispine API

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

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class JobTaskType(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 = {
        'status': 'str',
        'total_sub_tasks': 'int',
        'description': 'str',
        'timestamp': 'datetime',
        'error_message': 'str',
        'attempts': 'int',
        'id': 'int',
        'step': 'int',
        'sub_step': 'list[JobTaskTypeSubStep]',
        'progress': 'JobTaskProgressType',
        'sub_task': 'list[JobTaskType]'
    }

    attribute_map = {
        'status': 'status',
        'total_sub_tasks': 'totalSubTasks',
        'description': 'description',
        'timestamp': 'timestamp',
        'error_message': 'errorMessage',
        'attempts': 'attempts',
        'id': 'id',
        'step': 'step',
        'sub_step': 'subStep',
        'progress': 'progress',
        'sub_task': 'subTask'
    }

    def __init__(self, status=None, total_sub_tasks=None, description=None, timestamp=None, error_message=None, attempts=None, id=None, step=None, sub_step=None, progress=None, sub_task=None):  # noqa: E501
        """JobTaskType - a model defined in OpenAPI"""  # noqa: E501

        self._status = None
        self._total_sub_tasks = None
        self._description = None
        self._timestamp = None
        self._error_message = None
        self._attempts = None
        self._id = None
        self._step = None
        self._sub_step = None
        self._progress = None
        self._sub_task = None
        self.discriminator = None

        self.status = status
        if total_sub_tasks is not None:
            self.total_sub_tasks = total_sub_tasks
        if description is not None:
            self.description = description
        self.timestamp = timestamp
        if error_message is not None:
            self.error_message = error_message
        self.attempts = attempts
        if id is not None:
            self.id = id
        self.step = step
        if sub_step is not None:
            self.sub_step = sub_step
        if progress is not None:
            self.progress = progress
        if sub_task is not None:
            self.sub_task = sub_task

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


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

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


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

        self._status = status

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


        :return: The total_sub_tasks of this JobTaskType.  # noqa: E501
        :rtype: int
        """
        return self._total_sub_tasks

    @total_sub_tasks.setter
    def total_sub_tasks(self, total_sub_tasks):
        """Sets the total_sub_tasks of this JobTaskType.


        :param total_sub_tasks: The total_sub_tasks of this JobTaskType.  # noqa: E501
        :type: int
        """

        self._total_sub_tasks = total_sub_tasks

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


        :return: The description of this JobTaskType.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this JobTaskType.


        :param description: The description of this JobTaskType.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The timestamp of this JobTaskType.  # noqa: E501
        :rtype: datetime
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this JobTaskType.


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

        self._timestamp = timestamp

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


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

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


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

        self._error_message = error_message

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


        :return: The attempts of this JobTaskType.  # noqa: E501
        :rtype: int
        """
        return self._attempts

    @attempts.setter
    def attempts(self, attempts):
        """Sets the attempts of this JobTaskType.


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

        self._attempts = attempts

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


        :return: The id of this JobTaskType.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this JobTaskType.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The step of this JobTaskType.  # noqa: E501
        :rtype: int
        """
        return self._step

    @step.setter
    def step(self, step):
        """Sets the step of this JobTaskType.


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

        self._step = step

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


        :return: The sub_step of this JobTaskType.  # noqa: E501
        :rtype: list[JobTaskTypeSubStep]
        """
        return self._sub_step

    @sub_step.setter
    def sub_step(self, sub_step):
        """Sets the sub_step of this JobTaskType.


        :param sub_step: The sub_step of this JobTaskType.  # noqa: E501
        :type: list[JobTaskTypeSubStep]
        """

        self._sub_step = sub_step

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


        :return: The progress of this JobTaskType.  # noqa: E501
        :rtype: JobTaskProgressType
        """
        return self._progress

    @progress.setter
    def progress(self, progress):
        """Sets the progress of this JobTaskType.


        :param progress: The progress of this JobTaskType.  # noqa: E501
        :type: JobTaskProgressType
        """

        self._progress = progress

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


        :return: The sub_task of this JobTaskType.  # noqa: E501
        :rtype: list[JobTaskType]
        """
        return self._sub_task

    @sub_task.setter
    def sub_task(self, sub_task):
        """Sets the sub_task of this JobTaskType.


        :param sub_task: The sub_task of this JobTaskType.  # noqa: E501
        :type: list[JobTaskType]
        """

        self._sub_task = sub_task

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

        return self.__dict__ == other.__dict__

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