# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

    OpenAPI spec version: 3.2.14
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401
import six

# from xms_client.models.host_nestview import HostNestview  # noqa: F401,E501
# from xms_client.models.user_nestview import UserNestview  # noqa: F401,E501


class EventLog(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'create': 'datetime',
        'data': 'str',
        'event': 'str',
        'host': 'HostNestview',
        'id': 'int',
        'message': 'str',
        'resource_id': 'int',
        'resource_type': 'str',
        'user': 'UserNestview'
    }

    attribute_map = {
        'create': 'create',
        'data': 'data',
        'event': 'event',
        'host': 'host',
        'id': 'id',
        'message': 'message',
        'resource_id': 'resource_id',
        'resource_type': 'resource_type',
        'user': 'user'
    }

    def __init__(self, create=None, data=None, event=None, host=None, id=None, message=None, resource_id=None, resource_type=None, user=None):  # noqa: E501
        """EventLog - a model defined in Swagger"""  # noqa: E501

        self._create = None
        self._data = None
        self._event = None
        self._host = None
        self._id = None
        self._message = None
        self._resource_id = None
        self._resource_type = None
        self._user = None
        self.discriminator = None

        if create is not None:
            self.create = create
        if data is not None:
            self.data = data
        if event is not None:
            self.event = event
        if host is not None:
            self.host = host
        if id is not None:
            self.id = id
        if message is not None:
            self.message = message
        if resource_id is not None:
            self.resource_id = resource_id
        if resource_type is not None:
            self.resource_type = resource_type
        if user is not None:
            self.user = user

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

        create time  # noqa: E501

        :return: The create of this EventLog.  # noqa: E501
        :rtype: datetime
        """
        return self._create

    @create.setter
    def create(self, create):
        """Sets the create of this EventLog.

        create time  # noqa: E501

        :param create: The create of this EventLog.  # noqa: E501
        :type: datetime
        """

        self._create = create

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

        dumped resource data  # noqa: E501

        :return: The data of this EventLog.  # noqa: E501
        :rtype: str
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this EventLog.

        dumped resource data  # noqa: E501

        :param data: The data of this EventLog.  # noqa: E501
        :type: str
        """

        self._data = data

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

        evnet type  # noqa: E501

        :return: The event of this EventLog.  # noqa: E501
        :rtype: str
        """
        return self._event

    @event.setter
    def event(self, event):
        """Sets the event of this EventLog.

        evnet type  # noqa: E501

        :param event: The event of this EventLog.  # noqa: E501
        :type: str
        """

        self._event = event

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

        host eventlog generated on  # noqa: E501

        :return: The host of this EventLog.  # noqa: E501
        :rtype: HostNestview
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this EventLog.

        host eventlog generated on  # noqa: E501

        :param host: The host of this EventLog.  # noqa: E501
        :type: HostNestview
        """

        self._host = host

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


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

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


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

        self._id = id

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

        debug message  # noqa: E501

        :return: The message of this EventLog.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this EventLog.

        debug message  # noqa: E501

        :param message: The message of this EventLog.  # noqa: E501
        :type: str
        """

        self._message = message

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

        resource id  # noqa: E501

        :return: The resource_id of this EventLog.  # noqa: E501
        :rtype: int
        """
        return self._resource_id

    @resource_id.setter
    def resource_id(self, resource_id):
        """Sets the resource_id of this EventLog.

        resource id  # noqa: E501

        :param resource_id: The resource_id of this EventLog.  # noqa: E501
        :type: int
        """

        self._resource_id = resource_id

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

        resource type  # noqa: E501

        :return: The resource_type of this EventLog.  # noqa: E501
        :rtype: str
        """
        return self._resource_type

    @resource_type.setter
    def resource_type(self, resource_type):
        """Sets the resource_type of this EventLog.

        resource type  # noqa: E501

        :param resource_type: The resource_type of this EventLog.  # noqa: E501
        :type: str
        """

        self._resource_type = resource_type

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

        eventlog created by  # noqa: E501

        :return: The user of this EventLog.  # noqa: E501
        :rtype: UserNestview
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this EventLog.

        eventlog created by  # noqa: E501

        :param user: The user of this EventLog.  # noqa: E501
        :type: UserNestview
        """

        self._user = user

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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, EventLog):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
