# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from swagger_server.models.base_model_ import Model
from swagger_server import util


class RoleResourcePermission(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    def __init__(self, role_id: int=None, resource_id: int=None, permission_id: int=None, created_at: datetime=None, updated_at: datetime=None):  # noqa: E501
        """RoleResourcePermission - a model defined in Swagger

        :param role_id: The role_id of this RoleResourcePermission.  # noqa: E501
        :type role_id: int
        :param resource_id: The resource_id of this RoleResourcePermission.  # noqa: E501
        :type resource_id: int
        :param permission_id: The permission_id of this RoleResourcePermission.  # noqa: E501
        :type permission_id: int
        :param created_at: The created_at of this RoleResourcePermission.  # noqa: E501
        :type created_at: datetime
        :param updated_at: The updated_at of this RoleResourcePermission.  # noqa: E501
        :type updated_at: datetime
        """
        self.swagger_types = {
            'role_id': int,
            'resource_id': int,
            'permission_id': int,
            'created_at': datetime,
            'updated_at': datetime
        }

        self.attribute_map = {
            'role_id': 'role_id',
            'resource_id': 'resource_id',
            'permission_id': 'permission_id',
            'created_at': 'created_at',
            'updated_at': 'updated_at'
        }

        self._role_id = role_id
        self._resource_id = resource_id
        self._permission_id = permission_id
        self._created_at = created_at
        self._updated_at = updated_at

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

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

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


        :return: The role_id of this RoleResourcePermission.
        :rtype: int
        """
        return self._role_id

    @role_id.setter
    def role_id(self, role_id: int):
        """Sets the role_id of this RoleResourcePermission.


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

        self._role_id = role_id

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


        :return: The resource_id of this RoleResourcePermission.
        :rtype: int
        """
        return self._resource_id

    @resource_id.setter
    def resource_id(self, resource_id: int):
        """Sets the resource_id of this RoleResourcePermission.


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

        self._resource_id = resource_id

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


        :return: The permission_id of this RoleResourcePermission.
        :rtype: int
        """
        return self._permission_id

    @permission_id.setter
    def permission_id(self, permission_id: int):
        """Sets the permission_id of this RoleResourcePermission.


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

        self._permission_id = permission_id

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


        :return: The created_at of this RoleResourcePermission.
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at: datetime):
        """Sets the created_at of this RoleResourcePermission.


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

        self._created_at = created_at

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


        :return: The updated_at of this RoleResourcePermission.
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at: datetime):
        """Sets the updated_at of this RoleResourcePermission.


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

        self._updated_at = updated_at
