# coding: utf-8

"""
    SYSNET CRZP connector API

    SYSNET CRŽP connector REST API (IPPC & CITES extension)  # noqa: E501

    OpenAPI spec version: 1.1.0
    Contact: info@sysnet.cz
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

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

    Do not edit the class manually.
    """
    """
    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 = {
        'id': 'str',
        'name': 'str',
        'code': 'str',
        'empowered': 'bool',
        'permission': 'list[str]',
        'subject': 'ContextSubject',
        'relationship': 'str',
        'system': 'ContextSystem',
        'role_type': 'str'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'code': 'code',
        'empowered': 'empowered',
        'permission': 'permission',
        'subject': 'subject',
        'relationship': 'relationship',
        'system': 'system',
        'role_type': 'roleType'
    }

    def __init__(self, id=None, name=None, code=None, empowered=None, permission=None, subject=None, relationship=None, system=None, role_type=None):  # noqa: E501
        """ContextRole - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._code = None
        self._empowered = None
        self._permission = None
        self._subject = None
        self._relationship = None
        self._system = None
        self._role_type = None
        self.discriminator = None
        self.id = id
        if name is not None:
            self.name = name
        if code is not None:
            self.code = code
        if empowered is not None:
            self.empowered = empowered
        if permission is not None:
            self.permission = permission
        if subject is not None:
            self.subject = subject
        if relationship is not None:
            self.relationship = relationship
        if system is not None:
            self.system = system
        if role_type is not None:
            self.role_type = role_type

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


        :return: The id of this ContextRole.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ContextRole.


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

        self._id = id

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


        :return: The name of this ContextRole.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ContextRole.


        :param name: The name of this ContextRole.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The code of this ContextRole.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this ContextRole.


        :param code: The code of this ContextRole.  # noqa: E501
        :type: str
        """

        self._code = code

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


        :return: The empowered of this ContextRole.  # noqa: E501
        :rtype: bool
        """
        return self._empowered

    @empowered.setter
    def empowered(self, empowered):
        """Sets the empowered of this ContextRole.


        :param empowered: The empowered of this ContextRole.  # noqa: E501
        :type: bool
        """

        self._empowered = empowered

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


        :return: The permission of this ContextRole.  # noqa: E501
        :rtype: list[str]
        """
        return self._permission

    @permission.setter
    def permission(self, permission):
        """Sets the permission of this ContextRole.


        :param permission: The permission of this ContextRole.  # noqa: E501
        :type: list[str]
        """

        self._permission = permission

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


        :return: The subject of this ContextRole.  # noqa: E501
        :rtype: ContextSubject
        """
        return self._subject

    @subject.setter
    def subject(self, subject):
        """Sets the subject of this ContextRole.


        :param subject: The subject of this ContextRole.  # noqa: E501
        :type: ContextSubject
        """

        self._subject = subject

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


        :return: The relationship of this ContextRole.  # noqa: E501
        :rtype: str
        """
        return self._relationship

    @relationship.setter
    def relationship(self, relationship):
        """Sets the relationship of this ContextRole.


        :param relationship: The relationship of this ContextRole.  # noqa: E501
        :type: str
        """

        self._relationship = relationship

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


        :return: The system of this ContextRole.  # noqa: E501
        :rtype: ContextSystem
        """
        return self._system

    @system.setter
    def system(self, system):
        """Sets the system of this ContextRole.


        :param system: The system of this ContextRole.  # noqa: E501
        :type: ContextSystem
        """

        self._system = system

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


        :return: The role_type of this ContextRole.  # noqa: E501
        :rtype: str
        """
        return self._role_type

    @role_type.setter
    def role_type(self, role_type):
        """Sets the role_type of this ContextRole.


        :param role_type: The role_type of this ContextRole.  # noqa: E501
        :type: str
        """

        self._role_type = role_type

    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(ContextRole, 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, ContextRole):
            return False

        return self.__dict__ == other.__dict__

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