lightning-sdk 2025.10.14__py3-none-any.whl → 2025.10.23__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +6 -3
- lightning_sdk/api/base_studio_api.py +13 -9
- lightning_sdk/api/job_api.py +4 -1
- lightning_sdk/api/license_api.py +26 -59
- lightning_sdk/api/studio_api.py +7 -2
- lightning_sdk/base_studio.py +30 -17
- lightning_sdk/cli/base_studio/list.py +1 -3
- lightning_sdk/cli/entrypoint.py +11 -34
- lightning_sdk/cli/groups.py +7 -0
- lightning_sdk/cli/license/__init__.py +14 -0
- lightning_sdk/cli/license/get.py +15 -0
- lightning_sdk/cli/license/list.py +45 -0
- lightning_sdk/cli/license/set.py +13 -0
- lightning_sdk/cli/studio/connect.py +42 -92
- lightning_sdk/cli/studio/create.py +23 -1
- lightning_sdk/cli/studio/start.py +12 -2
- lightning_sdk/cli/utils/get_base_studio.py +24 -0
- lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +69 -0
- lightning_sdk/cli/utils/logging.py +121 -0
- lightning_sdk/cli/utils/ssh_connection.py +1 -1
- lightning_sdk/constants.py +1 -0
- lightning_sdk/helpers.py +53 -34
- lightning_sdk/job/base.py +7 -0
- lightning_sdk/job/job.py +8 -0
- lightning_sdk/job/v1.py +3 -0
- lightning_sdk/job/v2.py +4 -0
- lightning_sdk/lightning_cloud/login.py +260 -10
- lightning_sdk/lightning_cloud/openapi/__init__.py +16 -3
- lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +279 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +117 -0
- lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +16 -3
- lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/update1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_metric.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_list_platform_notifications_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_platform_notification.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_request.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +139 -191
- lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_validate_license_response.py} +21 -21
- lightning_sdk/lightning_cloud/rest_client.py +48 -45
- lightning_sdk/machine.py +5 -0
- lightning_sdk/pipeline/steps.py +1 -0
- lightning_sdk/studio.py +55 -13
- lightning_sdk/utils/config.py +18 -3
- lightning_sdk/utils/license.py +13 -0
- lightning_sdk/utils/resolve.py +6 -1
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/RECORD +74 -54
- lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
- lightning_sdk/services/license.py +0 -363
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/top_level.txt +0 -0
|
@@ -1,435 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
external/v1/auth_service.proto
|
|
5
|
-
|
|
6
|
-
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
-
|
|
8
|
-
OpenAPI spec version: version not set
|
|
9
|
-
|
|
10
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
-
|
|
12
|
-
NOTE
|
|
13
|
-
----
|
|
14
|
-
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
-
by custom templates. The purpose of these templates is to include
|
|
16
|
-
typing information in the API and Model code. Please refer to the
|
|
17
|
-
main grid repository for more info
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
import pprint
|
|
21
|
-
import re # noqa: F401
|
|
22
|
-
|
|
23
|
-
from typing import TYPE_CHECKING
|
|
24
|
-
|
|
25
|
-
import six
|
|
26
|
-
|
|
27
|
-
if TYPE_CHECKING:
|
|
28
|
-
from datetime import datetime
|
|
29
|
-
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
-
|
|
31
|
-
class V1ProductLicense(object):
|
|
32
|
-
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
-
|
|
34
|
-
Do not edit the class manually.
|
|
35
|
-
"""
|
|
36
|
-
"""
|
|
37
|
-
Attributes:
|
|
38
|
-
swagger_types (dict): The key is attribute name
|
|
39
|
-
and the value is attribute type.
|
|
40
|
-
attribute_map (dict): The key is attribute name
|
|
41
|
-
and the value is json key in definition.
|
|
42
|
-
"""
|
|
43
|
-
swagger_types = {
|
|
44
|
-
'active': 'bool',
|
|
45
|
-
'created_at': 'datetime',
|
|
46
|
-
'expires_at': 'datetime',
|
|
47
|
-
'is_valid': 'bool',
|
|
48
|
-
'license_id': 'str',
|
|
49
|
-
'license_key': 'str',
|
|
50
|
-
'license_type': 'str',
|
|
51
|
-
'owner_name': 'str',
|
|
52
|
-
'owner_type': 'str',
|
|
53
|
-
'product_name': 'str',
|
|
54
|
-
'product_type': 'str',
|
|
55
|
-
'product_version': 'str',
|
|
56
|
-
'updated_at': 'datetime'
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
attribute_map = {
|
|
60
|
-
'active': 'active',
|
|
61
|
-
'created_at': 'createdAt',
|
|
62
|
-
'expires_at': 'expiresAt',
|
|
63
|
-
'is_valid': 'isValid',
|
|
64
|
-
'license_id': 'licenseId',
|
|
65
|
-
'license_key': 'licenseKey',
|
|
66
|
-
'license_type': 'licenseType',
|
|
67
|
-
'owner_name': 'ownerName',
|
|
68
|
-
'owner_type': 'ownerType',
|
|
69
|
-
'product_name': 'productName',
|
|
70
|
-
'product_type': 'productType',
|
|
71
|
-
'product_version': 'productVersion',
|
|
72
|
-
'updated_at': 'updatedAt'
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
def __init__(self, active: 'bool' =None, created_at: 'datetime' =None, expires_at: 'datetime' =None, is_valid: 'bool' =None, license_id: 'str' =None, license_key: 'str' =None, license_type: 'str' =None, owner_name: 'str' =None, owner_type: 'str' =None, product_name: 'str' =None, product_type: 'str' =None, product_version: 'str' =None, updated_at: 'datetime' =None): # noqa: E501
|
|
76
|
-
"""V1ProductLicense - a model defined in Swagger""" # noqa: E501
|
|
77
|
-
self._active = None
|
|
78
|
-
self._created_at = None
|
|
79
|
-
self._expires_at = None
|
|
80
|
-
self._is_valid = None
|
|
81
|
-
self._license_id = None
|
|
82
|
-
self._license_key = None
|
|
83
|
-
self._license_type = None
|
|
84
|
-
self._owner_name = None
|
|
85
|
-
self._owner_type = None
|
|
86
|
-
self._product_name = None
|
|
87
|
-
self._product_type = None
|
|
88
|
-
self._product_version = None
|
|
89
|
-
self._updated_at = None
|
|
90
|
-
self.discriminator = None
|
|
91
|
-
if active is not None:
|
|
92
|
-
self.active = active
|
|
93
|
-
if created_at is not None:
|
|
94
|
-
self.created_at = created_at
|
|
95
|
-
if expires_at is not None:
|
|
96
|
-
self.expires_at = expires_at
|
|
97
|
-
if is_valid is not None:
|
|
98
|
-
self.is_valid = is_valid
|
|
99
|
-
if license_id is not None:
|
|
100
|
-
self.license_id = license_id
|
|
101
|
-
if license_key is not None:
|
|
102
|
-
self.license_key = license_key
|
|
103
|
-
if license_type is not None:
|
|
104
|
-
self.license_type = license_type
|
|
105
|
-
if owner_name is not None:
|
|
106
|
-
self.owner_name = owner_name
|
|
107
|
-
if owner_type is not None:
|
|
108
|
-
self.owner_type = owner_type
|
|
109
|
-
if product_name is not None:
|
|
110
|
-
self.product_name = product_name
|
|
111
|
-
if product_type is not None:
|
|
112
|
-
self.product_type = product_type
|
|
113
|
-
if product_version is not None:
|
|
114
|
-
self.product_version = product_version
|
|
115
|
-
if updated_at is not None:
|
|
116
|
-
self.updated_at = updated_at
|
|
117
|
-
|
|
118
|
-
@property
|
|
119
|
-
def active(self) -> 'bool':
|
|
120
|
-
"""Gets the active of this V1ProductLicense. # noqa: E501
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
:return: The active of this V1ProductLicense. # noqa: E501
|
|
124
|
-
:rtype: bool
|
|
125
|
-
"""
|
|
126
|
-
return self._active
|
|
127
|
-
|
|
128
|
-
@active.setter
|
|
129
|
-
def active(self, active: 'bool'):
|
|
130
|
-
"""Sets the active of this V1ProductLicense.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
:param active: The active of this V1ProductLicense. # noqa: E501
|
|
134
|
-
:type: bool
|
|
135
|
-
"""
|
|
136
|
-
|
|
137
|
-
self._active = active
|
|
138
|
-
|
|
139
|
-
@property
|
|
140
|
-
def created_at(self) -> 'datetime':
|
|
141
|
-
"""Gets the created_at of this V1ProductLicense. # noqa: E501
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
:return: The created_at of this V1ProductLicense. # noqa: E501
|
|
145
|
-
:rtype: datetime
|
|
146
|
-
"""
|
|
147
|
-
return self._created_at
|
|
148
|
-
|
|
149
|
-
@created_at.setter
|
|
150
|
-
def created_at(self, created_at: 'datetime'):
|
|
151
|
-
"""Sets the created_at of this V1ProductLicense.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
:param created_at: The created_at of this V1ProductLicense. # noqa: E501
|
|
155
|
-
:type: datetime
|
|
156
|
-
"""
|
|
157
|
-
|
|
158
|
-
self._created_at = created_at
|
|
159
|
-
|
|
160
|
-
@property
|
|
161
|
-
def expires_at(self) -> 'datetime':
|
|
162
|
-
"""Gets the expires_at of this V1ProductLicense. # noqa: E501
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
:return: The expires_at of this V1ProductLicense. # noqa: E501
|
|
166
|
-
:rtype: datetime
|
|
167
|
-
"""
|
|
168
|
-
return self._expires_at
|
|
169
|
-
|
|
170
|
-
@expires_at.setter
|
|
171
|
-
def expires_at(self, expires_at: 'datetime'):
|
|
172
|
-
"""Sets the expires_at of this V1ProductLicense.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
:param expires_at: The expires_at of this V1ProductLicense. # noqa: E501
|
|
176
|
-
:type: datetime
|
|
177
|
-
"""
|
|
178
|
-
|
|
179
|
-
self._expires_at = expires_at
|
|
180
|
-
|
|
181
|
-
@property
|
|
182
|
-
def is_valid(self) -> 'bool':
|
|
183
|
-
"""Gets the is_valid of this V1ProductLicense. # noqa: E501
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
:return: The is_valid of this V1ProductLicense. # noqa: E501
|
|
187
|
-
:rtype: bool
|
|
188
|
-
"""
|
|
189
|
-
return self._is_valid
|
|
190
|
-
|
|
191
|
-
@is_valid.setter
|
|
192
|
-
def is_valid(self, is_valid: 'bool'):
|
|
193
|
-
"""Sets the is_valid of this V1ProductLicense.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
:param is_valid: The is_valid of this V1ProductLicense. # noqa: E501
|
|
197
|
-
:type: bool
|
|
198
|
-
"""
|
|
199
|
-
|
|
200
|
-
self._is_valid = is_valid
|
|
201
|
-
|
|
202
|
-
@property
|
|
203
|
-
def license_id(self) -> 'str':
|
|
204
|
-
"""Gets the license_id of this V1ProductLicense. # noqa: E501
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
:return: The license_id of this V1ProductLicense. # noqa: E501
|
|
208
|
-
:rtype: str
|
|
209
|
-
"""
|
|
210
|
-
return self._license_id
|
|
211
|
-
|
|
212
|
-
@license_id.setter
|
|
213
|
-
def license_id(self, license_id: 'str'):
|
|
214
|
-
"""Sets the license_id of this V1ProductLicense.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
:param license_id: The license_id of this V1ProductLicense. # noqa: E501
|
|
218
|
-
:type: str
|
|
219
|
-
"""
|
|
220
|
-
|
|
221
|
-
self._license_id = license_id
|
|
222
|
-
|
|
223
|
-
@property
|
|
224
|
-
def license_key(self) -> 'str':
|
|
225
|
-
"""Gets the license_key of this V1ProductLicense. # noqa: E501
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
:return: The license_key of this V1ProductLicense. # noqa: E501
|
|
229
|
-
:rtype: str
|
|
230
|
-
"""
|
|
231
|
-
return self._license_key
|
|
232
|
-
|
|
233
|
-
@license_key.setter
|
|
234
|
-
def license_key(self, license_key: 'str'):
|
|
235
|
-
"""Sets the license_key of this V1ProductLicense.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
:param license_key: The license_key of this V1ProductLicense. # noqa: E501
|
|
239
|
-
:type: str
|
|
240
|
-
"""
|
|
241
|
-
|
|
242
|
-
self._license_key = license_key
|
|
243
|
-
|
|
244
|
-
@property
|
|
245
|
-
def license_type(self) -> 'str':
|
|
246
|
-
"""Gets the license_type of this V1ProductLicense. # noqa: E501
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
:return: The license_type of this V1ProductLicense. # noqa: E501
|
|
250
|
-
:rtype: str
|
|
251
|
-
"""
|
|
252
|
-
return self._license_type
|
|
253
|
-
|
|
254
|
-
@license_type.setter
|
|
255
|
-
def license_type(self, license_type: 'str'):
|
|
256
|
-
"""Sets the license_type of this V1ProductLicense.
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
:param license_type: The license_type of this V1ProductLicense. # noqa: E501
|
|
260
|
-
:type: str
|
|
261
|
-
"""
|
|
262
|
-
|
|
263
|
-
self._license_type = license_type
|
|
264
|
-
|
|
265
|
-
@property
|
|
266
|
-
def owner_name(self) -> 'str':
|
|
267
|
-
"""Gets the owner_name of this V1ProductLicense. # noqa: E501
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
:return: The owner_name of this V1ProductLicense. # noqa: E501
|
|
271
|
-
:rtype: str
|
|
272
|
-
"""
|
|
273
|
-
return self._owner_name
|
|
274
|
-
|
|
275
|
-
@owner_name.setter
|
|
276
|
-
def owner_name(self, owner_name: 'str'):
|
|
277
|
-
"""Sets the owner_name of this V1ProductLicense.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
:param owner_name: The owner_name of this V1ProductLicense. # noqa: E501
|
|
281
|
-
:type: str
|
|
282
|
-
"""
|
|
283
|
-
|
|
284
|
-
self._owner_name = owner_name
|
|
285
|
-
|
|
286
|
-
@property
|
|
287
|
-
def owner_type(self) -> 'str':
|
|
288
|
-
"""Gets the owner_type of this V1ProductLicense. # noqa: E501
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
:return: The owner_type of this V1ProductLicense. # noqa: E501
|
|
292
|
-
:rtype: str
|
|
293
|
-
"""
|
|
294
|
-
return self._owner_type
|
|
295
|
-
|
|
296
|
-
@owner_type.setter
|
|
297
|
-
def owner_type(self, owner_type: 'str'):
|
|
298
|
-
"""Sets the owner_type of this V1ProductLicense.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
:param owner_type: The owner_type of this V1ProductLicense. # noqa: E501
|
|
302
|
-
:type: str
|
|
303
|
-
"""
|
|
304
|
-
|
|
305
|
-
self._owner_type = owner_type
|
|
306
|
-
|
|
307
|
-
@property
|
|
308
|
-
def product_name(self) -> 'str':
|
|
309
|
-
"""Gets the product_name of this V1ProductLicense. # noqa: E501
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
:return: The product_name of this V1ProductLicense. # noqa: E501
|
|
313
|
-
:rtype: str
|
|
314
|
-
"""
|
|
315
|
-
return self._product_name
|
|
316
|
-
|
|
317
|
-
@product_name.setter
|
|
318
|
-
def product_name(self, product_name: 'str'):
|
|
319
|
-
"""Sets the product_name of this V1ProductLicense.
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
:param product_name: The product_name of this V1ProductLicense. # noqa: E501
|
|
323
|
-
:type: str
|
|
324
|
-
"""
|
|
325
|
-
|
|
326
|
-
self._product_name = product_name
|
|
327
|
-
|
|
328
|
-
@property
|
|
329
|
-
def product_type(self) -> 'str':
|
|
330
|
-
"""Gets the product_type of this V1ProductLicense. # noqa: E501
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
:return: The product_type of this V1ProductLicense. # noqa: E501
|
|
334
|
-
:rtype: str
|
|
335
|
-
"""
|
|
336
|
-
return self._product_type
|
|
337
|
-
|
|
338
|
-
@product_type.setter
|
|
339
|
-
def product_type(self, product_type: 'str'):
|
|
340
|
-
"""Sets the product_type of this V1ProductLicense.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
:param product_type: The product_type of this V1ProductLicense. # noqa: E501
|
|
344
|
-
:type: str
|
|
345
|
-
"""
|
|
346
|
-
|
|
347
|
-
self._product_type = product_type
|
|
348
|
-
|
|
349
|
-
@property
|
|
350
|
-
def product_version(self) -> 'str':
|
|
351
|
-
"""Gets the product_version of this V1ProductLicense. # noqa: E501
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
:return: The product_version of this V1ProductLicense. # noqa: E501
|
|
355
|
-
:rtype: str
|
|
356
|
-
"""
|
|
357
|
-
return self._product_version
|
|
358
|
-
|
|
359
|
-
@product_version.setter
|
|
360
|
-
def product_version(self, product_version: 'str'):
|
|
361
|
-
"""Sets the product_version of this V1ProductLicense.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
:param product_version: The product_version of this V1ProductLicense. # noqa: E501
|
|
365
|
-
:type: str
|
|
366
|
-
"""
|
|
367
|
-
|
|
368
|
-
self._product_version = product_version
|
|
369
|
-
|
|
370
|
-
@property
|
|
371
|
-
def updated_at(self) -> 'datetime':
|
|
372
|
-
"""Gets the updated_at of this V1ProductLicense. # noqa: E501
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
:return: The updated_at of this V1ProductLicense. # noqa: E501
|
|
376
|
-
:rtype: datetime
|
|
377
|
-
"""
|
|
378
|
-
return self._updated_at
|
|
379
|
-
|
|
380
|
-
@updated_at.setter
|
|
381
|
-
def updated_at(self, updated_at: 'datetime'):
|
|
382
|
-
"""Sets the updated_at of this V1ProductLicense.
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
:param updated_at: The updated_at of this V1ProductLicense. # noqa: E501
|
|
386
|
-
:type: datetime
|
|
387
|
-
"""
|
|
388
|
-
|
|
389
|
-
self._updated_at = updated_at
|
|
390
|
-
|
|
391
|
-
def to_dict(self) -> dict:
|
|
392
|
-
"""Returns the model properties as a dict"""
|
|
393
|
-
result = {}
|
|
394
|
-
|
|
395
|
-
for attr, _ in six.iteritems(self.swagger_types):
|
|
396
|
-
value = getattr(self, attr)
|
|
397
|
-
if isinstance(value, list):
|
|
398
|
-
result[attr] = list(map(
|
|
399
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
400
|
-
value
|
|
401
|
-
))
|
|
402
|
-
elif hasattr(value, "to_dict"):
|
|
403
|
-
result[attr] = value.to_dict()
|
|
404
|
-
elif isinstance(value, dict):
|
|
405
|
-
result[attr] = dict(map(
|
|
406
|
-
lambda item: (item[0], item[1].to_dict())
|
|
407
|
-
if hasattr(item[1], "to_dict") else item,
|
|
408
|
-
value.items()
|
|
409
|
-
))
|
|
410
|
-
else:
|
|
411
|
-
result[attr] = value
|
|
412
|
-
if issubclass(V1ProductLicense, dict):
|
|
413
|
-
for key, value in self.items():
|
|
414
|
-
result[key] = value
|
|
415
|
-
|
|
416
|
-
return result
|
|
417
|
-
|
|
418
|
-
def to_str(self) -> str:
|
|
419
|
-
"""Returns the string representation of the model"""
|
|
420
|
-
return pprint.pformat(self.to_dict())
|
|
421
|
-
|
|
422
|
-
def __repr__(self) -> str:
|
|
423
|
-
"""For `print` and `pprint`"""
|
|
424
|
-
return self.to_str()
|
|
425
|
-
|
|
426
|
-
def __eq__(self, other: 'V1ProductLicense') -> bool:
|
|
427
|
-
"""Returns true if both objects are equal"""
|
|
428
|
-
if not isinstance(other, V1ProductLicense):
|
|
429
|
-
return False
|
|
430
|
-
|
|
431
|
-
return self.__dict__ == other.__dict__
|
|
432
|
-
|
|
433
|
-
def __ne__(self, other: 'V1ProductLicense') -> bool:
|
|
434
|
-
"""Returns true if both objects are not equal"""
|
|
435
|
-
return not self == other
|