# coding: utf-8

"""
    Carbon DLS API

    Welcome to the Carbon DLS API docs!  You can find all relevant documentation here: https://github.com/carbon3d/carbon3d-api   # noqa: E501

    The version of the OpenAPI document: 0.4.4
    Contact: api-list@carbon3d.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from carbon3d.configuration import Configuration


class AutomationRunSteps(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 = {
        'name': 'str',
        'started_at': 'str',
        'ended_at': 'str',
        'status': 'str',
        'outputs': 'dict(str, str)'
    }

    attribute_map = {
        'name': 'name',
        'started_at': 'started_at',
        'ended_at': 'ended_at',
        'status': 'status',
        'outputs': 'outputs'
    }

    def __init__(self, name=None, started_at=None, ended_at=None, status=None, outputs=None, local_vars_configuration=None):  # noqa: E501
        """AutomationRunSteps - 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._name = None
        self._started_at = None
        self._ended_at = None
        self._status = None
        self._outputs = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if started_at is not None:
            self.started_at = started_at
        if ended_at is not None:
            self.ended_at = ended_at
        if status is not None:
            self.status = status
        if outputs is not None:
            self.outputs = outputs

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

        Name of the step  # noqa: E501

        :return: The name of this AutomationRunSteps.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this AutomationRunSteps.

        Name of the step  # noqa: E501

        :param name: The name of this AutomationRunSteps.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Time when the step started  # noqa: E501

        :return: The started_at of this AutomationRunSteps.  # noqa: E501
        :rtype: str
        """
        return self._started_at

    @started_at.setter
    def started_at(self, started_at):
        """Sets the started_at of this AutomationRunSteps.

        Time when the step started  # noqa: E501

        :param started_at: The started_at of this AutomationRunSteps.  # noqa: E501
        :type: str
        """

        self._started_at = started_at

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

        Time when the step ended  # noqa: E501

        :return: The ended_at of this AutomationRunSteps.  # noqa: E501
        :rtype: str
        """
        return self._ended_at

    @ended_at.setter
    def ended_at(self, ended_at):
        """Sets the ended_at of this AutomationRunSteps.

        Time when the step ended  # noqa: E501

        :param ended_at: The ended_at of this AutomationRunSteps.  # noqa: E501
        :type: str
        """

        self._ended_at = ended_at

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

        Status of the step  # noqa: E501

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

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

        Status of the step  # noqa: E501

        :param status: The status of this AutomationRunSteps.  # noqa: E501
        :type: str
        """
        allowed_values = ["pending", "succeeded", "error"]  # 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 outputs(self):
        """Gets the outputs of this AutomationRunSteps.  # noqa: E501

        Object capturing the outputs of the step. Message, model_uuid(s), file paths, build_uuid, etc.  # noqa: E501

        :return: The outputs of this AutomationRunSteps.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._outputs

    @outputs.setter
    def outputs(self, outputs):
        """Sets the outputs of this AutomationRunSteps.

        Object capturing the outputs of the step. Message, model_uuid(s), file paths, build_uuid, etc.  # noqa: E501

        :param outputs: The outputs of this AutomationRunSteps.  # noqa: E501
        :type: dict(str, str)
        """

        self._outputs = outputs

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

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