# 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 ConfigItem(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 = {
        'config_code': 'int',
        'config_name': 'str',
        'config_desc': 'str',
        'selected': 'bool'
    }

    attribute_map = {
        'config_code': 'configCode',
        'config_name': 'configName',
        'config_desc': 'configDesc',
        'selected': 'selected'
    }

    def __init__(self, config_code=None, config_name=None, config_desc=None, selected=None, local_vars_configuration=None):  # noqa: E501
        """ConfigItem - 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._config_code = None
        self._config_name = None
        self._config_desc = None
        self._selected = None
        self.discriminator = None

        if config_code is not None:
            self.config_code = config_code
        self.config_name = config_name
        self.config_desc = config_desc
        if selected is not None:
            self.selected = selected

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

        配置项代码 config code  # noqa: E501

        :return: The config_code of this ConfigItem.  # noqa: E501
        :rtype: int
        """
        return self._config_code

    @config_code.setter
    def config_code(self, config_code):
        """Sets the config_code of this ConfigItem.

        配置项代码 config code  # noqa: E501

        :param config_code: The config_code of this ConfigItem.  # noqa: E501
        :type: int
        """

        self._config_code = config_code

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

        配置项名称 config name  # noqa: E501

        :return: The config_name of this ConfigItem.  # noqa: E501
        :rtype: str
        """
        return self._config_name

    @config_name.setter
    def config_name(self, config_name):
        """Sets the config_name of this ConfigItem.

        配置项名称 config name  # noqa: E501

        :param config_name: The config_name of this ConfigItem.  # noqa: E501
        :type: str
        """

        self._config_name = config_name

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

        配置项描述 config description  # noqa: E501

        :return: The config_desc of this ConfigItem.  # noqa: E501
        :rtype: str
        """
        return self._config_desc

    @config_desc.setter
    def config_desc(self, config_desc):
        """Sets the config_desc of this ConfigItem.

        配置项描述 config description  # noqa: E501

        :param config_desc: The config_desc of this ConfigItem.  # noqa: E501
        :type: str
        """

        self._config_desc = config_desc

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

        是否被选中 if selected  # noqa: E501

        :return: The selected of this ConfigItem.  # noqa: E501
        :rtype: bool
        """
        return self._selected

    @selected.setter
    def selected(self, selected):
        """Sets the selected of this ConfigItem.

        是否被选中 if selected  # noqa: E501

        :param selected: The selected of this ConfigItem.  # noqa: E501
        :type: bool
        """

        self._selected = selected

    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, ConfigItem):
            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, ConfigItem):
            return True

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