github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/clients/python/bacalhau_apiclient/models/job_spec_language.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 JobSpecLanguage(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 'command': 'str', 37 'deterministic_execution': 'bool', 38 'job_context': 'JobSpecLanguageJobContext', 39 'language': 'str', 40 'language_version': 'str', 41 'program_path': 'str', 42 'requirements_path': 'str' 43 } 44 45 attribute_map = { 46 'command': 'Command', 47 'deterministic_execution': 'DeterministicExecution', 48 'job_context': 'JobContext', 49 'language': 'Language', 50 'language_version': 'LanguageVersion', 51 'program_path': 'ProgramPath', 52 'requirements_path': 'RequirementsPath' 53 } 54 55 def __init__(self, command=None, deterministic_execution=None, job_context=None, language=None, language_version=None, program_path=None, requirements_path=None, _configuration=None): # noqa: E501 56 """JobSpecLanguage - a model defined in Swagger""" # noqa: E501 57 if _configuration is None: 58 _configuration = Configuration() 59 self._configuration = _configuration 60 61 self._command = None 62 self._deterministic_execution = None 63 self._job_context = None 64 self._language = None 65 self._language_version = None 66 self._program_path = None 67 self._requirements_path = None 68 self.discriminator = None 69 70 if command is not None: 71 self.command = command 72 if deterministic_execution is not None: 73 self.deterministic_execution = deterministic_execution 74 if job_context is not None: 75 self.job_context = job_context 76 if language is not None: 77 self.language = language 78 if language_version is not None: 79 self.language_version = language_version 80 if program_path is not None: 81 self.program_path = program_path 82 if requirements_path is not None: 83 self.requirements_path = requirements_path 84 85 @property 86 def command(self): 87 """Gets the command of this JobSpecLanguage. # noqa: E501 88 89 optional program specified on commandline, like python -c \"print(1+1)\" # noqa: E501 90 91 :return: The command of this JobSpecLanguage. # noqa: E501 92 :rtype: str 93 """ 94 return self._command 95 96 @command.setter 97 def command(self, command): 98 """Sets the command of this JobSpecLanguage. 99 100 optional program specified on commandline, like python -c \"print(1+1)\" # noqa: E501 101 102 :param command: The command of this JobSpecLanguage. # noqa: E501 103 :type: str 104 """ 105 106 self._command = command 107 108 @property 109 def deterministic_execution(self): 110 """Gets the deterministic_execution of this JobSpecLanguage. # noqa: E501 111 112 must this job be run in a deterministic context? # noqa: E501 113 114 :return: The deterministic_execution of this JobSpecLanguage. # noqa: E501 115 :rtype: bool 116 """ 117 return self._deterministic_execution 118 119 @deterministic_execution.setter 120 def deterministic_execution(self, deterministic_execution): 121 """Sets the deterministic_execution of this JobSpecLanguage. 122 123 must this job be run in a deterministic context? # noqa: E501 124 125 :param deterministic_execution: The deterministic_execution of this JobSpecLanguage. # noqa: E501 126 :type: bool 127 """ 128 129 self._deterministic_execution = deterministic_execution 130 131 @property 132 def job_context(self): 133 """Gets the job_context of this JobSpecLanguage. # noqa: E501 134 135 136 :return: The job_context of this JobSpecLanguage. # noqa: E501 137 :rtype: JobSpecLanguageJobContext 138 """ 139 return self._job_context 140 141 @job_context.setter 142 def job_context(self, job_context): 143 """Sets the job_context of this JobSpecLanguage. 144 145 146 :param job_context: The job_context of this JobSpecLanguage. # noqa: E501 147 :type: JobSpecLanguageJobContext 148 """ 149 150 self._job_context = job_context 151 152 @property 153 def language(self): 154 """Gets the language of this JobSpecLanguage. # noqa: E501 155 156 e.g. python # noqa: E501 157 158 :return: The language of this JobSpecLanguage. # noqa: E501 159 :rtype: str 160 """ 161 return self._language 162 163 @language.setter 164 def language(self, language): 165 """Sets the language of this JobSpecLanguage. 166 167 e.g. python # noqa: E501 168 169 :param language: The language of this JobSpecLanguage. # noqa: E501 170 :type: str 171 """ 172 173 self._language = language 174 175 @property 176 def language_version(self): 177 """Gets the language_version of this JobSpecLanguage. # noqa: E501 178 179 e.g. 3.8 # noqa: E501 180 181 :return: The language_version of this JobSpecLanguage. # noqa: E501 182 :rtype: str 183 """ 184 return self._language_version 185 186 @language_version.setter 187 def language_version(self, language_version): 188 """Sets the language_version of this JobSpecLanguage. 189 190 e.g. 3.8 # noqa: E501 191 192 :param language_version: The language_version of this JobSpecLanguage. # noqa: E501 193 :type: str 194 """ 195 196 self._language_version = language_version 197 198 @property 199 def program_path(self): 200 """Gets the program_path of this JobSpecLanguage. # noqa: E501 201 202 optional program path relative to the context dir. one of Command or ProgramPath must be specified # noqa: E501 203 204 :return: The program_path of this JobSpecLanguage. # noqa: E501 205 :rtype: str 206 """ 207 return self._program_path 208 209 @program_path.setter 210 def program_path(self, program_path): 211 """Sets the program_path of this JobSpecLanguage. 212 213 optional program path relative to the context dir. one of Command or ProgramPath must be specified # noqa: E501 214 215 :param program_path: The program_path of this JobSpecLanguage. # noqa: E501 216 :type: str 217 """ 218 219 self._program_path = program_path 220 221 @property 222 def requirements_path(self): 223 """Gets the requirements_path of this JobSpecLanguage. # noqa: E501 224 225 optional requirements.txt (or equivalent) path relative to the context dir # noqa: E501 226 227 :return: The requirements_path of this JobSpecLanguage. # noqa: E501 228 :rtype: str 229 """ 230 return self._requirements_path 231 232 @requirements_path.setter 233 def requirements_path(self, requirements_path): 234 """Sets the requirements_path of this JobSpecLanguage. 235 236 optional requirements.txt (or equivalent) path relative to the context dir # noqa: E501 237 238 :param requirements_path: The requirements_path of this JobSpecLanguage. # noqa: E501 239 :type: str 240 """ 241 242 self._requirements_path = requirements_path 243 244 def to_dict(self): 245 """Returns the model properties as a dict""" 246 result = {} 247 248 for attr, _ in six.iteritems(self.swagger_types): 249 value = getattr(self, attr) 250 if isinstance(value, list): 251 result[attr] = list(map( 252 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 253 value 254 )) 255 elif hasattr(value, "to_dict"): 256 result[attr] = value.to_dict() 257 elif isinstance(value, dict): 258 result[attr] = dict(map( 259 lambda item: (item[0], item[1].to_dict()) 260 if hasattr(item[1], "to_dict") else item, 261 value.items() 262 )) 263 else: 264 result[attr] = value 265 if issubclass(JobSpecLanguage, dict): 266 for key, value in self.items(): 267 result[key] = value 268 269 return result 270 271 def to_str(self): 272 """Returns the string representation of the model""" 273 return pprint.pformat(self.to_dict()) 274 275 def __repr__(self): 276 """For `print` and `pprint`""" 277 return self.to_str() 278 279 def __eq__(self, other): 280 """Returns true if both objects are equal""" 281 if not isinstance(other, JobSpecLanguage): 282 return False 283 284 return self.to_dict() == other.to_dict() 285 286 def __ne__(self, other): 287 """Returns true if both objects are not equal""" 288 if not isinstance(other, JobSpecLanguage): 289 return True 290 291 return self.to_dict() != other.to_dict()