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

    Do not edit the class manually.
    """

    def __init__(self, status=None, suggested_summary=None, original_summary=None, version_token=None):  # noqa: E501
        """SummarySuggestionPatchRequest - a model defined in OpenAPI

        :param status: The status of this SummarySuggestionPatchRequest.  # noqa: E501
        :type status: str
        :param suggested_summary: The suggested_summary of this SummarySuggestionPatchRequest.  # noqa: E501
        :type suggested_summary: str
        :param original_summary: The original_summary of this SummarySuggestionPatchRequest.  # noqa: E501
        :type original_summary: str
        :param version_token: The version_token of this SummarySuggestionPatchRequest.  # noqa: E501
        :type version_token: int
        """
        self.openapi_types = {
            'status': str,
            'suggested_summary': str,
            'original_summary': str,
            'version_token': int
        }

        self.attribute_map = {
            'status': 'status',
            'suggested_summary': 'suggested_summary',
            'original_summary': 'original_summary',
            'version_token': 'version_token'
        }

        self._status = status
        self._suggested_summary = suggested_summary
        self._original_summary = original_summary
        self._version_token = version_token

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

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

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

        Updated lifecycle status for the suggestion. Null if status is unchanged: - APPLIED: Approves suggestion, updating FeatureEntry.summary and setting summary_source to AI_APPLIED. - REJECTED: Declines suggestion, preserving manual summary and setting summary_source to HUMAN. - DISCARDED: Obsoletes suggestion (e.g. feature deleted or re-generated).   # noqa: E501

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

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

        Updated lifecycle status for the suggestion. Null if status is unchanged: - APPLIED: Approves suggestion, updating FeatureEntry.summary and setting summary_source to AI_APPLIED. - REJECTED: Declines suggestion, preserving manual summary and setting summary_source to HUMAN. - DISCARDED: Obsoletes suggestion (e.g. feature deleted or re-generated).   # noqa: E501

        :param status: The status of this SummarySuggestionPatchRequest.
        :type status: str
        """
        allowed_values = [None,"PENDING", "APPLIED", "REJECTED", "DISCARDED"]  # 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 suggested_summary(self) -> str:
        """Gets the suggested_summary of this SummarySuggestionPatchRequest.

        Updated summary text edited by reviewer.  # noqa: E501

        :return: The suggested_summary of this SummarySuggestionPatchRequest.
        :rtype: str
        """
        return self._suggested_summary

    @suggested_summary.setter
    def suggested_summary(self, suggested_summary: str):
        """Sets the suggested_summary of this SummarySuggestionPatchRequest.

        Updated summary text edited by reviewer.  # noqa: E501

        :param suggested_summary: The suggested_summary of this SummarySuggestionPatchRequest.
        :type suggested_summary: str
        """

        self._suggested_summary = suggested_summary

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

        Pre-existing feature summary text active prior to AI generation.  # noqa: E501

        :return: The original_summary of this SummarySuggestionPatchRequest.
        :rtype: str
        """
        return self._original_summary

    @original_summary.setter
    def original_summary(self, original_summary: str):
        """Sets the original_summary of this SummarySuggestionPatchRequest.

        Pre-existing feature summary text active prior to AI generation.  # noqa: E501

        :param original_summary: The original_summary of this SummarySuggestionPatchRequest.
        :type original_summary: str
        """

        self._original_summary = original_summary

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

        Expected current version_token of the suggestion being patched for Optimistic Concurrency Control (OCC). Must match the server's current version_token, otherwise the server rejects the request with HTTP 409 Conflict. (TODO: Migrate to standard HTTP ETag / If-Match headers if the repo adopts header-based OCC across REST endpoints.)   # noqa: E501

        :return: The version_token of this SummarySuggestionPatchRequest.
        :rtype: int
        """
        return self._version_token

    @version_token.setter
    def version_token(self, version_token: int):
        """Sets the version_token of this SummarySuggestionPatchRequest.

        Expected current version_token of the suggestion being patched for Optimistic Concurrency Control (OCC). Must match the server's current version_token, otherwise the server rejects the request with HTTP 409 Conflict. (TODO: Migrate to standard HTTP ETag / If-Match headers if the repo adopts header-based OCC across REST endpoints.)   # noqa: E501

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

        self._version_token = version_token
