# coding: utf-8

"""
    STACKL

    stackl  # noqa: E501

    The version of the OpenAPI document: 0.2.5.dev0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from stackl_client.configuration import Configuration


class Invocation(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 = {
        'description': 'str',
        'tool': 'str',
        'image': 'str',
        'before_command': 'str',
        'playbook_path': 'str',
        'serial': 'int'
    }

    attribute_map = {
        'description': 'description',
        'tool': 'tool',
        'image': 'image',
        'before_command': 'before_command',
        'playbook_path': 'playbook_path',
        'serial': 'serial'
    }

    def __init__(self, description=None, tool=None, image=None, before_command=None, playbook_path=None, serial=None, local_vars_configuration=None):  # noqa: E501
        """Invocation - 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._description = None
        self._tool = None
        self._image = None
        self._before_command = None
        self._playbook_path = None
        self._serial = None
        self.discriminator = None

        if description is not None:
            self.description = description
        self.tool = tool
        self.image = image
        if before_command is not None:
            self.before_command = before_command
        if playbook_path is not None:
            self.playbook_path = playbook_path
        if serial is not None:
            self.serial = serial

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


        :return: The description of this Invocation.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Invocation.


        :param description: The description of this Invocation.  # noqa: E501
        :type description: str
        """

        self._description = description

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


        :return: The tool of this Invocation.  # noqa: E501
        :rtype: str
        """
        return self._tool

    @tool.setter
    def tool(self, tool):
        """Sets the tool of this Invocation.


        :param tool: The tool of this Invocation.  # noqa: E501
        :type tool: str
        """
        if self.local_vars_configuration.client_side_validation and tool is None:  # noqa: E501
            raise ValueError("Invalid value for `tool`, must not be `None`")  # noqa: E501

        self._tool = tool

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


        :return: The image of this Invocation.  # noqa: E501
        :rtype: str
        """
        return self._image

    @image.setter
    def image(self, image):
        """Sets the image of this Invocation.


        :param image: The image of this Invocation.  # noqa: E501
        :type image: str
        """
        if self.local_vars_configuration.client_side_validation and image is None:  # noqa: E501
            raise ValueError("Invalid value for `image`, must not be `None`")  # noqa: E501

        self._image = image

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


        :return: The before_command of this Invocation.  # noqa: E501
        :rtype: str
        """
        return self._before_command

    @before_command.setter
    def before_command(self, before_command):
        """Sets the before_command of this Invocation.


        :param before_command: The before_command of this Invocation.  # noqa: E501
        :type before_command: str
        """

        self._before_command = before_command

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


        :return: The playbook_path of this Invocation.  # noqa: E501
        :rtype: str
        """
        return self._playbook_path

    @playbook_path.setter
    def playbook_path(self, playbook_path):
        """Sets the playbook_path of this Invocation.


        :param playbook_path: The playbook_path of this Invocation.  # noqa: E501
        :type playbook_path: str
        """

        self._playbook_path = playbook_path

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


        :return: The serial of this Invocation.  # noqa: E501
        :rtype: int
        """
        return self._serial

    @serial.setter
    def serial(self, serial):
        """Sets the serial of this Invocation.


        :param serial: The serial of this Invocation.  # noqa: E501
        :type serial: int
        """

        self._serial = serial

    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] = {item[0]: (item[1].to_dict() if hasattr(item[1], "to_dict") else (
                    [x.to_dict() if hasattr(x, "to_dict") else x for x in item[1]]
                    if isinstance(item[1], list)
                else item[1]) )
                for item in 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, Invocation):
            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, Invocation):
            return True

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