# coding: utf-8

"""
    Component Database API

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

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


import pprint
import re  # noqa: F401

import six

from cdbApi.configuration import Configuration


class EntityInfo(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',
        'is_group_writeable': 'bool',
        'created_on_date_time': 'datetime',
        'last_modified_on_date_time': 'datetime',
        'obsoleted_on_date_time': 'datetime',
        'owner_user_group_name': 'str',
        'owner_username': 'str',
        'created_by_username': 'str',
        'obsoleted_by_username': 'str',
        'last_modified_by_username': 'str'
    }

    attribute_map = {
        'id': 'id',
        'is_group_writeable': 'isGroupWriteable',
        'created_on_date_time': 'createdOnDateTime',
        'last_modified_on_date_time': 'lastModifiedOnDateTime',
        'obsoleted_on_date_time': 'obsoletedOnDateTime',
        'owner_user_group_name': 'ownerUserGroupName',
        'owner_username': 'ownerUsername',
        'created_by_username': 'createdByUsername',
        'obsoleted_by_username': 'obsoletedByUsername',
        'last_modified_by_username': 'lastModifiedByUsername'
    }

    def __init__(self, id=None, is_group_writeable=None, created_on_date_time=None, last_modified_on_date_time=None, obsoleted_on_date_time=None, owner_user_group_name=None, owner_username=None, created_by_username=None, obsoleted_by_username=None, last_modified_by_username=None, local_vars_configuration=None):  # noqa: E501
        """EntityInfo - 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._is_group_writeable = None
        self._created_on_date_time = None
        self._last_modified_on_date_time = None
        self._obsoleted_on_date_time = None
        self._owner_user_group_name = None
        self._owner_username = None
        self._created_by_username = None
        self._obsoleted_by_username = None
        self._last_modified_by_username = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if is_group_writeable is not None:
            self.is_group_writeable = is_group_writeable
        self.created_on_date_time = created_on_date_time
        self.last_modified_on_date_time = last_modified_on_date_time
        if obsoleted_on_date_time is not None:
            self.obsoleted_on_date_time = obsoleted_on_date_time
        if owner_user_group_name is not None:
            self.owner_user_group_name = owner_user_group_name
        if owner_username is not None:
            self.owner_username = owner_username
        if created_by_username is not None:
            self.created_by_username = created_by_username
        if obsoleted_by_username is not None:
            self.obsoleted_by_username = obsoleted_by_username
        if last_modified_by_username is not None:
            self.last_modified_by_username = last_modified_by_username

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


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

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


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

        self._id = id

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


        :return: The is_group_writeable of this EntityInfo.  # noqa: E501
        :rtype: bool
        """
        return self._is_group_writeable

    @is_group_writeable.setter
    def is_group_writeable(self, is_group_writeable):
        """Sets the is_group_writeable of this EntityInfo.


        :param is_group_writeable: The is_group_writeable of this EntityInfo.  # noqa: E501
        :type: bool
        """

        self._is_group_writeable = is_group_writeable

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


        :return: The created_on_date_time of this EntityInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._created_on_date_time

    @created_on_date_time.setter
    def created_on_date_time(self, created_on_date_time):
        """Sets the created_on_date_time of this EntityInfo.


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

        self._created_on_date_time = created_on_date_time

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


        :return: The last_modified_on_date_time of this EntityInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modified_on_date_time

    @last_modified_on_date_time.setter
    def last_modified_on_date_time(self, last_modified_on_date_time):
        """Sets the last_modified_on_date_time of this EntityInfo.


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

        self._last_modified_on_date_time = last_modified_on_date_time

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


        :return: The obsoleted_on_date_time of this EntityInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._obsoleted_on_date_time

    @obsoleted_on_date_time.setter
    def obsoleted_on_date_time(self, obsoleted_on_date_time):
        """Sets the obsoleted_on_date_time of this EntityInfo.


        :param obsoleted_on_date_time: The obsoleted_on_date_time of this EntityInfo.  # noqa: E501
        :type: datetime
        """

        self._obsoleted_on_date_time = obsoleted_on_date_time

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


        :return: The owner_user_group_name of this EntityInfo.  # noqa: E501
        :rtype: str
        """
        return self._owner_user_group_name

    @owner_user_group_name.setter
    def owner_user_group_name(self, owner_user_group_name):
        """Sets the owner_user_group_name of this EntityInfo.


        :param owner_user_group_name: The owner_user_group_name of this EntityInfo.  # noqa: E501
        :type: str
        """

        self._owner_user_group_name = owner_user_group_name

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


        :return: The owner_username of this EntityInfo.  # noqa: E501
        :rtype: str
        """
        return self._owner_username

    @owner_username.setter
    def owner_username(self, owner_username):
        """Sets the owner_username of this EntityInfo.


        :param owner_username: The owner_username of this EntityInfo.  # noqa: E501
        :type: str
        """

        self._owner_username = owner_username

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


        :return: The created_by_username of this EntityInfo.  # noqa: E501
        :rtype: str
        """
        return self._created_by_username

    @created_by_username.setter
    def created_by_username(self, created_by_username):
        """Sets the created_by_username of this EntityInfo.


        :param created_by_username: The created_by_username of this EntityInfo.  # noqa: E501
        :type: str
        """

        self._created_by_username = created_by_username

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


        :return: The obsoleted_by_username of this EntityInfo.  # noqa: E501
        :rtype: str
        """
        return self._obsoleted_by_username

    @obsoleted_by_username.setter
    def obsoleted_by_username(self, obsoleted_by_username):
        """Sets the obsoleted_by_username of this EntityInfo.


        :param obsoleted_by_username: The obsoleted_by_username of this EntityInfo.  # noqa: E501
        :type: str
        """

        self._obsoleted_by_username = obsoleted_by_username

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


        :return: The last_modified_by_username of this EntityInfo.  # noqa: E501
        :rtype: str
        """
        return self._last_modified_by_username

    @last_modified_by_username.setter
    def last_modified_by_username(self, last_modified_by_username):
        """Sets the last_modified_by_username of this EntityInfo.


        :param last_modified_by_username: The last_modified_by_username of this EntityInfo.  # noqa: E501
        :type: str
        """

        self._last_modified_by_username = last_modified_by_username

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

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