Top

lentiq.models.workflow_execution_status module

# coding: utf-8
####alex test
"""
    
    
        
    """

import pprint
import re  # noqa: F401

import six
from lentiq.models.task_execution import TaskExecution  # noqa: F401,E501


class WorkflowExecutionStatus(object):
    """
        """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'finished_date': 'datetime',
        'message': 'str',
        'phase': 'str',
        'started_date': 'datetime',
        'tasks': 'list[TaskExecution]'
    }

    attribute_map = {
        'finished_date': 'finishedDate',
        'message': 'message',
        'phase': 'phase',
        'started_date': 'startedDate',
        'tasks': 'tasks'
    }

    discriminator = None

    def __init__(self, finished_date=None, message=None, phase=None, started_date=None, tasks=None):  # noqa: E501
        """WorkflowExecutionStatus - a model defined in Swagger"""  # noqa: E501
        self._finished_date = None
        self._message = None
        self._phase = None
        self._started_date = None
        self._tasks = None

        if finished_date is not None:
            self.finished_date = finished_date
        if message is not None:
            self.message = message
        if phase is not None:
            self.phase = phase
        if started_date is not None:
            self.started_date = started_date
        if tasks is not None:
            self.tasks = tasks

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


        :return: The finished_date of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._finished_date

    @finished_date.setter
    def finished_date(self, finished_date):
        """Sets the finished_date of this WorkflowExecutionStatus.


        :param finished_date: The finished_date of this WorkflowExecutionStatus.  # noqa: E501
        :type: datetime
        """

        self._finished_date = finished_date

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


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

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


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

        self._message = message

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


        :return: The phase of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: str
        """
        return self._phase

    @phase.setter
    def phase(self, phase):
        """Sets the phase of this WorkflowExecutionStatus.


        :param phase: The phase of this WorkflowExecutionStatus.  # noqa: E501
        :type: str
        """
        allowed_values = ["Pending", "Running", "Error", "Failed", "Paused", "Succeeded", "Unknown"]  # noqa: E501
        if phase not in allowed_values:
            raise ValueError(
                "Invalid value for `phase` ({0}), must be one of {1}"  # noqa: E501
                .format(phase, allowed_values)
            )

        self._phase = phase

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


        :return: The started_date of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._started_date

    @started_date.setter
    def started_date(self, started_date):
        """Sets the started_date of this WorkflowExecutionStatus.


        :param started_date: The started_date of this WorkflowExecutionStatus.  # noqa: E501
        :type: datetime
        """

        self._started_date = started_date

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


        :return: The tasks of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: list[TaskExecution]
        """
        return self._tasks

    @tasks.setter
    def tasks(self, tasks):
        """Sets the tasks of this WorkflowExecutionStatus.


        :param tasks: The tasks of this WorkflowExecutionStatus.  # noqa: E501
        :type: list[TaskExecution]
        """

        self._tasks = tasks

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(WorkflowExecutionStatus, dict):
            for key, value in self.items():
                result[key] = 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, WorkflowExecutionStatus):
            return False

        return self.__dict__ == other.__dict__

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

Classes

class WorkflowExecutionStatus

class WorkflowExecutionStatus(object):
    """
        """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'finished_date': 'datetime',
        'message': 'str',
        'phase': 'str',
        'started_date': 'datetime',
        'tasks': 'list[TaskExecution]'
    }

    attribute_map = {
        'finished_date': 'finishedDate',
        'message': 'message',
        'phase': 'phase',
        'started_date': 'startedDate',
        'tasks': 'tasks'
    }

    discriminator = None

    def __init__(self, finished_date=None, message=None, phase=None, started_date=None, tasks=None):  # noqa: E501
        """WorkflowExecutionStatus - a model defined in Swagger"""  # noqa: E501
        self._finished_date = None
        self._message = None
        self._phase = None
        self._started_date = None
        self._tasks = None

        if finished_date is not None:
            self.finished_date = finished_date
        if message is not None:
            self.message = message
        if phase is not None:
            self.phase = phase
        if started_date is not None:
            self.started_date = started_date
        if tasks is not None:
            self.tasks = tasks

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


        :return: The finished_date of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._finished_date

    @finished_date.setter
    def finished_date(self, finished_date):
        """Sets the finished_date of this WorkflowExecutionStatus.


        :param finished_date: The finished_date of this WorkflowExecutionStatus.  # noqa: E501
        :type: datetime
        """

        self._finished_date = finished_date

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


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

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


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

        self._message = message

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


        :return: The phase of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: str
        """
        return self._phase

    @phase.setter
    def phase(self, phase):
        """Sets the phase of this WorkflowExecutionStatus.


        :param phase: The phase of this WorkflowExecutionStatus.  # noqa: E501
        :type: str
        """
        allowed_values = ["Pending", "Running", "Error", "Failed", "Paused", "Succeeded", "Unknown"]  # noqa: E501
        if phase not in allowed_values:
            raise ValueError(
                "Invalid value for `phase` ({0}), must be one of {1}"  # noqa: E501
                .format(phase, allowed_values)
            )

        self._phase = phase

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


        :return: The started_date of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._started_date

    @started_date.setter
    def started_date(self, started_date):
        """Sets the started_date of this WorkflowExecutionStatus.


        :param started_date: The started_date of this WorkflowExecutionStatus.  # noqa: E501
        :type: datetime
        """

        self._started_date = started_date

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


        :return: The tasks of this WorkflowExecutionStatus.  # noqa: E501
        :rtype: list[TaskExecution]
        """
        return self._tasks

    @tasks.setter
    def tasks(self, tasks):
        """Sets the tasks of this WorkflowExecutionStatus.


        :param tasks: The tasks of this WorkflowExecutionStatus.  # noqa: E501
        :type: list[TaskExecution]
        """

        self._tasks = tasks

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(WorkflowExecutionStatus, dict):
            for key, value in self.items():
                result[key] = 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, WorkflowExecutionStatus):
            return False

        return self.__dict__ == other.__dict__

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

Ancestors (in MRO)

Class variables

var attribute_map

var discriminator

var swagger_types

Static methods

def __init__(

self, finished_date=None, message=None, phase=None, started_date=None, tasks=None)

WorkflowExecutionStatus - a model defined in Swagger

def __init__(self, finished_date=None, message=None, phase=None, started_date=None, tasks=None):  # noqa: E501
    """WorkflowExecutionStatus - a model defined in Swagger"""  # noqa: E501
    self._finished_date = None
    self._message = None
    self._phase = None
    self._started_date = None
    self._tasks = None
    if finished_date is not None:
        self.finished_date = finished_date
    if message is not None:
        self.message = message
    if phase is not None:
        self.phase = phase
    if started_date is not None:
        self.started_date = started_date
    if tasks is not None:
        self.tasks = tasks

def to_dict(

self)

Returns the model properties as a dict

def to_dict(self):
    """Returns the model properties as a dict"""
    result = {}
    for attr, _ in six.iteritems(self.swagger_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
    if issubclass(WorkflowExecutionStatus, dict):
        for key, value in self.items():
            result[key] = value
    return result

def to_str(

self)

Returns the string representation of the model

def to_str(self):
    """Returns the string representation of the model"""
    return pprint.pformat(self.to_dict())

Instance variables

var finished_date

Gets the finished_date of this WorkflowExecutionStatus. # noqa: E501

:return: The finished_date of this WorkflowExecutionStatus. # noqa: E501 :rtype: datetime

var message

Gets the message of this WorkflowExecutionStatus. # noqa: E501

:return: The message of this WorkflowExecutionStatus. # noqa: E501 :rtype: str

var phase

Gets the phase of this WorkflowExecutionStatus. # noqa: E501

:return: The phase of this WorkflowExecutionStatus. # noqa: E501 :rtype: str

var started_date

Gets the started_date of this WorkflowExecutionStatus. # noqa: E501

:return: The started_date of this WorkflowExecutionStatus. # noqa: E501 :rtype: datetime

var tasks

Gets the tasks of this WorkflowExecutionStatus. # noqa: E501

:return: The tasks of this WorkflowExecutionStatus. # noqa: E501 :rtype: list[TaskExecution]