# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class AccessControlMergedTypeAccess(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'username': 'str',
        'super_user': 'bool',
        'group': 'str',
        'permission': 'str',
        'matches': 'bool',
        'extradata': 'str',
        'effective_permission': 'str',
        'collection': 'str',
        'id': 'str',
        'priority': 'int',
        'grantor': 'str',
        'type': 'str',
        'original_disabled_grantor': 'list[str]',
        'library': 'str'
    }

    attribute_map = {
        'username': 'username',
        'super_user': 'superUser',
        'group': 'group',
        'permission': 'permission',
        'matches': 'matches',
        'extradata': 'extradata',
        'effective_permission': 'effectivePermission',
        'collection': 'collection',
        'id': 'id',
        'priority': 'priority',
        'grantor': 'grantor',
        'type': 'type',
        'original_disabled_grantor': 'originalDisabledGrantor',
        'library': 'library'
    }

    def __init__(self, username=None, super_user=None, group=None, permission=None, matches=None, extradata=None, effective_permission=None, collection=None, id=None, priority=None, grantor=None, type=None, original_disabled_grantor=None, library=None):  # noqa: E501
        """AccessControlMergedTypeAccess - a model defined in OpenAPI"""  # noqa: E501

        self._username = None
        self._super_user = None
        self._group = None
        self._permission = None
        self._matches = None
        self._extradata = None
        self._effective_permission = None
        self._collection = None
        self._id = None
        self._priority = None
        self._grantor = None
        self._type = None
        self._original_disabled_grantor = None
        self._library = None
        self.discriminator = None

        if username is not None:
            self.username = username
        if super_user is not None:
            self.super_user = super_user
        if group is not None:
            self.group = group
        self.permission = permission
        if matches is not None:
            self.matches = matches
        if extradata is not None:
            self.extradata = extradata
        if effective_permission is not None:
            self.effective_permission = effective_permission
        if collection is not None:
            self.collection = collection
        if id is not None:
            self.id = id
        self.priority = priority
        if grantor is not None:
            self.grantor = grantor
        self.type = type
        if original_disabled_grantor is not None:
            self.original_disabled_grantor = original_disabled_grantor
        if library is not None:
            self.library = library

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


        :return: The username of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this AccessControlMergedTypeAccess.


        :param username: The username of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """

        self._username = username

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


        :return: The super_user of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: bool
        """
        return self._super_user

    @super_user.setter
    def super_user(self, super_user):
        """Sets the super_user of this AccessControlMergedTypeAccess.


        :param super_user: The super_user of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: bool
        """

        self._super_user = super_user

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


        :return: The group of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._group

    @group.setter
    def group(self, group):
        """Sets the group of this AccessControlMergedTypeAccess.


        :param group: The group of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """

        self._group = group

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


        :return: The permission of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._permission

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


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

        self._permission = permission

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


        :return: The matches of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: bool
        """
        return self._matches

    @matches.setter
    def matches(self, matches):
        """Sets the matches of this AccessControlMergedTypeAccess.


        :param matches: The matches of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: bool
        """

        self._matches = matches

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


        :return: The extradata of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._extradata

    @extradata.setter
    def extradata(self, extradata):
        """Sets the extradata of this AccessControlMergedTypeAccess.


        :param extradata: The extradata of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """

        self._extradata = extradata

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


        :return: The effective_permission of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._effective_permission

    @effective_permission.setter
    def effective_permission(self, effective_permission):
        """Sets the effective_permission of this AccessControlMergedTypeAccess.


        :param effective_permission: The effective_permission of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """

        self._effective_permission = effective_permission

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


        :return: The collection of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._collection

    @collection.setter
    def collection(self, collection):
        """Sets the collection of this AccessControlMergedTypeAccess.


        :param collection: The collection of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """
        if collection is not None and not re.search(r'([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})', collection):  # noqa: E501
            raise ValueError(r"Invalid value for `collection`, must be a follow pattern or equal to `/([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})/`")  # noqa: E501

        self._collection = collection

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


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

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


        :param id: The id of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """
        if id is not None and not re.search(r'([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})', id):  # noqa: E501
            raise ValueError(r"Invalid value for `id`, must be a follow pattern or equal to `/([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})/`")  # noqa: E501

        self._id = id

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


        :return: The priority of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: int
        """
        return self._priority

    @priority.setter
    def priority(self, priority):
        """Sets the priority of this AccessControlMergedTypeAccess.


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

        self._priority = priority

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


        :return: The grantor of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._grantor

    @grantor.setter
    def grantor(self, grantor):
        """Sets the grantor of this AccessControlMergedTypeAccess.


        :param grantor: The grantor of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """

        self._grantor = grantor

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


        :return: The type of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this AccessControlMergedTypeAccess.


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

        self._type = type

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


        :return: The original_disabled_grantor of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: list[str]
        """
        return self._original_disabled_grantor

    @original_disabled_grantor.setter
    def original_disabled_grantor(self, original_disabled_grantor):
        """Sets the original_disabled_grantor of this AccessControlMergedTypeAccess.


        :param original_disabled_grantor: The original_disabled_grantor of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: list[str]
        """

        self._original_disabled_grantor = original_disabled_grantor

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


        :return: The library of this AccessControlMergedTypeAccess.  # noqa: E501
        :rtype: str
        """
        return self._library

    @library.setter
    def library(self, library):
        """Sets the library of this AccessControlMergedTypeAccess.


        :param library: The library of this AccessControlMergedTypeAccess.  # noqa: E501
        :type: str
        """
        if library is not None and not re.search(r'([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})', library):  # noqa: E501
            raise ValueError(r"Invalid value for `library`, must be a follow pattern or equal to `/([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})/`")  # noqa: E501

        self._library = library

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

        for attr, _ in six.iteritems(self.openapi_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

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

        return self.__dict__ == other.__dict__

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