1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
|
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.29
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from kubernetes.client.configuration import Configuration
class V1JobStatus(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'active': 'int',
'completed_indexes': 'str',
'completion_time': 'datetime',
'conditions': 'list[V1JobCondition]',
'failed': 'int',
'failed_indexes': 'str',
'ready': 'int',
'start_time': 'datetime',
'succeeded': 'int',
'terminating': 'int',
'uncounted_terminated_pods': 'V1UncountedTerminatedPods'
}
attribute_map = {
'active': 'active',
'completed_indexes': 'completedIndexes',
'completion_time': 'completionTime',
'conditions': 'conditions',
'failed': 'failed',
'failed_indexes': 'failedIndexes',
'ready': 'ready',
'start_time': 'startTime',
'succeeded': 'succeeded',
'terminating': 'terminating',
'uncounted_terminated_pods': 'uncountedTerminatedPods'
}
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: E501
"""V1JobStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._active = None
self._completed_indexes = None
self._completion_time = None
self._conditions = None
self._failed = None
self._failed_indexes = None
self._ready = None
self._start_time = None
self._succeeded = None
self._terminating = None
self._uncounted_terminated_pods = None
self.discriminator = None
if active is not None:
self.active = active
if completed_indexes is not None:
self.completed_indexes = completed_indexes
if completion_time is not None:
self.completion_time = completion_time
if conditions is not None:
self.conditions = conditions
if failed is not None:
self.failed = failed
if failed_indexes is not None:
self.failed_indexes = failed_indexes
if ready is not None:
self.ready = ready
if start_time is not None:
self.start_time = start_time
if succeeded is not None:
self.succeeded = succeeded
if terminating is not None:
self.terminating = terminating
if uncounted_terminated_pods is not None:
self.uncounted_terminated_pods = uncounted_terminated_pods
@property
def active(self):
"""Gets the active of this V1JobStatus. # noqa: E501
The number of pending and running pods. # noqa: E501
:return: The active of this V1JobStatus. # noqa: E501
:rtype: int
"""
return self._active
@active.setter
def active(self, active):
"""Sets the active of this V1JobStatus.
The number of pending and running pods. # noqa: E501
:param active: The active of this V1JobStatus. # noqa: E501
:type: int
"""
self._active = active
@property
def completed_indexes(self):
"""Gets the completed_indexes of this V1JobStatus. # noqa: E501
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: E501
:return: The completed_indexes of this V1JobStatus. # noqa: E501
:rtype: str
"""
return self._completed_indexes
@completed_indexes.setter
def completed_indexes(self, completed_indexes):
"""Sets the completed_indexes of this V1JobStatus.
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: E501
:param completed_indexes: The completed_indexes of this V1JobStatus. # noqa: E501
:type: str
"""
self._completed_indexes = completed_indexes
@property
def completion_time(self):
"""Gets the completion_time of this V1JobStatus. # noqa: E501
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 only set when the job finishes successfully. # noqa: E501
:return: The completion_time of this V1JobStatus. # noqa: E501
:rtype: datetime
"""
return self._completion_time
@completion_time.setter
def completion_time(self, completion_time):
"""Sets the completion_time of this V1JobStatus.
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 only set when the job finishes successfully. # noqa: E501
:param completion_time: The completion_time of this V1JobStatus. # noqa: E501
:type: datetime
"""
self._completion_time = completion_time
@property
def conditions(self):
"""Gets the conditions of this V1JobStatus. # noqa: E501
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. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501
:return: The conditions of this V1JobStatus. # noqa: E501
:rtype: list[V1JobCondition]
"""
return self._conditions
@conditions.setter
def conditions(self, conditions):
"""Sets the conditions of this V1JobStatus.
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. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501
:param conditions: The conditions of this V1JobStatus. # noqa: E501
:type: list[V1JobCondition]
"""
self._conditions = conditions
@property
def failed(self):
"""Gets the failed of this V1JobStatus. # noqa: E501
The number of pods which reached phase Failed. # noqa: E501
:return: The failed of this V1JobStatus. # noqa: E501
:rtype: int
"""
return self._failed
@failed.setter
def failed(self, failed):
"""Sets the failed of this V1JobStatus.
The number of pods which reached phase Failed. # noqa: E501
:param failed: The failed of this V1JobStatus. # noqa: E501
:type: int
"""
self._failed = failed
@property
def failed_indexes(self):
"""Gets the failed_indexes of this V1JobStatus. # noqa: E501
FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. 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\". This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). # noqa: E501
:return: The failed_indexes of this V1JobStatus. # noqa: E501
:rtype: str
"""
return self._failed_indexes
@failed_indexes.setter
def failed_indexes(self, failed_indexes):
"""Sets the failed_indexes of this V1JobStatus.
FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. 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\". This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). # noqa: E501
:param failed_indexes: The failed_indexes of this V1JobStatus. # noqa: E501
:type: str
"""
self._failed_indexes = failed_indexes
@property
def ready(self):
"""Gets the ready of this V1JobStatus. # noqa: E501
The number of pods which have a Ready condition. # noqa: E501
:return: The ready of this V1JobStatus. # noqa: E501
:rtype: int
"""
return self._ready
@ready.setter
def ready(self, ready):
"""Sets the ready of this V1JobStatus.
The number of pods which have a Ready condition. # noqa: E501
:param ready: The ready of this V1JobStatus. # noqa: E501
:type: int
"""
self._ready = ready
@property
def start_time(self):
"""Gets the start_time of this V1JobStatus. # noqa: E501
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. # noqa: E501
:return: The start_time of this V1JobStatus. # noqa: E501
:rtype: datetime
"""
return self._start_time
@start_time.setter
def start_time(self, start_time):
"""Sets the start_time of this V1JobStatus.
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. # noqa: E501
:param start_time: The start_time of this V1JobStatus. # noqa: E501
:type: datetime
"""
self._start_time = start_time
@property
def succeeded(self):
"""Gets the succeeded of this V1JobStatus. # noqa: E501
The number of pods which reached phase Succeeded. # noqa: E501
:return: The succeeded of this V1JobStatus. # noqa: E501
:rtype: int
"""
return self._succeeded
@succeeded.setter
def succeeded(self, succeeded):
"""Sets the succeeded of this V1JobStatus.
The number of pods which reached phase Succeeded. # noqa: E501
:param succeeded: The succeeded of this V1JobStatus. # noqa: E501
:type: int
"""
self._succeeded = succeeded
@property
def terminating(self):
"""Gets the terminating of this V1JobStatus. # noqa: E501
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: E501
:return: The terminating of this V1JobStatus. # noqa: E501
:rtype: int
"""
return self._terminating
@terminating.setter
def terminating(self, terminating):
"""Sets the terminating of this V1JobStatus.
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: E501
:param terminating: The terminating of this V1JobStatus. # noqa: E501
:type: int
"""
self._terminating = terminating
@property
def uncounted_terminated_pods(self):
"""Gets the uncounted_terminated_pods of this V1JobStatus. # noqa: E501
:return: The uncounted_terminated_pods of this V1JobStatus. # noqa: E501
:rtype: V1UncountedTerminatedPods
"""
return self._uncounted_terminated_pods
@uncounted_terminated_pods.setter
def uncounted_terminated_pods(self, uncounted_terminated_pods):
"""Sets the uncounted_terminated_pods of this V1JobStatus.
:param uncounted_terminated_pods: The uncounted_terminated_pods of this V1JobStatus. # noqa: E501
:type: V1UncountedTerminatedPods
"""
self._uncounted_terminated_pods = uncounted_terminated_pods
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_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
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, V1JobStatus):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, V1JobStatus):
return True
return self.to_dict() != other.to_dict()
|