Top

lentiq.models.project_permission module

# coding: utf-8
####alex test
"""
    
    
        
    """

import pprint
import re  # noqa: F401

import six


class ProjectPermission(object):
    """
        """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'datapool_name': 'str',
        'project_name': 'str',
        'user_email': 'str',
        'user_id': 'int',
        'user_role': 'str'
    }

    attribute_map = {
        'datapool_name': 'datapoolName',
        'project_name': 'projectName',
        'user_email': 'userEmail',
        'user_id': 'userId',
        'user_role': 'userRole'
    }

    discriminator = None

    def __init__(self, datapool_name=None, project_name=None, user_email=None, user_id=None, user_role=None):  # noqa: E501
        """ProjectPermission - a model defined in Swagger"""  # noqa: E501
        self._datapool_name = None
        self._project_name = None
        self._user_email = None
        self._user_id = None
        self._user_role = None

        if datapool_name is not None:
            self.datapool_name = datapool_name
        if project_name is not None:
            self.project_name = project_name
        if user_email is not None:
            self.user_email = user_email
        if user_id is not None:
            self.user_id = user_id
        if user_role is not None:
            self.user_role = user_role

    @property
    def datapool_name(self):
        """Gets the datapool_name of this ProjectPermission.  # noqa: E501


        :return: The datapool_name of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._datapool_name

    @datapool_name.setter
    def datapool_name(self, datapool_name):
        """Sets the datapool_name of this ProjectPermission.


        :param datapool_name: The datapool_name of this ProjectPermission.  # noqa: E501
        :type: str
        """

        self._datapool_name = datapool_name

    @property
    def project_name(self):
        """Gets the project_name of this ProjectPermission.  # noqa: E501


        :return: The project_name of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._project_name

    @project_name.setter
    def project_name(self, project_name):
        """Sets the project_name of this ProjectPermission.


        :param project_name: The project_name of this ProjectPermission.  # noqa: E501
        :type: str
        """

        self._project_name = project_name

    @property
    def user_email(self):
        """Gets the user_email of this ProjectPermission.  # noqa: E501


        :return: The user_email of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._user_email

    @user_email.setter
    def user_email(self, user_email):
        """Sets the user_email of this ProjectPermission.


        :param user_email: The user_email of this ProjectPermission.  # noqa: E501
        :type: str
        """

        self._user_email = user_email

    @property
    def user_id(self):
        """Gets the user_id of this ProjectPermission.  # noqa: E501


        :return: The user_id of this ProjectPermission.  # noqa: E501
        :rtype: int
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this ProjectPermission.


        :param user_id: The user_id of this ProjectPermission.  # noqa: E501
        :type: int
        """

        self._user_id = user_id

    @property
    def user_role(self):
        """Gets the user_role of this ProjectPermission.  # noqa: E501

        The role for the user  # noqa: E501

        :return: The user_role of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._user_role

    @user_role.setter
    def user_role(self, user_role):
        """Sets the user_role of this ProjectPermission.

        The role for the user  # noqa: E501

        :param user_role: The user_role of this ProjectPermission.  # noqa: E501
        :type: str
        """
        allowed_values = ["ProjectManager", "ProjectAccess"]  # noqa: E501
        if user_role not in allowed_values:
            raise ValueError(
                "Invalid value for `user_role` ({0}), must be one of {1}"  # noqa: E501
                .format(user_role, allowed_values)
            )

        self._user_role = user_role

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(ProjectPermission, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ProjectPermission):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other

Classes

class ProjectPermission

class ProjectPermission(object):
    """
        """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'datapool_name': 'str',
        'project_name': 'str',
        'user_email': 'str',
        'user_id': 'int',
        'user_role': 'str'
    }

    attribute_map = {
        'datapool_name': 'datapoolName',
        'project_name': 'projectName',
        'user_email': 'userEmail',
        'user_id': 'userId',
        'user_role': 'userRole'
    }

    discriminator = None

    def __init__(self, datapool_name=None, project_name=None, user_email=None, user_id=None, user_role=None):  # noqa: E501
        """ProjectPermission - a model defined in Swagger"""  # noqa: E501
        self._datapool_name = None
        self._project_name = None
        self._user_email = None
        self._user_id = None
        self._user_role = None

        if datapool_name is not None:
            self.datapool_name = datapool_name
        if project_name is not None:
            self.project_name = project_name
        if user_email is not None:
            self.user_email = user_email
        if user_id is not None:
            self.user_id = user_id
        if user_role is not None:
            self.user_role = user_role

    @property
    def datapool_name(self):
        """Gets the datapool_name of this ProjectPermission.  # noqa: E501


        :return: The datapool_name of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._datapool_name

    @datapool_name.setter
    def datapool_name(self, datapool_name):
        """Sets the datapool_name of this ProjectPermission.


        :param datapool_name: The datapool_name of this ProjectPermission.  # noqa: E501
        :type: str
        """

        self._datapool_name = datapool_name

    @property
    def project_name(self):
        """Gets the project_name of this ProjectPermission.  # noqa: E501


        :return: The project_name of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._project_name

    @project_name.setter
    def project_name(self, project_name):
        """Sets the project_name of this ProjectPermission.


        :param project_name: The project_name of this ProjectPermission.  # noqa: E501
        :type: str
        """

        self._project_name = project_name

    @property
    def user_email(self):
        """Gets the user_email of this ProjectPermission.  # noqa: E501


        :return: The user_email of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._user_email

    @user_email.setter
    def user_email(self, user_email):
        """Sets the user_email of this ProjectPermission.


        :param user_email: The user_email of this ProjectPermission.  # noqa: E501
        :type: str
        """

        self._user_email = user_email

    @property
    def user_id(self):
        """Gets the user_id of this ProjectPermission.  # noqa: E501


        :return: The user_id of this ProjectPermission.  # noqa: E501
        :rtype: int
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this ProjectPermission.


        :param user_id: The user_id of this ProjectPermission.  # noqa: E501
        :type: int
        """

        self._user_id = user_id

    @property
    def user_role(self):
        """Gets the user_role of this ProjectPermission.  # noqa: E501

        The role for the user  # noqa: E501

        :return: The user_role of this ProjectPermission.  # noqa: E501
        :rtype: str
        """
        return self._user_role

    @user_role.setter
    def user_role(self, user_role):
        """Sets the user_role of this ProjectPermission.

        The role for the user  # noqa: E501

        :param user_role: The user_role of this ProjectPermission.  # noqa: E501
        :type: str
        """
        allowed_values = ["ProjectManager", "ProjectAccess"]  # noqa: E501
        if user_role not in allowed_values:
            raise ValueError(
                "Invalid value for `user_role` ({0}), must be one of {1}"  # noqa: E501
                .format(user_role, allowed_values)
            )

        self._user_role = user_role

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(ProjectPermission, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ProjectPermission):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other

Ancestors (in MRO)

Class variables

var attribute_map

var discriminator

var swagger_types

Static methods

def __init__(

self, datapool_name=None, project_name=None, user_email=None, user_id=None, user_role=None)

ProjectPermission - a model defined in Swagger

def __init__(self, datapool_name=None, project_name=None, user_email=None, user_id=None, user_role=None):  # noqa: E501
    """ProjectPermission - a model defined in Swagger"""  # noqa: E501
    self._datapool_name = None
    self._project_name = None
    self._user_email = None
    self._user_id = None
    self._user_role = None
    if datapool_name is not None:
        self.datapool_name = datapool_name
    if project_name is not None:
        self.project_name = project_name
    if user_email is not None:
        self.user_email = user_email
    if user_id is not None:
        self.user_id = user_id
    if user_role is not None:
        self.user_role = user_role

def to_dict(

self)

Returns the model properties as a dict

def to_dict(self):
    """Returns the model properties as a dict"""
    result = {}
    for attr, _ in six.iteritems(self.swagger_types):
        value = getattr(self, attr)
        if isinstance(value, list):
            result[attr] = list(map(
                lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                value
            ))
        elif hasattr(value, "to_dict"):
            result[attr] = value.to_dict()
        elif isinstance(value, dict):
            result[attr] = dict(map(
                lambda item: (item[0], item[1].to_dict())
                if hasattr(item[1], "to_dict") else item,
                value.items()
            ))
        else:
            result[attr] = value
    if issubclass(ProjectPermission, dict):
        for key, value in self.items():
            result[key] = value
    return result

def to_str(

self)

Returns the string representation of the model

def to_str(self):
    """Returns the string representation of the model"""
    return pprint.pformat(self.to_dict())

Instance variables

var datapool_name

Gets the datapool_name of this ProjectPermission. # noqa: E501

:return: The datapool_name of this ProjectPermission. # noqa: E501 :rtype: str

var project_name

Gets the project_name of this ProjectPermission. # noqa: E501

:return: The project_name of this ProjectPermission. # noqa: E501 :rtype: str

var user_email

Gets the user_email of this ProjectPermission. # noqa: E501

:return: The user_email of this ProjectPermission. # noqa: E501 :rtype: str

var user_id

Gets the user_id of this ProjectPermission. # noqa: E501

:return: The user_id of this ProjectPermission. # noqa: E501 :rtype: int

var user_role

Gets the user_role of this ProjectPermission. # noqa: E501

The role for the user # noqa: E501

:return: The user_role of this ProjectPermission. # noqa: E501 :rtype: str