# coding: utf-8

"""
    identity-service

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

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from dhicn_identity_service.configuration import Configuration


class UpdateRolePermissionsInput(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 = {
        'tenant_id': 'str',
        'roles': 'list[str]',
        'regular': 'str',
        'is_carry_auth': 'bool',
        'service_key': 'str',
        'priority': 'int',
        'id': 'str'
    }

    attribute_map = {
        'tenant_id': 'tenantId',
        'roles': 'roles',
        'regular': 'regular',
        'is_carry_auth': 'isCarryAuth',
        'service_key': 'serviceKey',
        'priority': 'priority',
        'id': 'id'
    }

    def __init__(self, tenant_id=None, roles=None, regular=None, is_carry_auth=None, service_key=None, priority=None, id=None, local_vars_configuration=None):  # noqa: E501
        """UpdateRolePermissionsInput - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._tenant_id = None
        self._roles = None
        self._regular = None
        self._is_carry_auth = None
        self._service_key = None
        self._priority = None
        self._id = None
        self.discriminator = None

        self.tenant_id = tenant_id
        self.roles = roles
        self.regular = regular
        self.is_carry_auth = is_carry_auth
        self.service_key = service_key
        if priority is not None:
            self.priority = priority
        if id is not None:
            self.id = id

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

        租户Id tenant id  # noqa: E501

        :return: The tenant_id of this UpdateRolePermissionsInput.  # noqa: E501
        :rtype: str
        """
        return self._tenant_id

    @tenant_id.setter
    def tenant_id(self, tenant_id):
        """Sets the tenant_id of this UpdateRolePermissionsInput.

        租户Id tenant id  # noqa: E501

        :param tenant_id: The tenant_id of this UpdateRolePermissionsInput.  # noqa: E501
        :type: str
        """

        self._tenant_id = tenant_id

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

        角色:admin,oper roles  # noqa: E501

        :return: The roles of this UpdateRolePermissionsInput.  # noqa: E501
        :rtype: list[str]
        """
        return self._roles

    @roles.setter
    def roles(self, roles):
        """Sets the roles of this UpdateRolePermissionsInput.

        角色:admin,oper roles  # noqa: E501

        :param roles: The roles of this UpdateRolePermissionsInput.  # noqa: E501
        :type: list[str]
        """

        self._roles = roles

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

        角色下的权限规则 role permission regular  # noqa: E501

        :return: The regular of this UpdateRolePermissionsInput.  # noqa: E501
        :rtype: str
        """
        return self._regular

    @regular.setter
    def regular(self, regular):
        """Sets the regular of this UpdateRolePermissionsInput.

        角色下的权限规则 role permission regular  # noqa: E501

        :param regular: The regular of this UpdateRolePermissionsInput.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and regular is None:  # noqa: E501
            raise ValueError("Invalid value for `regular`, must not be `None`")  # noqa: E501

        self._regular = regular

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

        是否携带Auth if carry authentication  # noqa: E501

        :return: The is_carry_auth of this UpdateRolePermissionsInput.  # noqa: E501
        :rtype: bool
        """
        return self._is_carry_auth

    @is_carry_auth.setter
    def is_carry_auth(self, is_carry_auth):
        """Sets the is_carry_auth of this UpdateRolePermissionsInput.

        是否携带Auth if carry authentication  # noqa: E501

        :param is_carry_auth: The is_carry_auth of this UpdateRolePermissionsInput.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and is_carry_auth is None:  # noqa: E501
            raise ValueError("Invalid value for `is_carry_auth`, must not be `None`")  # noqa: E501

        self._is_carry_auth = is_carry_auth

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

        微服务标识 micro service key  # noqa: E501

        :return: The service_key of this UpdateRolePermissionsInput.  # noqa: E501
        :rtype: str
        """
        return self._service_key

    @service_key.setter
    def service_key(self, service_key):
        """Sets the service_key of this UpdateRolePermissionsInput.

        微服务标识 micro service key  # noqa: E501

        :param service_key: The service_key of this UpdateRolePermissionsInput.  # noqa: E501
        :type: str
        """

        self._service_key = service_key

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

        优先级 priority  # noqa: E501

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

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

        优先级 priority  # noqa: E501

        :param priority: The priority of this UpdateRolePermissionsInput.  # noqa: E501
        :type: int
        """

        self._priority = priority

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

        角色权限ID role permission id  # noqa: E501

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

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

        角色权限ID role permission id  # noqa: E501

        :param id: The id of this UpdateRolePermissionsInput.  # noqa: E501
        :type: str
        """

        self._id = id

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
