# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

    OpenAPI spec version: latest 
    Contact: support@knetik.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class UserActionLog(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_description': 'str',
        'action_name': 'str',
        'created_date': 'int',
        'details': 'dict(str, str)',
        'id': 'str',
        'request_id': 'str',
        'user_id': 'int'
    }

    attribute_map = {
        'action_description': 'action_description',
        'action_name': 'action_name',
        'created_date': 'created_date',
        'details': 'details',
        'id': 'id',
        'request_id': 'request_id',
        'user_id': 'user_id'
    }

    def __init__(self, action_description=None, action_name=None, created_date=None, details=None, id=None, request_id=None, user_id=None):
        """
        UserActionLog - a model defined in Swagger
        """

        self._action_description = None
        self._action_name = None
        self._created_date = None
        self._details = None
        self._id = None
        self._request_id = None
        self._user_id = None
        self.discriminator = None

        self.action_description = action_description
        self.action_name = action_name
        if created_date is not None:
          self.created_date = created_date
        if details is not None:
          self.details = details
        if id is not None:
          self.id = id
        if request_id is not None:
          self.request_id = request_id
        if user_id is not None:
          self.user_id = user_id

    @property
    def action_description(self):
        """
        Gets the action_description of this UserActionLog.
        A description of the action taken

        :return: The action_description of this UserActionLog.
        :rtype: str
        """
        return self._action_description

    @action_description.setter
    def action_description(self, action_description):
        """
        Sets the action_description of this UserActionLog.
        A description of the action taken

        :param action_description: The action_description of this UserActionLog.
        :type: str
        """
        if action_description is None:
            raise ValueError("Invalid value for `action_description`, must not be `None`")

        self._action_description = action_description

    @property
    def action_name(self):
        """
        Gets the action_name of this UserActionLog.
        The name of the action taken

        :return: The action_name of this UserActionLog.
        :rtype: str
        """
        return self._action_name

    @action_name.setter
    def action_name(self, action_name):
        """
        Sets the action_name of this UserActionLog.
        The name of the action taken

        :param action_name: The action_name of this UserActionLog.
        :type: str
        """
        if action_name is None:
            raise ValueError("Invalid value for `action_name`, must not be `None`")

        self._action_name = action_name

    @property
    def created_date(self):
        """
        Gets the created_date of this UserActionLog.
        The date of the action, unix timestamp in seconds

        :return: The created_date of this UserActionLog.
        :rtype: int
        """
        return self._created_date

    @created_date.setter
    def created_date(self, created_date):
        """
        Sets the created_date of this UserActionLog.
        The date of the action, unix timestamp in seconds

        :param created_date: The created_date of this UserActionLog.
        :type: int
        """

        self._created_date = created_date

    @property
    def details(self):
        """
        Gets the details of this UserActionLog.
        A map of additional details such as the target of the action

        :return: The details of this UserActionLog.
        :rtype: dict(str, str)
        """
        return self._details

    @details.setter
    def details(self, details):
        """
        Sets the details of this UserActionLog.
        A map of additional details such as the target of the action

        :param details: The details of this UserActionLog.
        :type: dict(str, str)
        """

        self._details = details

    @property
    def id(self):
        """
        Gets the id of this UserActionLog.
        The id of the log entry

        :return: The id of this UserActionLog.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this UserActionLog.
        The id of the log entry

        :param id: The id of this UserActionLog.
        :type: str
        """

        self._id = id

    @property
    def request_id(self):
        """
        Gets the request_id of this UserActionLog.
        The id of the api request that spawned the action, if generated internally

        :return: The request_id of this UserActionLog.
        :rtype: str
        """
        return self._request_id

    @request_id.setter
    def request_id(self, request_id):
        """
        Sets the request_id of this UserActionLog.
        The id of the api request that spawned the action, if generated internally

        :param request_id: The request_id of this UserActionLog.
        :type: str
        """

        self._request_id = request_id

    @property
    def user_id(self):
        """
        Gets the user_id of this UserActionLog.
        The id of the user that took the action, if any. Read-only if not posting with LOGS_ADMIN

        :return: The user_id of this UserActionLog.
        :rtype: int
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """
        Sets the user_id of this UserActionLog.
        The id of the user that took the action, if any. Read-only if not posting with LOGS_ADMIN

        :param user_id: The user_id of this UserActionLog.
        :type: int
        """

        self._user_id = user_id

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

        for attr, _ in 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 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, UserActionLog):
            return False

        return self.__dict__ == other.__dict__

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