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 MilestoneCurationResponse(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, milestone=None, status=None, curator_emails=None, last_reviewed=None):  # noqa: E501
        """MilestoneCurationResponse - a model defined in OpenAPI

        :param milestone: The milestone of this MilestoneCurationResponse.  # noqa: E501
        :type milestone: int
        :param status: The status of this MilestoneCurationResponse.  # noqa: E501
        :type status: str
        :param curator_emails: The curator_emails of this MilestoneCurationResponse.  # noqa: E501
        :type curator_emails: List[str]
        :param last_reviewed: The last_reviewed of this MilestoneCurationResponse.  # noqa: E501
        :type last_reviewed: datetime
        """
        self.openapi_types = {
            'milestone': int,
            'status': str,
            'curator_emails': List[str],
            'last_reviewed': datetime
        }

        self.attribute_map = {
            'milestone': 'milestone',
            'status': 'status',
            'curator_emails': 'curator_emails',
            'last_reviewed': 'last_reviewed'
        }

        self._milestone = milestone
        self._status = status
        self._curator_emails = curator_emails
        self._last_reviewed = last_reviewed

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

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

    @property
    def milestone(self) -> int:
        """Gets the milestone of this MilestoneCurationResponse.

        Target Chromium milestone number.  # noqa: E501

        :return: The milestone of this MilestoneCurationResponse.
        :rtype: int
        """
        return self._milestone

    @milestone.setter
    def milestone(self, milestone: int):
        """Sets the milestone of this MilestoneCurationResponse.

        Target Chromium milestone number.  # noqa: E501

        :param milestone: The milestone of this MilestoneCurationResponse.
        :type milestone: int
        """
        if milestone is None:
            raise ValueError("Invalid value for `milestone`, must not be `None`")  # noqa: E501
        if milestone is not None and milestone < 1:  # noqa: E501
            raise ValueError("Invalid value for `milestone`, must be a value greater than or equal to `1`")  # noqa: E501

        self._milestone = milestone

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

        Editorial review status of the milestone curation workflow: - PENDING: Milestone curation has not started - IN_REVIEW: Milestone curation is under active editorial review - COMPLETED: Milestone curation review is completed (updates last_reviewed timestamp)   # noqa: E501

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

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

        Editorial review status of the milestone curation workflow: - PENDING: Milestone curation has not started - IN_REVIEW: Milestone curation is under active editorial review - COMPLETED: Milestone curation review is completed (updates last_reviewed timestamp)   # noqa: E501

        :param status: The status of this MilestoneCurationResponse.
        :type status: str
        """
        allowed_values = ["PENDING", "IN_REVIEW", "COMPLETED"]  # 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 curator_emails(self) -> List[str]:
        """Gets the curator_emails of this MilestoneCurationResponse.

        List of editor email addresses assigned to curate release notes for this milestone.  # noqa: E501

        :return: The curator_emails of this MilestoneCurationResponse.
        :rtype: List[str]
        """
        return self._curator_emails

    @curator_emails.setter
    def curator_emails(self, curator_emails: List[str]):
        """Sets the curator_emails of this MilestoneCurationResponse.

        List of editor email addresses assigned to curate release notes for this milestone.  # noqa: E501

        :param curator_emails: The curator_emails of this MilestoneCurationResponse.
        :type curator_emails: List[str]
        """
        if curator_emails is None:
            raise ValueError("Invalid value for `curator_emails`, must not be `None`")  # noqa: E501

        self._curator_emails = curator_emails

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

        UTC timestamp when milestone curation was last reviewed or completed. Null if unreviewed.  # noqa: E501

        :return: The last_reviewed of this MilestoneCurationResponse.
        :rtype: datetime
        """
        return self._last_reviewed

    @last_reviewed.setter
    def last_reviewed(self, last_reviewed: datetime):
        """Sets the last_reviewed of this MilestoneCurationResponse.

        UTC timestamp when milestone curation was last reviewed or completed. Null if unreviewed.  # noqa: E501

        :param last_reviewed: The last_reviewed of this MilestoneCurationResponse.
        :type last_reviewed: datetime
        """

        self._last_reviewed = last_reviewed
