# 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.user_nestview import UserNestview  # noqa: F401,E501


class ActionLog(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 = {
        'action': 'str',
        'client_ip': 'str',
        'create': 'datetime',
        'finish': 'datetime',
        'id': 'int',
        'message': 'str',
        'new_data': 'str',
        'old_data': 'str',
        'resource_id': 'int',
        'resource_type': 'str',
        'start': 'datetime',
        'status': 'str',
        'user': 'UserNestview'
    }

    attribute_map = {
        'action': 'action',
        'client_ip': 'client_ip',
        'create': 'create',
        'finish': 'finish',
        'id': 'id',
        'message': 'message',
        'new_data': 'new_data',
        'old_data': 'old_data',
        'resource_id': 'resource_id',
        'resource_type': 'resource_type',
        'start': 'start',
        'status': 'status',
        'user': 'user'
    }

    def __init__(self, action=None, client_ip=None, create=None, finish=None, id=None, message=None, new_data=None, old_data=None, resource_id=None, resource_type=None, start=None, status=None, user=None):  # noqa: E501
        """ActionLog - a model defined in Swagger"""  # noqa: E501

        self._action = None
        self._client_ip = None
        self._create = None
        self._finish = None
        self._id = None
        self._message = None
        self._new_data = None
        self._old_data = None
        self._resource_id = None
        self._resource_type = None
        self._start = None
        self._status = None
        self._user = None
        self.discriminator = None

        if action is not None:
            self.action = action
        if client_ip is not None:
            self.client_ip = client_ip
        if create is not None:
            self.create = create
        if finish is not None:
            self.finish = finish
        if id is not None:
            self.id = id
        if message is not None:
            self.message = message
        if new_data is not None:
            self.new_data = new_data
        if old_data is not None:
            self.old_data = old_data
        if resource_id is not None:
            self.resource_id = resource_id
        if resource_type is not None:
            self.resource_type = resource_type
        if start is not None:
            self.start = start
        if status is not None:
            self.status = status
        if user is not None:
            self.user = user

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


        :return: The action of this ActionLog.  # noqa: E501
        :rtype: str
        """
        return self._action

    @action.setter
    def action(self, action):
        """Sets the action of this ActionLog.


        :param action: The action of this ActionLog.  # noqa: E501
        :type: str
        """

        self._action = action

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


        :return: The client_ip of this ActionLog.  # noqa: E501
        :rtype: str
        """
        return self._client_ip

    @client_ip.setter
    def client_ip(self, client_ip):
        """Sets the client_ip of this ActionLog.


        :param client_ip: The client_ip of this ActionLog.  # noqa: E501
        :type: str
        """

        self._client_ip = client_ip

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


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

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


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

        self._create = create

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


        :return: The finish of this ActionLog.  # noqa: E501
        :rtype: datetime
        """
        return self._finish

    @finish.setter
    def finish(self, finish):
        """Sets the finish of this ActionLog.


        :param finish: The finish of this ActionLog.  # noqa: E501
        :type: datetime
        """

        self._finish = finish

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


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

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


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

        self._id = id

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


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

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


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

        self._message = message

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


        :return: The new_data of this ActionLog.  # noqa: E501
        :rtype: str
        """
        return self._new_data

    @new_data.setter
    def new_data(self, new_data):
        """Sets the new_data of this ActionLog.


        :param new_data: The new_data of this ActionLog.  # noqa: E501
        :type: str
        """

        self._new_data = new_data

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


        :return: The old_data of this ActionLog.  # noqa: E501
        :rtype: str
        """
        return self._old_data

    @old_data.setter
    def old_data(self, old_data):
        """Sets the old_data of this ActionLog.


        :param old_data: The old_data of this ActionLog.  # noqa: E501
        :type: str
        """

        self._old_data = old_data

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


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

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


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

        self._resource_id = resource_id

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


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

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


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

        self._resource_type = resource_type

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


        :return: The start of this ActionLog.  # noqa: E501
        :rtype: datetime
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this ActionLog.


        :param start: The start of this ActionLog.  # noqa: E501
        :type: datetime
        """

        self._start = start

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


        :return: The status of this ActionLog.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ActionLog.


        :param status: The status of this ActionLog.  # noqa: E501
        :type: str
        """

        self._status = status

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


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

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


        :param user: The user of this ActionLog.  # 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, ActionLog):
            return False

        return self.__dict__ == other.__dict__

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