# 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 PerDetailsOutput(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 = {
        'id': 'str',
        'pid': 'str',
        'name': 'str',
        'menu_type': 'int',
        'menu_router': 'str',
        'regular': 'str',
        'system_id': 'str'
    }

    attribute_map = {
        'id': 'id',
        'pid': 'pid',
        'name': 'name',
        'menu_type': 'menuType',
        'menu_router': 'menuRouter',
        'regular': 'regular',
        'system_id': 'systemId'
    }

    def __init__(self, id=None, pid=None, name=None, menu_type=None, menu_router=None, regular=None, system_id=None, local_vars_configuration=None):  # noqa: E501
        """PerDetailsOutput - 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._id = None
        self._pid = None
        self._name = None
        self._menu_type = None
        self._menu_router = None
        self._regular = None
        self._system_id = None
        self.discriminator = None

        if id is not None:
            self.id = id
        self.pid = pid
        self.name = name
        if menu_type is not None:
            self.menu_type = menu_type
        self.menu_router = menu_router
        self.regular = regular
        if system_id is not None:
            self.system_id = system_id

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

        权限ID permission id  # noqa: E501

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

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

        权限ID permission id  # noqa: E501

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

        self._id = id

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

        父级Id parent id  # noqa: E501

        :return: The pid of this PerDetailsOutput.  # noqa: E501
        :rtype: str
        """
        return self._pid

    @pid.setter
    def pid(self, pid):
        """Sets the pid of this PerDetailsOutput.

        父级Id parent id  # noqa: E501

        :param pid: The pid of this PerDetailsOutput.  # noqa: E501
        :type: str
        """

        self._pid = pid

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

        菜单名称 menu name  # noqa: E501

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

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

        菜单名称 menu name  # noqa: E501

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

        self._name = name

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

        0-menu(menu) 1-button(button)   # noqa: E501

        :return: The menu_type of this PerDetailsOutput.  # noqa: E501
        :rtype: int
        """
        return self._menu_type

    @menu_type.setter
    def menu_type(self, menu_type):
        """Sets the menu_type of this PerDetailsOutput.

        0-menu(menu) 1-button(button)   # noqa: E501

        :param menu_type: The menu_type of this PerDetailsOutput.  # noqa: E501
        :type: int
        """
        allowed_values = [0, 1]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and menu_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `menu_type` ({0}), must be one of {1}"  # noqa: E501
                .format(menu_type, allowed_values)
            )

        self._menu_type = menu_type

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

        菜单路由,前端的路由走向 menu router  # noqa: E501

        :return: The menu_router of this PerDetailsOutput.  # noqa: E501
        :rtype: str
        """
        return self._menu_router

    @menu_router.setter
    def menu_router(self, menu_router):
        """Sets the menu_router of this PerDetailsOutput.

        菜单路由,前端的路由走向 menu router  # noqa: E501

        :param menu_router: The menu_router of this PerDetailsOutput.  # noqa: E501
        :type: str
        """

        self._menu_router = menu_router

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

        权限规则-正则 permission regular  # noqa: E501

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

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

        权限规则-正则 permission regular  # noqa: E501

        :param regular: The regular of this PerDetailsOutput.  # noqa: E501
        :type: str
        """

        self._regular = regular

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

        所属系统Id system id  # noqa: E501

        :return: The system_id of this PerDetailsOutput.  # noqa: E501
        :rtype: str
        """
        return self._system_id

    @system_id.setter
    def system_id(self, system_id):
        """Sets the system_id of this PerDetailsOutput.

        所属系统Id system id  # noqa: E501

        :param system_id: The system_id of this PerDetailsOutput.  # noqa: E501
        :type: str
        """

        self._system_id = system_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, PerDetailsOutput):
            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, PerDetailsOutput):
            return True

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