Source code for swagger_server.models.invitation_site_role_create

# 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 InvitationSiteRoleCreate(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, invitation_id: str=None, site_id: int=None, role_id: int=None): # noqa: E501 """InvitationSiteRoleCreate - a model defined in Swagger :param invitation_id: The invitation_id of this InvitationSiteRoleCreate. # noqa: E501 :type invitation_id: str :param site_id: The site_id of this InvitationSiteRoleCreate. # noqa: E501 :type site_id: int :param role_id: The role_id of this InvitationSiteRoleCreate. # noqa: E501 :type role_id: int """ self.swagger_types = { 'invitation_id': str, 'site_id': int, 'role_id': int } self.attribute_map = { 'invitation_id': 'invitation_id', 'site_id': 'site_id', 'role_id': 'role_id' } self._invitation_id = invitation_id self._site_id = site_id self._role_id = role_id
[docs] @classmethod def from_dict(cls, dikt) -> 'InvitationSiteRoleCreate': """Returns the dict as a model :param dikt: A dict. :type: dict :return: The invitation_site_role_create of this InvitationSiteRoleCreate. # noqa: E501 :rtype: InvitationSiteRoleCreate """ return util.deserialize_model(dikt, cls)
@property def invitation_id(self) -> str: """Gets the invitation_id of this InvitationSiteRoleCreate. :return: The invitation_id of this InvitationSiteRoleCreate. :rtype: str """ return self._invitation_id @invitation_id.setter def invitation_id(self, invitation_id: str): """Sets the invitation_id of this InvitationSiteRoleCreate. :param invitation_id: The invitation_id of this InvitationSiteRoleCreate. :type invitation_id: str """ if invitation_id is None: raise ValueError("Invalid value for `invitation_id`, must not be `None`") # noqa: E501 self._invitation_id = invitation_id @property def site_id(self) -> int: """Gets the site_id of this InvitationSiteRoleCreate. :return: The site_id of this InvitationSiteRoleCreate. :rtype: int """ return self._site_id @site_id.setter def site_id(self, site_id: int): """Sets the site_id of this InvitationSiteRoleCreate. :param site_id: The site_id of this InvitationSiteRoleCreate. :type site_id: int """ if site_id is None: raise ValueError("Invalid value for `site_id`, must not be `None`") # noqa: E501 self._site_id = site_id @property def role_id(self) -> int: """Gets the role_id of this InvitationSiteRoleCreate. :return: The role_id of this InvitationSiteRoleCreate. :rtype: int """ return self._role_id @role_id.setter def role_id(self, role_id: int): """Sets the role_id of this InvitationSiteRoleCreate. :param role_id: The role_id of this InvitationSiteRoleCreate. :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