Top

lentiq.models.task_execution module

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

import pprint
import re  # noqa: F401

import six


class TaskExecution(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 = {
        'children': 'list[str]',
        'finished_date': 'datetime',
        'id': 'str',
        'message': 'str',
        'phase': 'str',
        'started_date': 'datetime',
        'task_name': 'str'
    }

    attribute_map = {
        'children': 'children',
        'finished_date': 'finishedDate',
        'id': 'id',
        'message': 'message',
        'phase': 'phase',
        'started_date': 'startedDate',
        'task_name': 'taskName'
    }

    discriminator = None

    def __init__(self, children=None, finished_date=None, id=None, message=None, phase=None, started_date=None, task_name=None):  # noqa: E501
        """TaskExecution - a model defined in Swagger"""  # noqa: E501
        self._children = None
        self._finished_date = None
        self._id = None
        self._message = None
        self._phase = None
        self._started_date = None
        self._task_name = None

        if children is not None:
            self.children = children
        if finished_date is not None:
            self.finished_date = finished_date
        if id is not None:
            self.id = id
        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 task_name is not None:
            self.task_name = task_name

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


        :return: The children of this TaskExecution.  # noqa: E501
        :rtype: list[str]
        """
        return self._children

    @children.setter
    def children(self, children):
        """Sets the children of this TaskExecution.


        :param children: The children of this TaskExecution.  # noqa: E501
        :type: list[str]
        """

        self._children = children

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


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

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


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

        self._finished_date = finished_date

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


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

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


        :param id: The id of this TaskExecution.  # noqa: E501
        :type: str
        """

        self._id = id

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


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

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


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

        self._message = message

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


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

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


        :param phase: The phase of this TaskExecution.  # noqa: E501
        :type: str
        """
        allowed_values = ["Pending", "Running", "Error", "Failed", "Succeeded", "Skipped", "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 TaskExecution.  # noqa: E501


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

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


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

        self._started_date = started_date

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


        :return: The task_name of this TaskExecution.  # noqa: E501
        :rtype: str
        """
        return self._task_name

    @task_name.setter
    def task_name(self, task_name):
        """Sets the task_name of this TaskExecution.


        :param task_name: The task_name of this TaskExecution.  # noqa: E501
        :type: str
        """

        self._task_name = task_name

    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(TaskExecution, 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, TaskExecution):
            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 TaskExecution

class TaskExecution(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 = {
        'children': 'list[str]',
        'finished_date': 'datetime',
        'id': 'str',
        'message': 'str',
        'phase': 'str',
        'started_date': 'datetime',
        'task_name': 'str'
    }

    attribute_map = {
        'children': 'children',
        'finished_date': 'finishedDate',
        'id': 'id',
        'message': 'message',
        'phase': 'phase',
        'started_date': 'startedDate',
        'task_name': 'taskName'
    }

    discriminator = None

    def __init__(self, children=None, finished_date=None, id=None, message=None, phase=None, started_date=None, task_name=None):  # noqa: E501
        """TaskExecution - a model defined in Swagger"""  # noqa: E501
        self._children = None
        self._finished_date = None
        self._id = None
        self._message = None
        self._phase = None
        self._started_date = None
        self._task_name = None

        if children is not None:
            self.children = children
        if finished_date is not None:
            self.finished_date = finished_date
        if id is not None:
            self.id = id
        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 task_name is not None:
            self.task_name = task_name

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


        :return: The children of this TaskExecution.  # noqa: E501
        :rtype: list[str]
        """
        return self._children

    @children.setter
    def children(self, children):
        """Sets the children of this TaskExecution.


        :param children: The children of this TaskExecution.  # noqa: E501
        :type: list[str]
        """

        self._children = children

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


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

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


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

        self._finished_date = finished_date

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


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

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


        :param id: The id of this TaskExecution.  # noqa: E501
        :type: str
        """

        self._id = id

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


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

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


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

        self._message = message

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


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

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


        :param phase: The phase of this TaskExecution.  # noqa: E501
        :type: str
        """
        allowed_values = ["Pending", "Running", "Error", "Failed", "Succeeded", "Skipped", "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 TaskExecution.  # noqa: E501


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

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


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

        self._started_date = started_date

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


        :return: The task_name of this TaskExecution.  # noqa: E501
        :rtype: str
        """
        return self._task_name

    @task_name.setter
    def task_name(self, task_name):
        """Sets the task_name of this TaskExecution.


        :param task_name: The task_name of this TaskExecution.  # noqa: E501
        :type: str
        """

        self._task_name = task_name

    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(TaskExecution, 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, TaskExecution):
            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, children=None, finished_date=None, id=None, message=None, phase=None, started_date=None, task_name=None)

TaskExecution - a model defined in Swagger

def __init__(self, children=None, finished_date=None, id=None, message=None, phase=None, started_date=None, task_name=None):  # noqa: E501
    """TaskExecution - a model defined in Swagger"""  # noqa: E501
    self._children = None
    self._finished_date = None
    self._id = None
    self._message = None
    self._phase = None
    self._started_date = None
    self._task_name = None
    if children is not None:
        self.children = children
    if finished_date is not None:
        self.finished_date = finished_date
    if id is not None:
        self.id = id
    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 task_name is not None:
        self.task_name = task_name

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(TaskExecution, 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 children

Gets the children of this TaskExecution. # noqa: E501

:return: The children of this TaskExecution. # noqa: E501 :rtype: list[str]

var finished_date

Gets the finished_date of this TaskExecution. # noqa: E501

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

var id

Gets the id of this TaskExecution. # noqa: E501

:return: The id of this TaskExecution. # noqa: E501 :rtype: str

var message

Gets the message of this TaskExecution. # noqa: E501

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

var phase

Gets the phase of this TaskExecution. # noqa: E501

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

var started_date

Gets the started_date of this TaskExecution. # noqa: E501

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

var task_name

Gets the task_name of this TaskExecution. # noqa: E501

:return: The task_name of this TaskExecution. # noqa: E501 :rtype: str