# coding: utf-8

"""
    Component Database API

    The API that provides access to Component Database data.  # noqa: E501

    The version of the OpenAPI document: 3.15.4
    Contact: djarosz@anl.gov
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from cdbApi.configuration import Configuration


class ListTbl(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': 'int',
        'name': 'str',
        'description': 'str',
        'item_element_list': 'list[ItemElement]',
        'user_info_list': 'list[UserInfo]',
        'user_group_list': 'list[UserGroup]',
        'entity_info': 'EntityInfo'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'description': 'description',
        'item_element_list': 'itemElementList',
        'user_info_list': 'userInfoList',
        'user_group_list': 'userGroupList',
        'entity_info': 'entityInfo'
    }

    def __init__(self, id=None, name=None, description=None, item_element_list=None, user_info_list=None, user_group_list=None, entity_info=None, local_vars_configuration=None):  # noqa: E501
        """ListTbl - 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._name = None
        self._description = None
        self._item_element_list = None
        self._user_info_list = None
        self._user_group_list = None
        self._entity_info = None
        self.discriminator = None

        if id is not None:
            self.id = id
        self.name = name
        if description is not None:
            self.description = description
        if item_element_list is not None:
            self.item_element_list = item_element_list
        if user_info_list is not None:
            self.user_info_list = user_info_list
        if user_group_list is not None:
            self.user_group_list = user_group_list
        if entity_info is not None:
            self.entity_info = entity_info

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


        :return: The id of this ListTbl.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this ListTbl.  # noqa: E501
        :type: int
        """

        self._id = id

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


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

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


        :param name: The name of this ListTbl.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                name is not None and len(name) > 64):
            raise ValueError("Invalid value for `name`, length must be less than or equal to `64`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                name is not None and len(name) < 1):
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

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


        :return: The description of this ListTbl.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ListTbl.


        :param description: The description of this ListTbl.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                description is not None and len(description) > 256):
            raise ValueError("Invalid value for `description`, length must be less than or equal to `256`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                description is not None and len(description) < 0):
            raise ValueError("Invalid value for `description`, length must be greater than or equal to `0`")  # noqa: E501

        self._description = description

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


        :return: The item_element_list of this ListTbl.  # noqa: E501
        :rtype: list[ItemElement]
        """
        return self._item_element_list

    @item_element_list.setter
    def item_element_list(self, item_element_list):
        """Sets the item_element_list of this ListTbl.


        :param item_element_list: The item_element_list of this ListTbl.  # noqa: E501
        :type: list[ItemElement]
        """

        self._item_element_list = item_element_list

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


        :return: The user_info_list of this ListTbl.  # noqa: E501
        :rtype: list[UserInfo]
        """
        return self._user_info_list

    @user_info_list.setter
    def user_info_list(self, user_info_list):
        """Sets the user_info_list of this ListTbl.


        :param user_info_list: The user_info_list of this ListTbl.  # noqa: E501
        :type: list[UserInfo]
        """

        self._user_info_list = user_info_list

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


        :return: The user_group_list of this ListTbl.  # noqa: E501
        :rtype: list[UserGroup]
        """
        return self._user_group_list

    @user_group_list.setter
    def user_group_list(self, user_group_list):
        """Sets the user_group_list of this ListTbl.


        :param user_group_list: The user_group_list of this ListTbl.  # noqa: E501
        :type: list[UserGroup]
        """

        self._user_group_list = user_group_list

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


        :return: The entity_info of this ListTbl.  # noqa: E501
        :rtype: EntityInfo
        """
        return self._entity_info

    @entity_info.setter
    def entity_info(self, entity_info):
        """Sets the entity_info of this ListTbl.


        :param entity_info: The entity_info of this ListTbl.  # noqa: E501
        :type: EntityInfo
        """

        self._entity_info = entity_info

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

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