codekingpro/portable-devtools
114k
1# coding: utf-82 3"""4 Kubernetes5 6 No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E5017 8 The version of the OpenAPI document: release-1.359 Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1JobStatus(object):22 """NOTE: This class is auto generated by OpenAPI Generator.23 Ref: https://openapi-generator.tech24 25 Do not edit the class manually.26 """27 28 """29 Attributes:30 openapi_types (dict): The key is attribute name31 and the value is attribute type.32 attribute_map (dict): The key is attribute name33 and the value is json key in definition.34 """35 openapi_types = {36 'active': 'int',37 'completed_indexes': 'str',38 'completion_time': 'datetime',39 'conditions': 'list[V1JobCondition]',40 'failed': 'int',41 'failed_indexes': 'str',42 'ready': 'int',43 'start_time': 'datetime',44 'succeeded': 'int',45 'terminating': 'int',46 'uncounted_terminated_pods': 'V1UncountedTerminatedPods'47 }48 49 attribute_map = {50 'active': 'active',51 'completed_indexes': 'completedIndexes',52 'completion_time': 'completionTime',53 'conditions': 'conditions',54 'failed': 'failed',55 'failed_indexes': 'failedIndexes',56 'ready': 'ready',57 'start_time': 'startTime',58 'succeeded': 'succeeded',59 'terminating': 'terminating',60 'uncounted_terminated_pods': 'uncountedTerminatedPods'61 }62 63 def __init__(self, active=None, completed_indexes=None, completion_time=None, conditions=None, failed=None, failed_indexes=None, ready=None, start_time=None, succeeded=None, terminating=None, uncounted_terminated_pods=None, local_vars_configuration=None): # noqa: E50164 """V1JobStatus - a model defined in OpenAPI""" # noqa: E50165 if local_vars_configuration is None:66 local_vars_configuration = Configuration()67 self.local_vars_configuration = local_vars_configuration68 69 self._active = None70 self._completed_indexes = None71 self._completion_time = None72 self._conditions = None73 self._failed = None74 self._failed_indexes = None75 self._ready = None76 self._start_time = None77 self._succeeded = None78 self._terminating = None79 self._uncounted_terminated_pods = None80 self.discriminator = None81 82 if active is not None:83 self.active = active84 if completed_indexes is not None:85 self.completed_indexes = completed_indexes86 if completion_time is not None:87 self.completion_time = completion_time88 if conditions is not None:89 self.conditions = conditions90 if failed is not None:91 self.failed = failed92 if failed_indexes is not None:93 self.failed_indexes = failed_indexes94 if ready is not None:95 self.ready = ready96 if start_time is not None:97 self.start_time = start_time98 if succeeded is not None:99 self.succeeded = succeeded100 if terminating is not None:101 self.terminating = terminating102 if uncounted_terminated_pods is not None:103 self.uncounted_terminated_pods = uncounted_terminated_pods104 105 @property106 def active(self):107 """Gets the active of this V1JobStatus. # noqa: E501108 109 The number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs. # noqa: E501110 111 :return: The active of this V1JobStatus. # noqa: E501112 :rtype: int113 """114 return self._active115 116 @active.setter117 def active(self, active):118 """Sets the active of this V1JobStatus.119 120 The number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs. # noqa: E501121 122 :param active: The active of this V1JobStatus. # noqa: E501123 :type: int124 """125 126 self._active = active127 128 @property129 def completed_indexes(self):130 """Gets the completed_indexes of this V1JobStatus. # noqa: E501131 132 completedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". # noqa: E501133 134 :return: The completed_indexes of this V1JobStatus. # noqa: E501135 :rtype: str136 """137 return self._completed_indexes138 139 @completed_indexes.setter140 def completed_indexes(self, completed_indexes):141 """Sets the completed_indexes of this V1JobStatus.142 143 completedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". # noqa: E501144 145 :param completed_indexes: The completed_indexes of this V1JobStatus. # noqa: E501146 :type: str147 """148 149 self._completed_indexes = completed_indexes150 151 @property152 def completion_time(self):153 """Gets the completion_time of this V1JobStatus. # noqa: E501154 155 Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field. # noqa: E501156 157 :return: The completion_time of this V1JobStatus. # noqa: E501158 :rtype: datetime159 """160 return self._completion_time161 162 @completion_time.setter163 def completion_time(self, completion_time):164 """Sets the completion_time of this V1JobStatus.165 166 Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field. # noqa: E501167 168 :param completion_time: The completion_time of this V1JobStatus. # noqa: E501169 :type: datetime170 """171 172 self._completion_time = completion_time173 174 @property175 def conditions(self):176 """Gets the conditions of this V1JobStatus. # noqa: E501177 178 The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. A job is considered finished when it is in a terminal condition, either \"Complete\" or \"Failed\". A Job cannot have both the \"Complete\" and \"Failed\" conditions. Additionally, it cannot be in the \"Complete\" and \"FailureTarget\" conditions. The \"Complete\", \"Failed\" and \"FailureTarget\" conditions cannot be disabled. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501179 180 :return: The conditions of this V1JobStatus. # noqa: E501181 :rtype: list[V1JobCondition]182 """183 return self._conditions184 185 @conditions.setter186 def conditions(self, conditions):187 """Sets the conditions of this V1JobStatus.188 189 The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. A job is considered finished when it is in a terminal condition, either \"Complete\" or \"Failed\". A Job cannot have both the \"Complete\" and \"Failed\" conditions. Additionally, it cannot be in the \"Complete\" and \"FailureTarget\" conditions. The \"Complete\", \"Failed\" and \"FailureTarget\" conditions cannot be disabled. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501190 191 :param conditions: The conditions of this V1JobStatus. # noqa: E501192 :type: list[V1JobCondition]193 """194 195 self._conditions = conditions196 197 @property198 def failed(self):199 """Gets the failed of this V1JobStatus. # noqa: E501200 201 The number of pods which reached phase Failed. The value increases monotonically. # noqa: E501202 203 :return: The failed of this V1JobStatus. # noqa: E501204 :rtype: int205 """206 return self._failed207 208 @failed.setter209 def failed(self, failed):210 """Sets the failed of this V1JobStatus.211 212 The number of pods which reached phase Failed. The value increases monotonically. # noqa: E501213 214 :param failed: The failed of this V1JobStatus. # noqa: E501215 :type: int216 """217 218 self._failed = failed219 220 @property221 def failed_indexes(self):222 """Gets the failed_indexes of this V1JobStatus. # noqa: E501223 224 FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes. # noqa: E501225 226 :return: The failed_indexes of this V1JobStatus. # noqa: E501227 :rtype: str228 """229 return self._failed_indexes230 231 @failed_indexes.setter232 def failed_indexes(self, failed_indexes):233 """Sets the failed_indexes of this V1JobStatus.234 235 FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes. # noqa: E501236 237 :param failed_indexes: The failed_indexes of this V1JobStatus. # noqa: E501238 :type: str239 """240 241 self._failed_indexes = failed_indexes242 243 @property244 def ready(self):245 """Gets the ready of this V1JobStatus. # noqa: E501246 247 The number of active pods which have a Ready condition and are not terminating (without a deletionTimestamp). # noqa: E501248 249 :return: The ready of this V1JobStatus. # noqa: E501250 :rtype: int251 """252 return self._ready253 254 @ready.setter255 def ready(self, ready):256 """Sets the ready of this V1JobStatus.257 258 The number of active pods which have a Ready condition and are not terminating (without a deletionTimestamp). # noqa: E501259 260 :param ready: The ready of this V1JobStatus. # noqa: E501261 :type: int262 """263 264 self._ready = ready265 266 @property267 def start_time(self):268 """Gets the start_time of this V1JobStatus. # noqa: E501269 270 Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. Once set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished. # noqa: E501271 272 :return: The start_time of this V1JobStatus. # noqa: E501273 :rtype: datetime274 """275 return self._start_time276 277 @start_time.setter278 def start_time(self, start_time):279 """Sets the start_time of this V1JobStatus.280 281 Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. Once set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished. # noqa: E501282 283 :param start_time: The start_time of this V1JobStatus. # noqa: E501284 :type: datetime285 """286 287 self._start_time = start_time288 289 @property290 def succeeded(self):291 """Gets the succeeded of this V1JobStatus. # noqa: E501292 293 The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs. # noqa: E501294 295 :return: The succeeded of this V1JobStatus. # noqa: E501296 :rtype: int297 """298 return self._succeeded299 300 @succeeded.setter301 def succeeded(self, succeeded):302 """Sets the succeeded of this V1JobStatus.303 304 The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs. # noqa: E501305 306 :param succeeded: The succeeded of this V1JobStatus. # noqa: E501307 :type: int308 """309 310 self._succeeded = succeeded311 312 @property313 def terminating(self):314 """Gets the terminating of this V1JobStatus. # noqa: E501315 316 The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp). This field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default). # noqa: E501317 318 :return: The terminating of this V1JobStatus. # noqa: E501319 :rtype: int320 """321 return self._terminating322 323 @terminating.setter324 def terminating(self, terminating):325 """Sets the terminating of this V1JobStatus.326 327 The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp). This field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default). # noqa: E501328 329 :param terminating: The terminating of this V1JobStatus. # noqa: E501330 :type: int331 """332 333 self._terminating = terminating334 335 @property336 def uncounted_terminated_pods(self):337 """Gets the uncounted_terminated_pods of this V1JobStatus. # noqa: E501338 339 340 :return: The uncounted_terminated_pods of this V1JobStatus. # noqa: E501341 :rtype: V1UncountedTerminatedPods342 """343 return self._uncounted_terminated_pods344 345 @uncounted_terminated_pods.setter346 def uncounted_terminated_pods(self, uncounted_terminated_pods):347 """Sets the uncounted_terminated_pods of this V1JobStatus.348 349 350 :param uncounted_terminated_pods: The uncounted_terminated_pods of this V1JobStatus. # noqa: E501351 :type: V1UncountedTerminatedPods352 """353 354 self._uncounted_terminated_pods = uncounted_terminated_pods355 356 def to_dict(self):357 """Returns the model properties as a dict"""358 result = {}359 360 for attr, _ in six.iteritems(self.openapi_types):361 value = getattr(self, attr)362 if isinstance(value, list):363 result[attr] = list(map(364 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,365 value366 ))367 elif hasattr(value, "to_dict"):368 result[attr] = value.to_dict()369 elif isinstance(value, dict):370 result[attr] = dict(map(371 lambda item: (item[0], item[1].to_dict())372 if hasattr(item[1], "to_dict") else item,373 value.items()374 ))375 else:376 result[attr] = value377 378 return result379 380 def to_str(self):381 """Returns the string representation of the model"""382 return pprint.pformat(self.to_dict())383 384 def __repr__(self):385 """For `print` and `pprint`"""386 return self.to_str()387 388 def __eq__(self, other):389 """Returns true if both objects are equal"""390 if not isinstance(other, V1JobStatus):391 return False392 393 return self.to_dict() == other.to_dict()394 395 def __ne__(self, other):396 """Returns true if both objects are not equal"""397 if not isinstance(other, V1JobStatus):398 return True399 400 return self.to_dict() != other.to_dict()401 