# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ApiCommandStepProcess(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 = {
        'name': 'str',
        'id': 'int',
        'program': 'str',
        'args': 'str',
        'stdout': 'str',
        'stderr': 'str',
        'exit_code': 'int'
    }

    attribute_map = {
        'name': 'name',
        'id': 'id',
        'program': 'program',
        'args': 'args',
        'stdout': 'stdout',
        'stderr': 'stderr',
        'exit_code': 'exitCode'
    }

    def __init__(self, name=None, id=None, program=None, args=None, stdout=None, stderr=None, exit_code=None):  # noqa: E501
        """ApiCommandStepProcess - a model defined in Swagger"""  # noqa: E501
        self._name = None
        self._id = None
        self._program = None
        self._args = None
        self._stdout = None
        self._stderr = None
        self._exit_code = None
        self.discriminator = None
        if name is not None:
            self.name = name
        if id is not None:
            self.id = id
        if program is not None:
            self.program = program
        if args is not None:
            self.args = args
        if stdout is not None:
            self.stdout = stdout
        if stderr is not None:
            self.stderr = stderr
        if exit_code is not None:
            self.exit_code = exit_code

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

        Name of the command step process.  # noqa: E501

        :return: The name of this ApiCommandStepProcess.  # noqa: E501
        :rtype: str
        """
        return self._name

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

        Name of the command step process.  # noqa: E501

        :param name: The name of this ApiCommandStepProcess.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Id of the command step process.  # noqa: E501

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

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

        Id of the command step process.  # noqa: E501

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

        self._id = id

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

        The executed program command.  # noqa: E501

        :return: The program of this ApiCommandStepProcess.  # noqa: E501
        :rtype: str
        """
        return self._program

    @program.setter
    def program(self, program):
        """Sets the program of this ApiCommandStepProcess.

        The executed program command.  # noqa: E501

        :param program: The program of this ApiCommandStepProcess.  # noqa: E501
        :type: str
        """

        self._program = program

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

        JSON-encoded list of program arguments.  # noqa: E501

        :return: The args of this ApiCommandStepProcess.  # noqa: E501
        :rtype: str
        """
        return self._args

    @args.setter
    def args(self, args):
        """Sets the args of this ApiCommandStepProcess.

        JSON-encoded list of program arguments.  # noqa: E501

        :param args: The args of this ApiCommandStepProcess.  # noqa: E501
        :type: str
        """

        self._args = args

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

        Last lines of the executed program's standard output.  # noqa: E501

        :return: The stdout of this ApiCommandStepProcess.  # noqa: E501
        :rtype: str
        """
        return self._stdout

    @stdout.setter
    def stdout(self, stdout):
        """Sets the stdout of this ApiCommandStepProcess.

        Last lines of the executed program's standard output.  # noqa: E501

        :param stdout: The stdout of this ApiCommandStepProcess.  # noqa: E501
        :type: str
        """

        self._stdout = stdout

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

        Last lines of the executed program's standard error.  # noqa: E501

        :return: The stderr of this ApiCommandStepProcess.  # noqa: E501
        :rtype: str
        """
        return self._stderr

    @stderr.setter
    def stderr(self, stderr):
        """Sets the stderr of this ApiCommandStepProcess.

        Last lines of the executed program's standard error.  # noqa: E501

        :param stderr: The stderr of this ApiCommandStepProcess.  # noqa: E501
        :type: str
        """

        self._stderr = stderr

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

        The executed program's exit code.  # noqa: E501

        :return: The exit_code of this ApiCommandStepProcess.  # noqa: E501
        :rtype: int
        """
        return self._exit_code

    @exit_code.setter
    def exit_code(self, exit_code):
        """Sets the exit_code of this ApiCommandStepProcess.

        The executed program's exit code.  # noqa: E501

        :param exit_code: The exit_code of this ApiCommandStepProcess.  # noqa: E501
        :type: int
        """

        self._exit_code = exit_code

    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
        if issubclass(ApiCommandStepProcess, dict):
            for key, value in self.items():
                result[key] = 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, ApiCommandStepProcess):
            return False

        return self.__dict__ == other.__dict__

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