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

    Do not edit the class manually.
    """

    def __init__(self, can_create_feature=None, approvable_gate_types=None, can_comment=None, can_edit_all=None, can_review_release_notes=None, is_admin=None, email=None, editable_features=None):  # noqa: E501
        """UserPermissions - a model defined in OpenAPI

        :param can_create_feature: The can_create_feature of this UserPermissions.  # noqa: E501
        :type can_create_feature: bool
        :param approvable_gate_types: The approvable_gate_types of this UserPermissions.  # noqa: E501
        :type approvable_gate_types: List[int]
        :param can_comment: The can_comment of this UserPermissions.  # noqa: E501
        :type can_comment: bool
        :param can_edit_all: The can_edit_all of this UserPermissions.  # noqa: E501
        :type can_edit_all: bool
        :param can_review_release_notes: The can_review_release_notes of this UserPermissions.  # noqa: E501
        :type can_review_release_notes: bool
        :param is_admin: The is_admin of this UserPermissions.  # noqa: E501
        :type is_admin: bool
        :param email: The email of this UserPermissions.  # noqa: E501
        :type email: str
        :param editable_features: The editable_features of this UserPermissions.  # noqa: E501
        :type editable_features: List[int]
        """
        self.openapi_types = {
            'can_create_feature': bool,
            'approvable_gate_types': List[int],
            'can_comment': bool,
            'can_edit_all': bool,
            'can_review_release_notes': bool,
            'is_admin': bool,
            'email': str,
            'editable_features': List[int]
        }

        self.attribute_map = {
            'can_create_feature': 'can_create_feature',
            'approvable_gate_types': 'approvable_gate_types',
            'can_comment': 'can_comment',
            'can_edit_all': 'can_edit_all',
            'can_review_release_notes': 'can_review_release_notes',
            'is_admin': 'is_admin',
            'email': 'email',
            'editable_features': 'editable_features'
        }

        self._can_create_feature = can_create_feature
        self._approvable_gate_types = approvable_gate_types
        self._can_comment = can_comment
        self._can_edit_all = can_edit_all
        self._can_review_release_notes = can_review_release_notes
        self._is_admin = is_admin
        self._email = email
        self._editable_features = editable_features

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

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

    @property
    def can_create_feature(self) -> bool:
        """Gets the can_create_feature of this UserPermissions.


        :return: The can_create_feature of this UserPermissions.
        :rtype: bool
        """
        return self._can_create_feature

    @can_create_feature.setter
    def can_create_feature(self, can_create_feature: bool):
        """Sets the can_create_feature of this UserPermissions.


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

        self._can_create_feature = can_create_feature

    @property
    def approvable_gate_types(self) -> List[int]:
        """Gets the approvable_gate_types of this UserPermissions.

        each element should be unique as OAS does not support set  # noqa: E501

        :return: The approvable_gate_types of this UserPermissions.
        :rtype: List[int]
        """
        return self._approvable_gate_types

    @approvable_gate_types.setter
    def approvable_gate_types(self, approvable_gate_types: List[int]):
        """Sets the approvable_gate_types of this UserPermissions.

        each element should be unique as OAS does not support set  # noqa: E501

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

        self._approvable_gate_types = approvable_gate_types

    @property
    def can_comment(self) -> bool:
        """Gets the can_comment of this UserPermissions.


        :return: The can_comment of this UserPermissions.
        :rtype: bool
        """
        return self._can_comment

    @can_comment.setter
    def can_comment(self, can_comment: bool):
        """Sets the can_comment of this UserPermissions.


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

        self._can_comment = can_comment

    @property
    def can_edit_all(self) -> bool:
        """Gets the can_edit_all of this UserPermissions.


        :return: The can_edit_all of this UserPermissions.
        :rtype: bool
        """
        return self._can_edit_all

    @can_edit_all.setter
    def can_edit_all(self, can_edit_all: bool):
        """Sets the can_edit_all of this UserPermissions.


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

        self._can_edit_all = can_edit_all

    @property
    def can_review_release_notes(self) -> bool:
        """Gets the can_review_release_notes of this UserPermissions.


        :return: The can_review_release_notes of this UserPermissions.
        :rtype: bool
        """
        return self._can_review_release_notes

    @can_review_release_notes.setter
    def can_review_release_notes(self, can_review_release_notes: bool):
        """Sets the can_review_release_notes of this UserPermissions.


        :param can_review_release_notes: The can_review_release_notes of this UserPermissions.
        :type can_review_release_notes: bool
        """

        self._can_review_release_notes = can_review_release_notes

    @property
    def is_admin(self) -> bool:
        """Gets the is_admin of this UserPermissions.


        :return: The is_admin of this UserPermissions.
        :rtype: bool
        """
        return self._is_admin

    @is_admin.setter
    def is_admin(self, is_admin: bool):
        """Sets the is_admin of this UserPermissions.


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

        self._is_admin = is_admin

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


        :return: The email of this UserPermissions.
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email: str):
        """Sets the email of this UserPermissions.


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

        self._email = email

    @property
    def editable_features(self) -> List[int]:
        """Gets the editable_features of this UserPermissions.


        :return: The editable_features of this UserPermissions.
        :rtype: List[int]
        """
        return self._editable_features

    @editable_features.setter
    def editable_features(self, editable_features: List[int]):
        """Sets the editable_features of this UserPermissions.


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

        self._editable_features = editable_features
