github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/clients/python/bacalhau_apiclient/models/engine.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 Engine(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 allowed enum values 30 """ 31 _0 = "0" 32 _1 = "1" 33 _2 = "2" 34 _3 = "3" 35 _4 = "4" 36 _5 = "5" 37 _6 = "6" 38 39 """ 40 Attributes: 41 swagger_types (dict): The key is attribute name 42 and the value is attribute type. 43 attribute_map (dict): The key is attribute name 44 and the value is json key in definition. 45 """ 46 swagger_types = { 47 } 48 49 attribute_map = { 50 } 51 52 def __init__(self, _configuration=None): # noqa: E501 53 """Engine - a model defined in Swagger""" # noqa: E501 54 if _configuration is None: 55 _configuration = Configuration() 56 self._configuration = _configuration 57 self.discriminator = None 58 59 def to_dict(self): 60 """Returns the model properties as a dict""" 61 result = {} 62 63 for attr, _ in six.iteritems(self.swagger_types): 64 value = getattr(self, attr) 65 if isinstance(value, list): 66 result[attr] = list(map( 67 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 68 value 69 )) 70 elif hasattr(value, "to_dict"): 71 result[attr] = value.to_dict() 72 elif isinstance(value, dict): 73 result[attr] = dict(map( 74 lambda item: (item[0], item[1].to_dict()) 75 if hasattr(item[1], "to_dict") else item, 76 value.items() 77 )) 78 else: 79 result[attr] = value 80 if issubclass(Engine, dict): 81 for key, value in self.items(): 82 result[key] = value 83 84 return result 85 86 def to_str(self): 87 """Returns the string representation of the model""" 88 return pprint.pformat(self.to_dict()) 89 90 def __repr__(self): 91 """For `print` and `pprint`""" 92 return self.to_str() 93 94 def __eq__(self, other): 95 """Returns true if both objects are equal""" 96 if not isinstance(other, Engine): 97 return False 98 99 return self.to_dict() == other.to_dict() 100 101 def __ne__(self, other): 102 """Returns true if both objects are not equal""" 103 if not isinstance(other, Engine): 104 return True 105 106 return self.to_dict() != other.to_dict()