# 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 RoleUpdate(Model):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, label: str=None, requires_2fa: bool=None, description: str=None): # noqa: E501
"""RoleUpdate - a model defined in Swagger
:param label: The label of this RoleUpdate. # noqa: E501
:type label: str
:param requires_2fa: The requires_2fa of this RoleUpdate. # noqa: E501
:type requires_2fa: bool
:param description: The description of this RoleUpdate. # noqa: E501
:type description: str
"""
self.swagger_types = {
'label': str,
'requires_2fa': bool,
'description': str
}
self.attribute_map = {
'label': 'label',
'requires_2fa': 'requires_2fa',
'description': 'description'
}
self._label = label
self._requires_2fa = requires_2fa
self._description = description
[docs] @classmethod
def from_dict(cls, dikt) -> 'RoleUpdate':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The role_update of this RoleUpdate. # noqa: E501
:rtype: RoleUpdate
"""
return util.deserialize_model(dikt, cls)
@property
def label(self) -> str:
"""Gets the label of this RoleUpdate.
:return: The label of this RoleUpdate.
:rtype: str
"""
return self._label
@label.setter
def label(self, label: str):
"""Sets the label of this RoleUpdate.
:param label: The label of this RoleUpdate.
:type label: str
"""
if label is not None and len(label) > 100:
raise ValueError("Invalid value for `label`, length must be less than or equal to `100`") # noqa: E501
self._label = label
@property
def requires_2fa(self) -> bool:
"""Gets the requires_2fa of this RoleUpdate.
:return: The requires_2fa of this RoleUpdate.
:rtype: bool
"""
return self._requires_2fa
@requires_2fa.setter
def requires_2fa(self, requires_2fa: bool):
"""Sets the requires_2fa of this RoleUpdate.
:param requires_2fa: The requires_2fa of this RoleUpdate.
:type requires_2fa: bool
"""
self._requires_2fa = requires_2fa
@property
def description(self) -> str:
"""Gets the description of this RoleUpdate.
:return: The description of this RoleUpdate.
:rtype: str
"""
return self._description
@description.setter
def description(self, description: str):
"""Sets the description of this RoleUpdate.
:param description: The description of this RoleUpdate.
:type description: str
"""
self._description = description