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

    Do not edit the class manually.
    """

    def __init__(self, id=None, name=None, summary=None, category=None, category_name=None, feature_type=None, baseline_status=None, summary_source=None):  # noqa: E501
        """ReleaseNoteFeature - a model defined in OpenAPI

        :param id: The id of this ReleaseNoteFeature.  # noqa: E501
        :type id: int
        :param name: The name of this ReleaseNoteFeature.  # noqa: E501
        :type name: str
        :param summary: The summary of this ReleaseNoteFeature.  # noqa: E501
        :type summary: str
        :param category: The category of this ReleaseNoteFeature.  # noqa: E501
        :type category: int
        :param category_name: The category_name of this ReleaseNoteFeature.  # noqa: E501
        :type category_name: str
        :param feature_type: The feature_type of this ReleaseNoteFeature.  # noqa: E501
        :type feature_type: int
        :param baseline_status: The baseline_status of this ReleaseNoteFeature.  # noqa: E501
        :type baseline_status: str
        :param summary_source: The summary_source of this ReleaseNoteFeature.  # noqa: E501
        :type summary_source: str
        """
        self.openapi_types = {
            'id': int,
            'name': str,
            'summary': str,
            'category': int,
            'category_name': str,
            'feature_type': int,
            'baseline_status': str,
            'summary_source': str
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'summary': 'summary',
            'category': 'category',
            'category_name': 'category_name',
            'feature_type': 'feature_type',
            'baseline_status': 'baseline_status',
            'summary_source': 'summary_source'
        }

        self._id = id
        self._name = name
        self._summary = summary
        self._category = category
        self._category_name = category_name
        self._feature_type = feature_type
        self._baseline_status = baseline_status
        self._summary_source = summary_source

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

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

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

        Unique feature identifier.  # noqa: E501

        :return: The id of this ReleaseNoteFeature.
        :rtype: int
        """
        return self._id

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

        Unique feature identifier.  # noqa: E501

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

        self._id = id

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

        Feature title or display name.  # noqa: E501

        :return: The name of this ReleaseNoteFeature.
        :rtype: str
        """
        return self._name

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

        Feature title or display name.  # noqa: E501

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

        self._name = name

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

        Release note summary text (either human-written summary or applied AI suggestion).  # noqa: E501

        :return: The summary of this ReleaseNoteFeature.
        :rtype: str
        """
        return self._summary

    @summary.setter
    def summary(self, summary: str):
        """Sets the summary of this ReleaseNoteFeature.

        Release note summary text (either human-written summary or applied AI suggestion).  # noqa: E501

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

        self._summary = summary

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

        Numeric category identifier.  # noqa: E501

        :return: The category of this ReleaseNoteFeature.
        :rtype: int
        """
        return self._category

    @category.setter
    def category(self, category: int):
        """Sets the category of this ReleaseNoteFeature.

        Numeric category identifier.  # noqa: E501

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

        self._category = category

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

        Human-readable category label (e.g., 'DOM', 'CSS', 'JavaScript').  # noqa: E501

        :return: The category_name of this ReleaseNoteFeature.
        :rtype: str
        """
        return self._category_name

    @category_name.setter
    def category_name(self, category_name: str):
        """Sets the category_name of this ReleaseNoteFeature.

        Human-readable category label (e.g., 'DOM', 'CSS', 'JavaScript').  # noqa: E501

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

        self._category_name = category_name

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

        Numeric feature launch type identifier (e.g., New Feature, Deprecation).  # noqa: E501

        :return: The feature_type of this ReleaseNoteFeature.
        :rtype: int
        """
        return self._feature_type

    @feature_type.setter
    def feature_type(self, feature_type: int):
        """Sets the feature_type of this ReleaseNoteFeature.

        Numeric feature launch type identifier (e.g., New Feature, Deprecation).  # noqa: E501

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

        self._feature_type = feature_type

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

        WebDX Baseline interoperability state. Null if Baseline status is un-tracked.  # noqa: E501

        :return: The baseline_status of this ReleaseNoteFeature.
        :rtype: str
        """
        return self._baseline_status

    @baseline_status.setter
    def baseline_status(self, baseline_status: str):
        """Sets the baseline_status of this ReleaseNoteFeature.

        WebDX Baseline interoperability state. Null if Baseline status is un-tracked.  # noqa: E501

        :param baseline_status: The baseline_status of this ReleaseNoteFeature.
        :type baseline_status: str
        """
        allowed_values = [None,"none", "limited", "newly", "widely"]  # noqa: E501
        if baseline_status not in allowed_values:
            raise ValueError(
                "Invalid value for `baseline_status` ({0}), must be one of {1}"
                .format(baseline_status, allowed_values)
            )

        self._baseline_status = baseline_status

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

        Source provenance of the active feature summary text returned in this release note: - AI_APPLIED: The active summary text was generated by AI and explicitly approved by an editor (SummarySuggestion.status == APPLIED). - HUMAN: The active summary text was manually authored by a human developer or editor. Note: Unapproved draft suggestions sitting in state PENDING do not alter the active summary text or its provenance until approved.   # noqa: E501

        :return: The summary_source of this ReleaseNoteFeature.
        :rtype: str
        """
        return self._summary_source

    @summary_source.setter
    def summary_source(self, summary_source: str):
        """Sets the summary_source of this ReleaseNoteFeature.

        Source provenance of the active feature summary text returned in this release note: - AI_APPLIED: The active summary text was generated by AI and explicitly approved by an editor (SummarySuggestion.status == APPLIED). - HUMAN: The active summary text was manually authored by a human developer or editor. Note: Unapproved draft suggestions sitting in state PENDING do not alter the active summary text or its provenance until approved.   # noqa: E501

        :param summary_source: The summary_source of this ReleaseNoteFeature.
        :type summary_source: str
        """
        allowed_values = ["HUMAN", "AI_APPLIED"]  # noqa: E501
        if summary_source not in allowed_values:
            raise ValueError(
                "Invalid value for `summary_source` ({0}), must be one of {1}"
                .format(summary_source, allowed_values)
            )

        self._summary_source = summary_source
