Source code for swagger_server.models.all_user_roles

# 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


[docs]class AllUserRoles(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, user_id: str=None, roles_map: Dict[str, List[int]]=None): # noqa: E501 """AllUserRoles - a model defined in Swagger :param user_id: The user_id of this AllUserRoles. # noqa: E501 :type user_id: str :param roles_map: The roles_map of this AllUserRoles. # noqa: E501 :type roles_map: Dict[str, List[int]] """ self.swagger_types = { 'user_id': str, 'roles_map': Dict[str, List[int]] } self.attribute_map = { 'user_id': 'user_id', 'roles_map': 'roles_map' } self._user_id = user_id self._roles_map = roles_map
[docs] @classmethod def from_dict(cls, dikt) -> 'AllUserRoles': """Returns the dict as a model :param dikt: A dict. :type: dict :return: The all_user_roles of this AllUserRoles. # noqa: E501 :rtype: AllUserRoles """ return util.deserialize_model(dikt, cls)
@property def user_id(self) -> str: """Gets the user_id of this AllUserRoles. :return: The user_id of this AllUserRoles. :rtype: str """ return self._user_id @user_id.setter def user_id(self, user_id: str): """Sets the user_id of this AllUserRoles. :param user_id: The user_id of this AllUserRoles. :type user_id: str """ if user_id is None: raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 self._user_id = user_id @property def roles_map(self) -> Dict[str, List[int]]: """Gets the roles_map of this AllUserRoles. Domain and site roles # noqa: E501 :return: The roles_map of this AllUserRoles. :rtype: Dict[str, List[int]] """ return self._roles_map @roles_map.setter def roles_map(self, roles_map: Dict[str, List[int]]): """Sets the roles_map of this AllUserRoles. Domain and site roles # noqa: E501 :param roles_map: The roles_map of this AllUserRoles. :type roles_map: Dict[str, List[int]] """ if roles_map is None: raise ValueError("Invalid value for `roles_map`, must not be `None`") # noqa: E501 self._roles_map = roles_map