# 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 LocationHistoryObject(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 = {
        'location_details': 'str',
        'location_item': 'Item',
        'location_single_node_hierarchy': 'ItemHierarchy',
        'entered_on_date_time': 'datetime',
        'entered_by_user': 'UserInfo'
    }

    attribute_map = {
        'location_details': 'locationDetails',
        'location_item': 'locationItem',
        'location_single_node_hierarchy': 'locationSingleNodeHierarchy',
        'entered_on_date_time': 'enteredOnDateTime',
        'entered_by_user': 'enteredByUser'
    }

    def __init__(self, location_details=None, location_item=None, location_single_node_hierarchy=None, entered_on_date_time=None, entered_by_user=None, local_vars_configuration=None):  # noqa: E501
        """LocationHistoryObject - 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._location_details = None
        self._location_item = None
        self._location_single_node_hierarchy = None
        self._entered_on_date_time = None
        self._entered_by_user = None
        self.discriminator = None

        if location_details is not None:
            self.location_details = location_details
        if location_item is not None:
            self.location_item = location_item
        if location_single_node_hierarchy is not None:
            self.location_single_node_hierarchy = location_single_node_hierarchy
        if entered_on_date_time is not None:
            self.entered_on_date_time = entered_on_date_time
        if entered_by_user is not None:
            self.entered_by_user = entered_by_user

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


        :return: The location_details of this LocationHistoryObject.  # noqa: E501
        :rtype: str
        """
        return self._location_details

    @location_details.setter
    def location_details(self, location_details):
        """Sets the location_details of this LocationHistoryObject.


        :param location_details: The location_details of this LocationHistoryObject.  # noqa: E501
        :type: str
        """

        self._location_details = location_details

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


        :return: The location_item of this LocationHistoryObject.  # noqa: E501
        :rtype: Item
        """
        return self._location_item

    @location_item.setter
    def location_item(self, location_item):
        """Sets the location_item of this LocationHistoryObject.


        :param location_item: The location_item of this LocationHistoryObject.  # noqa: E501
        :type: Item
        """

        self._location_item = location_item

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


        :return: The location_single_node_hierarchy of this LocationHistoryObject.  # noqa: E501
        :rtype: ItemHierarchy
        """
        return self._location_single_node_hierarchy

    @location_single_node_hierarchy.setter
    def location_single_node_hierarchy(self, location_single_node_hierarchy):
        """Sets the location_single_node_hierarchy of this LocationHistoryObject.


        :param location_single_node_hierarchy: The location_single_node_hierarchy of this LocationHistoryObject.  # noqa: E501
        :type: ItemHierarchy
        """

        self._location_single_node_hierarchy = location_single_node_hierarchy

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


        :return: The entered_on_date_time of this LocationHistoryObject.  # noqa: E501
        :rtype: datetime
        """
        return self._entered_on_date_time

    @entered_on_date_time.setter
    def entered_on_date_time(self, entered_on_date_time):
        """Sets the entered_on_date_time of this LocationHistoryObject.


        :param entered_on_date_time: The entered_on_date_time of this LocationHistoryObject.  # noqa: E501
        :type: datetime
        """

        self._entered_on_date_time = entered_on_date_time

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


        :return: The entered_by_user of this LocationHistoryObject.  # noqa: E501
        :rtype: UserInfo
        """
        return self._entered_by_user

    @entered_by_user.setter
    def entered_by_user(self, entered_by_user):
        """Sets the entered_by_user of this LocationHistoryObject.


        :param entered_by_user: The entered_by_user of this LocationHistoryObject.  # noqa: E501
        :type: UserInfo
        """

        self._entered_by_user = entered_by_user

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

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