from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from chromestatus_openapi.models.base_model import Model
from chromestatus_openapi import util


class SummaryProgressStep(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, step=None, status=None, message=None, start_timestamp=None, end_timestamp=None):  # noqa: E501
        """SummaryProgressStep - a model defined in OpenAPI

        :param step: The step of this SummaryProgressStep.  # noqa: E501
        :type step: str
        :param status: The status of this SummaryProgressStep.  # noqa: E501
        :type status: str
        :param message: The message of this SummaryProgressStep.  # noqa: E501
        :type message: str
        :param start_timestamp: The start_timestamp of this SummaryProgressStep.  # noqa: E501
        :type start_timestamp: datetime
        :param end_timestamp: The end_timestamp of this SummaryProgressStep.  # noqa: E501
        :type end_timestamp: datetime
        """
        self.openapi_types = {
            'step': str,
            'status': str,
            'message': str,
            'start_timestamp': datetime,
            'end_timestamp': datetime
        }

        self.attribute_map = {
            'step': 'step',
            'status': 'status',
            'message': 'message',
            'start_timestamp': 'start_timestamp',
            'end_timestamp': 'end_timestamp'
        }

        self._step = step
        self._status = status
        self._message = message
        self._start_timestamp = start_timestamp
        self._end_timestamp = end_timestamp

    @classmethod
    def from_dict(cls, dikt) -> 'SummaryProgressStep':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The SummaryProgressStep of this SummaryProgressStep.  # noqa: E501
        :rtype: SummaryProgressStep
        """
        return util.deserialize_model(dikt, cls)

    @property
    def step(self) -> str:
        """Gets the step of this SummaryProgressStep.

        The concrete step or tool execution stage in the AI generation pipeline: - UNKNOWN: Fallback for unknown or unsupported execution steps - SEARCH_MDN: Querying MDN documentation - VERIFY_DOC_LINK: Checking external documentation links - READ_SPEC: Fetching and parsing W3C/WHATWG specification - READ_EXPLAINER: Fetching feature explainer document   # noqa: E501

        :return: The step of this SummaryProgressStep.
        :rtype: str
        """
        return self._step

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

        The concrete step or tool execution stage in the AI generation pipeline: - UNKNOWN: Fallback for unknown or unsupported execution steps - SEARCH_MDN: Querying MDN documentation - VERIFY_DOC_LINK: Checking external documentation links - READ_SPEC: Fetching and parsing W3C/WHATWG specification - READ_EXPLAINER: Fetching feature explainer document   # noqa: E501

        :param step: The step of this SummaryProgressStep.
        :type step: str
        """
        allowed_values = ["UNKNOWN", "SEARCH_MDN", "VERIFY_DOC_LINK", "READ_SPEC", "READ_EXPLAINER"]  # noqa: E501
        if step not in allowed_values:
            raise ValueError(
                "Invalid value for `step` ({0}), must be one of {1}"
                .format(step, allowed_values)
            )

        self._step = step

    @property
    def status(self) -> str:
        """Gets the status of this SummaryProgressStep.

        Execution status of this step: - IN_PROGRESS: Step is currently running - SUCCESS: Step completed successfully - FAILED: Step failed to complete - RETRYING: Step is re-attempting execution after a transient issue   # noqa: E501

        :return: The status of this SummaryProgressStep.
        :rtype: str
        """
        return self._status

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

        Execution status of this step: - IN_PROGRESS: Step is currently running - SUCCESS: Step completed successfully - FAILED: Step failed to complete - RETRYING: Step is re-attempting execution after a transient issue   # noqa: E501

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

        self._status = status

    @property
    def message(self) -> str:
        """Gets the message of this SummaryProgressStep.

        Human-readable progress update, completion summary, or error reason when status is FAILED.  # noqa: E501

        :return: The message of this SummaryProgressStep.
        :rtype: str
        """
        return self._message

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

        Human-readable progress update, completion summary, or error reason when status is FAILED.  # noqa: E501

        :param message: The message of this SummaryProgressStep.
        :type message: str
        """

        self._message = message

    @property
    def start_timestamp(self) -> datetime:
        """Gets the start_timestamp of this SummaryProgressStep.

        Timestamp when this step began execution.  # noqa: E501

        :return: The start_timestamp of this SummaryProgressStep.
        :rtype: datetime
        """
        return self._start_timestamp

    @start_timestamp.setter
    def start_timestamp(self, start_timestamp: datetime):
        """Sets the start_timestamp of this SummaryProgressStep.

        Timestamp when this step began execution.  # noqa: E501

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

        self._start_timestamp = start_timestamp

    @property
    def end_timestamp(self) -> datetime:
        """Gets the end_timestamp of this SummaryProgressStep.

        Timestamp when this step reached a terminal state (SUCCESS or FAILED). Null while step is active (IN_PROGRESS or RETRYING).  # noqa: E501

        :return: The end_timestamp of this SummaryProgressStep.
        :rtype: datetime
        """
        return self._end_timestamp

    @end_timestamp.setter
    def end_timestamp(self, end_timestamp: datetime):
        """Sets the end_timestamp of this SummaryProgressStep.

        Timestamp when this step reached a terminal state (SUCCESS or FAILED). Null while step is active (IN_PROGRESS or RETRYING).  # noqa: E501

        :param end_timestamp: The end_timestamp of this SummaryProgressStep.
        :type end_timestamp: datetime
        """

        self._end_timestamp = end_timestamp
