# 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 HolderReference(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 = {
        'role_instance': 'str',
        'role_holder_type': 'RoleHolderObjectType',
        'role_holder': 'OneOfHolderReferenceRoleHolder'
    }

    attribute_map = {
        'role_instance': 'roleInstance',
        'role_holder_type': 'roleHolderType',
        'role_holder': 'roleHolder'
    }

    def __init__(self, role_instance=None, role_holder_type=None, role_holder=None):  # noqa: E501
        """HolderReference - a model defined in Swagger"""  # noqa: E501
        self._role_instance = None
        self._role_holder_type = None
        self._role_holder = None
        self.discriminator = None
        if role_instance is not None:
            self.role_instance = role_instance
        if role_holder_type is not None:
            self.role_holder_type = role_holder_type
        if role_holder is not None:
            self.role_holder = role_holder

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

        Role instance type:  * `relationship` - Relationship role type  * `security` - Security role type  * `system` - System role type  * `user` - User role type   # noqa: E501

        :return: The role_instance of this HolderReference.  # noqa: E501
        :rtype: str
        """
        return self._role_instance

    @role_instance.setter
    def role_instance(self, role_instance):
        """Sets the role_instance of this HolderReference.

        Role instance type:  * `relationship` - Relationship role type  * `security` - Security role type  * `system` - System role type  * `user` - User role type   # noqa: E501

        :param role_instance: The role_instance of this HolderReference.  # noqa: E501
        :type: str
        """
        allowed_values = ["relationship", "security", "system", "user"]  # noqa: E501
        if role_instance not in allowed_values:
            raise ValueError(
                "Invalid value for `role_instance` ({0}), must be one of {1}"  # noqa: E501
                .format(role_instance, allowed_values)
            )

        self._role_instance = role_instance

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


        :return: The role_holder_type of this HolderReference.  # noqa: E501
        :rtype: RoleHolderObjectType
        """
        return self._role_holder_type

    @role_holder_type.setter
    def role_holder_type(self, role_holder_type):
        """Sets the role_holder_type of this HolderReference.


        :param role_holder_type: The role_holder_type of this HolderReference.  # noqa: E501
        :type: RoleHolderObjectType
        """

        self._role_holder_type = role_holder_type

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


        :return: The role_holder of this HolderReference.  # noqa: E501
        :rtype: OneOfHolderReferenceRoleHolder
        """
        return self._role_holder

    @role_holder.setter
    def role_holder(self, role_holder):
        """Sets the role_holder of this HolderReference.


        :param role_holder: The role_holder of this HolderReference.  # noqa: E501
        :type: OneOfHolderReferenceRoleHolder
        """

        self._role_holder = role_holder

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

        return self.__dict__ == other.__dict__

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