github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/clients/python/bacalhau_apiclient/models/run_command_result.py (about)

     1  # coding: utf-8
     2  
     3  """
     4      Bacalhau API
     5  
     6      This page is the reference of the Bacalhau REST API. Project docs are available at https://docs.bacalhau.org/. Find more information about Bacalhau at https://github.com/filecoin-project/bacalhau.  # noqa: E501
     7  
     8      OpenAPI spec version: 0.3.22.post4
     9      Contact: team@bacalhau.org
    10      Generated by: https://github.com/swagger-api/swagger-codegen.git
    11  """
    12  
    13  
    14  import pprint
    15  import re  # noqa: F401
    16  
    17  import six
    18  
    19  from bacalhau_apiclient.configuration import Configuration
    20  
    21  
    22  class RunCommandResult(object):
    23      """NOTE: This class is auto generated by the swagger code generator program.
    24  
    25      Do not edit the class manually.
    26      """
    27  
    28      """
    29      Attributes:
    30        swagger_types (dict): The key is attribute name
    31                              and the value is attribute type.
    32        attribute_map (dict): The key is attribute name
    33                              and the value is json key in definition.
    34      """
    35      swagger_types = {
    36          'exit_code': 'int',
    37          'runner_error': 'str',
    38          'stderr': 'str',
    39          'stderrtruncated': 'bool',
    40          'stdout': 'str',
    41          'stdouttruncated': 'bool'
    42      }
    43  
    44      attribute_map = {
    45          'exit_code': 'exitCode',
    46          'runner_error': 'runnerError',
    47          'stderr': 'stderr',
    48          'stderrtruncated': 'stderrtruncated',
    49          'stdout': 'stdout',
    50          'stdouttruncated': 'stdouttruncated'
    51      }
    52  
    53      def __init__(self, exit_code=None, runner_error=None, stderr=None, stderrtruncated=None, stdout=None, stdouttruncated=None, _configuration=None):  # noqa: E501
    54          """RunCommandResult - a model defined in Swagger"""  # noqa: E501
    55          if _configuration is None:
    56              _configuration = Configuration()
    57          self._configuration = _configuration
    58  
    59          self._exit_code = None
    60          self._runner_error = None
    61          self._stderr = None
    62          self._stderrtruncated = None
    63          self._stdout = None
    64          self._stdouttruncated = None
    65          self.discriminator = None
    66  
    67          if exit_code is not None:
    68              self.exit_code = exit_code
    69          if runner_error is not None:
    70              self.runner_error = runner_error
    71          if stderr is not None:
    72              self.stderr = stderr
    73          if stderrtruncated is not None:
    74              self.stderrtruncated = stderrtruncated
    75          if stdout is not None:
    76              self.stdout = stdout
    77          if stdouttruncated is not None:
    78              self.stdouttruncated = stdouttruncated
    79  
    80      @property
    81      def exit_code(self):
    82          """Gets the exit_code of this RunCommandResult.  # noqa: E501
    83  
    84          exit code of the run.  # noqa: E501
    85  
    86          :return: The exit_code of this RunCommandResult.  # noqa: E501
    87          :rtype: int
    88          """
    89          return self._exit_code
    90  
    91      @exit_code.setter
    92      def exit_code(self, exit_code):
    93          """Sets the exit_code of this RunCommandResult.
    94  
    95          exit code of the run.  # noqa: E501
    96  
    97          :param exit_code: The exit_code of this RunCommandResult.  # noqa: E501
    98          :type: int
    99          """
   100  
   101          self._exit_code = exit_code
   102  
   103      @property
   104      def runner_error(self):
   105          """Gets the runner_error of this RunCommandResult.  # noqa: E501
   106  
   107          Runner error  # noqa: E501
   108  
   109          :return: The runner_error of this RunCommandResult.  # noqa: E501
   110          :rtype: str
   111          """
   112          return self._runner_error
   113  
   114      @runner_error.setter
   115      def runner_error(self, runner_error):
   116          """Sets the runner_error of this RunCommandResult.
   117  
   118          Runner error  # noqa: E501
   119  
   120          :param runner_error: The runner_error of this RunCommandResult.  # noqa: E501
   121          :type: str
   122          """
   123  
   124          self._runner_error = runner_error
   125  
   126      @property
   127      def stderr(self):
   128          """Gets the stderr of this RunCommandResult.  # noqa: E501
   129  
   130          stderr of the run.  # noqa: E501
   131  
   132          :return: The stderr of this RunCommandResult.  # noqa: E501
   133          :rtype: str
   134          """
   135          return self._stderr
   136  
   137      @stderr.setter
   138      def stderr(self, stderr):
   139          """Sets the stderr of this RunCommandResult.
   140  
   141          stderr of the run.  # noqa: E501
   142  
   143          :param stderr: The stderr of this RunCommandResult.  # noqa: E501
   144          :type: str
   145          """
   146  
   147          self._stderr = stderr
   148  
   149      @property
   150      def stderrtruncated(self):
   151          """Gets the stderrtruncated of this RunCommandResult.  # noqa: E501
   152  
   153          bool describing if stderr was truncated  # noqa: E501
   154  
   155          :return: The stderrtruncated of this RunCommandResult.  # noqa: E501
   156          :rtype: bool
   157          """
   158          return self._stderrtruncated
   159  
   160      @stderrtruncated.setter
   161      def stderrtruncated(self, stderrtruncated):
   162          """Sets the stderrtruncated of this RunCommandResult.
   163  
   164          bool describing if stderr was truncated  # noqa: E501
   165  
   166          :param stderrtruncated: The stderrtruncated of this RunCommandResult.  # noqa: E501
   167          :type: bool
   168          """
   169  
   170          self._stderrtruncated = stderrtruncated
   171  
   172      @property
   173      def stdout(self):
   174          """Gets the stdout of this RunCommandResult.  # noqa: E501
   175  
   176          stdout of the run. Yaml provided for `describe` output  # noqa: E501
   177  
   178          :return: The stdout of this RunCommandResult.  # noqa: E501
   179          :rtype: str
   180          """
   181          return self._stdout
   182  
   183      @stdout.setter
   184      def stdout(self, stdout):
   185          """Sets the stdout of this RunCommandResult.
   186  
   187          stdout of the run. Yaml provided for `describe` output  # noqa: E501
   188  
   189          :param stdout: The stdout of this RunCommandResult.  # noqa: E501
   190          :type: str
   191          """
   192  
   193          self._stdout = stdout
   194  
   195      @property
   196      def stdouttruncated(self):
   197          """Gets the stdouttruncated of this RunCommandResult.  # noqa: E501
   198  
   199          bool describing if stdout was truncated  # noqa: E501
   200  
   201          :return: The stdouttruncated of this RunCommandResult.  # noqa: E501
   202          :rtype: bool
   203          """
   204          return self._stdouttruncated
   205  
   206      @stdouttruncated.setter
   207      def stdouttruncated(self, stdouttruncated):
   208          """Sets the stdouttruncated of this RunCommandResult.
   209  
   210          bool describing if stdout was truncated  # noqa: E501
   211  
   212          :param stdouttruncated: The stdouttruncated of this RunCommandResult.  # noqa: E501
   213          :type: bool
   214          """
   215  
   216          self._stdouttruncated = stdouttruncated
   217  
   218      def to_dict(self):
   219          """Returns the model properties as a dict"""
   220          result = {}
   221  
   222          for attr, _ in six.iteritems(self.swagger_types):
   223              value = getattr(self, attr)
   224              if isinstance(value, list):
   225                  result[attr] = list(map(
   226                      lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
   227                      value
   228                  ))
   229              elif hasattr(value, "to_dict"):
   230                  result[attr] = value.to_dict()
   231              elif isinstance(value, dict):
   232                  result[attr] = dict(map(
   233                      lambda item: (item[0], item[1].to_dict())
   234                      if hasattr(item[1], "to_dict") else item,
   235                      value.items()
   236                  ))
   237              else:
   238                  result[attr] = value
   239          if issubclass(RunCommandResult, dict):
   240              for key, value in self.items():
   241                  result[key] = value
   242  
   243          return result
   244  
   245      def to_str(self):
   246          """Returns the string representation of the model"""
   247          return pprint.pformat(self.to_dict())
   248  
   249      def __repr__(self):
   250          """For `print` and `pprint`"""
   251          return self.to_str()
   252  
   253      def __eq__(self, other):
   254          """Returns true if both objects are equal"""
   255          if not isinstance(other, RunCommandResult):
   256              return False
   257  
   258          return self.to_dict() == other.to_dict()
   259  
   260      def __ne__(self, other):
   261          """Returns true if both objects are not equal"""
   262          if not isinstance(other, RunCommandResult):
   263              return True
   264  
   265          return self.to_dict() != other.to_dict()