# coding: utf-8

"""
    3blades API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

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


from pprint import pformat
from six import iteritems
import re


class Action(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 = {
        'id': 'str',
        'resource_uri': 'str',
        'payload': 'object',
        'action': 'str',
        'method': 'str',
        'user': 'str',
        'user_agent': 'str',
        'start_date': 'str',
        'end_date': 'str',
        'state': 'str',
        'ip': 'str',
        'object': 'str',
        'is_user_action': 'bool',
        'can_be_cancelled': 'bool',
        'can_be_retried': 'bool',
        'path': 'str',
        'action_name': 'str'
    }

    attribute_map = {
        'id': 'id',
        'resource_uri': 'resource_uri',
        'payload': 'payload',
        'action': 'action',
        'method': 'method',
        'user': 'user',
        'user_agent': 'user_agent',
        'start_date': 'start_date',
        'end_date': 'end_date',
        'state': 'state',
        'ip': 'ip',
        'object': 'object',
        'is_user_action': 'is_user_action',
        'can_be_cancelled': 'can_be_cancelled',
        'can_be_retried': 'can_be_retried',
        'path': 'path',
        'action_name': 'action_name'
    }

    def __init__(self, id=None, resource_uri=None, payload=None, action=None, method=None, user=None, user_agent=None, start_date=None, end_date=None, state=None, ip=None, object=None, is_user_action=None, can_be_cancelled=None, can_be_retried=None, path=None, action_name=None):
        """
        Action - a model defined in Swagger
        """

        self._id = None
        self._resource_uri = None
        self._payload = None
        self._action = None
        self._method = None
        self._user = None
        self._user_agent = None
        self._start_date = None
        self._end_date = None
        self._state = None
        self._ip = None
        self._object = None
        self._is_user_action = None
        self._can_be_cancelled = None
        self._can_be_retried = None
        self._path = None
        self._action_name = None

        if id is not None:
          self.id = id
        if resource_uri is not None:
          self.resource_uri = resource_uri
        if payload is not None:
          self.payload = payload
        self.action = action
        self.method = method
        if user is not None:
          self.user = user
        self.user_agent = user_agent
        if start_date is not None:
          self.start_date = start_date
        if end_date is not None:
          self.end_date = end_date
        self.state = state
        if ip is not None:
          self.ip = ip
        if object is not None:
          self.object = object
        if is_user_action is not None:
          self.is_user_action = is_user_action
        if can_be_cancelled is not None:
          self.can_be_cancelled = can_be_cancelled
        if can_be_retried is not None:
          self.can_be_retried = can_be_retried
        if path is not None:
          self.path = path
        if action_name is not None:
          self.action_name = action_name

    @property
    def id(self):
        """
        Gets the id of this Action.
        Action unique identifier, expressed as UUID.

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

    @id.setter
    def id(self, id):
        """
        Sets the id of this Action.
        Action unique identifier, expressed as UUID.

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

        self._id = id

    @property
    def resource_uri(self):
        """
        Gets the resource_uri of this Action.
        Resource URI.

        :return: The resource_uri of this Action.
        :rtype: str
        """
        return self._resource_uri

    @resource_uri.setter
    def resource_uri(self, resource_uri):
        """
        Sets the resource_uri of this Action.
        Resource URI.

        :param resource_uri: The resource_uri of this Action.
        :type: str
        """

        self._resource_uri = resource_uri

    @property
    def payload(self):
        """
        Gets the payload of this Action.
        Object action payload.

        :return: The payload of this Action.
        :rtype: object
        """
        return self._payload

    @payload.setter
    def payload(self, payload):
        """
        Sets the payload of this Action.
        Object action payload.

        :param payload: The payload of this Action.
        :type: object
        """

        self._payload = payload

    @property
    def action(self):
        """
        Gets the action of this Action.
        Action name.

        :return: The action of this Action.
        :rtype: str
        """
        return self._action

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

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

        self._action = action

    @property
    def method(self):
        """
        Gets the method of this Action.
        Action method.

        :return: The method of this Action.
        :rtype: str
        """
        return self._method

    @method.setter
    def method(self, method):
        """
        Sets the method of this Action.
        Action method.

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

        self._method = method

    @property
    def user(self):
        """
        Gets the user of this Action.
        User that action is assigned to.

        :return: The user of this Action.
        :rtype: str
        """
        return self._user

    @user.setter
    def user(self, user):
        """
        Sets the user of this Action.
        User that action is assigned to.

        :param user: The user of this Action.
        :type: str
        """

        self._user = user

    @property
    def user_agent(self):
        """
        Gets the user_agent of this Action.
        User agent that action is related to.

        :return: The user_agent of this Action.
        :rtype: str
        """
        return self._user_agent

    @user_agent.setter
    def user_agent(self, user_agent):
        """
        Sets the user_agent of this Action.
        User agent that action is related to.

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

        self._user_agent = user_agent

    @property
    def start_date(self):
        """
        Gets the start_date of this Action.
        Action date and time start.

        :return: The start_date of this Action.
        :rtype: str
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """
        Sets the start_date of this Action.
        Action date and time start.

        :param start_date: The start_date of this Action.
        :type: str
        """

        self._start_date = start_date

    @property
    def end_date(self):
        """
        Gets the end_date of this Action.
        Action needs to end before a certain date and time.

        :return: The end_date of this Action.
        :rtype: str
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """
        Sets the end_date of this Action.
        Action needs to end before a certain date and time.

        :param end_date: The end_date of this Action.
        :type: str
        """

        self._end_date = end_date

    @property
    def state(self):
        """
        Gets the state of this Action.
        Action state.

        :return: The state of this Action.
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """
        Sets the state of this Action.
        Action state.

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

        self._state = state

    @property
    def ip(self):
        """
        Gets the ip of this Action.
        IP address that action is related to.

        :return: The ip of this Action.
        :rtype: str
        """
        return self._ip

    @ip.setter
    def ip(self, ip):
        """
        Sets the ip of this Action.
        IP address that action is related to.

        :param ip: The ip of this Action.
        :type: str
        """

        self._ip = ip

    @property
    def object(self):
        """
        Gets the object of this Action.
        Action object.

        :return: The object of this Action.
        :rtype: str
        """
        return self._object

    @object.setter
    def object(self, object):
        """
        Sets the object of this Action.
        Action object.

        :param object: The object of this Action.
        :type: str
        """

        self._object = object

    @property
    def is_user_action(self):
        """
        Gets the is_user_action of this Action.
        Is the action related to a user, or not.

        :return: The is_user_action of this Action.
        :rtype: bool
        """
        return self._is_user_action

    @is_user_action.setter
    def is_user_action(self, is_user_action):
        """
        Sets the is_user_action of this Action.
        Is the action related to a user, or not.

        :param is_user_action: The is_user_action of this Action.
        :type: bool
        """

        self._is_user_action = is_user_action

    @property
    def can_be_cancelled(self):
        """
        Gets the can_be_cancelled of this Action.
        Can action be cancelled, or not.

        :return: The can_be_cancelled of this Action.
        :rtype: bool
        """
        return self._can_be_cancelled

    @can_be_cancelled.setter
    def can_be_cancelled(self, can_be_cancelled):
        """
        Sets the can_be_cancelled of this Action.
        Can action be cancelled, or not.

        :param can_be_cancelled: The can_be_cancelled of this Action.
        :type: bool
        """

        self._can_be_cancelled = can_be_cancelled

    @property
    def can_be_retried(self):
        """
        Gets the can_be_retried of this Action.
        May action be retried, or not.

        :return: The can_be_retried of this Action.
        :rtype: bool
        """
        return self._can_be_retried

    @can_be_retried.setter
    def can_be_retried(self, can_be_retried):
        """
        Sets the can_be_retried of this Action.
        May action be retried, or not.

        :param can_be_retried: The can_be_retried of this Action.
        :type: bool
        """

        self._can_be_retried = can_be_retried

    @property
    def path(self):
        """
        Gets the path of this Action.
        Action path.

        :return: The path of this Action.
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """
        Sets the path of this Action.
        Action path.

        :param path: The path of this Action.
        :type: str
        """

        self._path = path

    @property
    def action_name(self):
        """
        Gets the action_name of this Action.
        Action name.

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

    @action_name.setter
    def action_name(self, action_name):
        """
        Sets the action_name of this Action.
        Action name.

        :param action_name: The action_name of this Action.
        :type: str
        """

        self._action_name = action_name

    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, Action):
            return False

        return self.__dict__ == other.__dict__

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