# coding: utf-8

"""
    Kodexa

    Content Intelligence  # noqa: E501

    OpenAPI spec version: 2.0.132
    Contact: suppot@kodexa.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class CloudExecution(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    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 = {
        'context': 'object',
        'custom_options': 'object',
        'document_references': 'list[CloudDocumentReference]',
        'end': 'datetime',
        'exception_details': 'ExceptionDetails',
        'file_references': 'list[CloudFileReference]',
        'id': 'str',
        'number_of_steps': 'int',
        'pipeline_template_id': 'str',
        'processing_time': 'int',
        'session_id': 'str',
        'start': 'datetime',
        'status': 'str',
        'steps': 'list[CloudExecutionStep]',
        'steps_completed': 'int',
        'stores': 'list[CloudStore]'
    }

    attribute_map = {
        'context': 'context',
        'custom_options': 'customOptions',
        'document_references': 'documentReferences',
        'end': 'end',
        'exception_details': 'exceptionDetails',
        'file_references': 'fileReferences',
        'id': 'id',
        'number_of_steps': 'numberOfSteps',
        'pipeline_template_id': 'pipelineTemplateId',
        'processing_time': 'processingTime',
        'session_id': 'sessionId',
        'start': 'start',
        'status': 'status',
        'steps': 'steps',
        'steps_completed': 'stepsCompleted',
        'stores': 'stores'
    }

    def __init__(self, context=None, custom_options=None, document_references=None, end=None, exception_details=None, file_references=None, id=None, number_of_steps=None, pipeline_template_id=None, processing_time=None, session_id=None, start=None, status=None, steps=None, steps_completed=None, stores=None):  # noqa: E501
        """CloudExecution - a model defined in Swagger"""  # noqa: E501
        self._context = None
        self._custom_options = None
        self._document_references = None
        self._end = None
        self._exception_details = None
        self._file_references = None
        self._id = None
        self._number_of_steps = None
        self._pipeline_template_id = None
        self._processing_time = None
        self._session_id = None
        self._start = None
        self._status = None
        self._steps = None
        self._steps_completed = None
        self._stores = None
        self.discriminator = None
        if context is not None:
            self.context = context
        if custom_options is not None:
            self.custom_options = custom_options
        if document_references is not None:
            self.document_references = document_references
        if end is not None:
            self.end = end
        if exception_details is not None:
            self.exception_details = exception_details
        if file_references is not None:
            self.file_references = file_references
        if id is not None:
            self.id = id
        if number_of_steps is not None:
            self.number_of_steps = number_of_steps
        if pipeline_template_id is not None:
            self.pipeline_template_id = pipeline_template_id
        if processing_time is not None:
            self.processing_time = processing_time
        if session_id is not None:
            self.session_id = session_id
        if start is not None:
            self.start = start
        if status is not None:
            self.status = status
        if steps is not None:
            self.steps = steps
        if steps_completed is not None:
            self.steps_completed = steps_completed
        if stores is not None:
            self.stores = stores

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


        :return: The context of this CloudExecution.  # noqa: E501
        :rtype: object
        """
        return self._context

    @context.setter
    def context(self, context):
        """Sets the context of this CloudExecution.


        :param context: The context of this CloudExecution.  # noqa: E501
        :type: object
        """

        self._context = context

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


        :return: The custom_options of this CloudExecution.  # noqa: E501
        :rtype: object
        """
        return self._custom_options

    @custom_options.setter
    def custom_options(self, custom_options):
        """Sets the custom_options of this CloudExecution.


        :param custom_options: The custom_options of this CloudExecution.  # noqa: E501
        :type: object
        """

        self._custom_options = custom_options

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


        :return: The document_references of this CloudExecution.  # noqa: E501
        :rtype: list[CloudDocumentReference]
        """
        return self._document_references

    @document_references.setter
    def document_references(self, document_references):
        """Sets the document_references of this CloudExecution.


        :param document_references: The document_references of this CloudExecution.  # noqa: E501
        :type: list[CloudDocumentReference]
        """

        self._document_references = document_references

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


        :return: The end of this CloudExecution.  # noqa: E501
        :rtype: datetime
        """
        return self._end

    @end.setter
    def end(self, end):
        """Sets the end of this CloudExecution.


        :param end: The end of this CloudExecution.  # noqa: E501
        :type: datetime
        """

        self._end = end

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


        :return: The exception_details of this CloudExecution.  # noqa: E501
        :rtype: ExceptionDetails
        """
        return self._exception_details

    @exception_details.setter
    def exception_details(self, exception_details):
        """Sets the exception_details of this CloudExecution.


        :param exception_details: The exception_details of this CloudExecution.  # noqa: E501
        :type: ExceptionDetails
        """

        self._exception_details = exception_details

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


        :return: The file_references of this CloudExecution.  # noqa: E501
        :rtype: list[CloudFileReference]
        """
        return self._file_references

    @file_references.setter
    def file_references(self, file_references):
        """Sets the file_references of this CloudExecution.


        :param file_references: The file_references of this CloudExecution.  # noqa: E501
        :type: list[CloudFileReference]
        """

        self._file_references = file_references

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


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

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


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

        self._id = id

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


        :return: The number_of_steps of this CloudExecution.  # noqa: E501
        :rtype: int
        """
        return self._number_of_steps

    @number_of_steps.setter
    def number_of_steps(self, number_of_steps):
        """Sets the number_of_steps of this CloudExecution.


        :param number_of_steps: The number_of_steps of this CloudExecution.  # noqa: E501
        :type: int
        """

        self._number_of_steps = number_of_steps

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


        :return: The pipeline_template_id of this CloudExecution.  # noqa: E501
        :rtype: str
        """
        return self._pipeline_template_id

    @pipeline_template_id.setter
    def pipeline_template_id(self, pipeline_template_id):
        """Sets the pipeline_template_id of this CloudExecution.


        :param pipeline_template_id: The pipeline_template_id of this CloudExecution.  # noqa: E501
        :type: str
        """

        self._pipeline_template_id = pipeline_template_id

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


        :return: The processing_time of this CloudExecution.  # noqa: E501
        :rtype: int
        """
        return self._processing_time

    @processing_time.setter
    def processing_time(self, processing_time):
        """Sets the processing_time of this CloudExecution.


        :param processing_time: The processing_time of this CloudExecution.  # noqa: E501
        :type: int
        """

        self._processing_time = processing_time

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


        :return: The session_id of this CloudExecution.  # noqa: E501
        :rtype: str
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id):
        """Sets the session_id of this CloudExecution.


        :param session_id: The session_id of this CloudExecution.  # noqa: E501
        :type: str
        """

        self._session_id = session_id

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


        :return: The start of this CloudExecution.  # noqa: E501
        :rtype: datetime
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this CloudExecution.


        :param start: The start of this CloudExecution.  # noqa: E501
        :type: datetime
        """

        self._start = start

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


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

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


        :param status: The status of this CloudExecution.  # noqa: E501
        :type: str
        """
        allowed_values = ["PENDING", "RUNNING", "SUCCEEDED", "FAILED", "REQUESTED"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The steps of this CloudExecution.  # noqa: E501
        :rtype: list[CloudExecutionStep]
        """
        return self._steps

    @steps.setter
    def steps(self, steps):
        """Sets the steps of this CloudExecution.


        :param steps: The steps of this CloudExecution.  # noqa: E501
        :type: list[CloudExecutionStep]
        """

        self._steps = steps

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


        :return: The steps_completed of this CloudExecution.  # noqa: E501
        :rtype: int
        """
        return self._steps_completed

    @steps_completed.setter
    def steps_completed(self, steps_completed):
        """Sets the steps_completed of this CloudExecution.


        :param steps_completed: The steps_completed of this CloudExecution.  # noqa: E501
        :type: int
        """

        self._steps_completed = steps_completed

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


        :return: The stores of this CloudExecution.  # noqa: E501
        :rtype: list[CloudStore]
        """
        return self._stores

    @stores.setter
    def stores(self, stores):
        """Sets the stores of this CloudExecution.


        :param stores: The stores of this CloudExecution.  # noqa: E501
        :type: list[CloudStore]
        """

        self._stores = stores

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

        return self.__dict__ == other.__dict__

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