lightning-sdk 0.1.53__py3-none-any.whl → 0.1.55__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 +1 -1
- lightning_sdk/api/deployment_api.py +9 -1
- lightning_sdk/api/job_api.py +1 -1
- lightning_sdk/api/lit_container_api.py +29 -8
- lightning_sdk/cli/delete.py +27 -0
- lightning_sdk/cli/entrypoint.py +6 -0
- lightning_sdk/cli/generate.py +58 -0
- lightning_sdk/cli/list.py +48 -0
- lightning_sdk/cli/start.py +43 -0
- lightning_sdk/cli/stop.py +26 -0
- lightning_sdk/cli/switch.py +43 -0
- lightning_sdk/deployment/deployment.py +12 -3
- lightning_sdk/job/base.py +7 -2
- lightning_sdk/job/job.py +1 -12
- lightning_sdk/job/v1.py +1 -32
- lightning_sdk/job/v2.py +6 -1
- lightning_sdk/lightning_cloud/openapi/__init__.py +2 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +10 -2
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +210 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_usagerestrictions_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/usagerestrictions_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +3 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +55 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_registry_repository_image_artifact_versions_response.py +231 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_artifact.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -53
- lightning_sdk/mmt/mmt.py +7 -6
- lightning_sdk/plugin.py +5 -3
- {lightning_sdk-0.1.53.dist-info → lightning_sdk-0.1.55.dist-info}/METADATA +1 -1
- {lightning_sdk-0.1.53.dist-info → lightning_sdk-0.1.55.dist-info}/RECORD +38 -33
- {lightning_sdk-0.1.53.dist-info → lightning_sdk-0.1.55.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.53.dist-info → lightning_sdk-0.1.55.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.53.dist-info → lightning_sdk-0.1.55.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.53.dist-info → lightning_sdk-0.1.55.dist-info}/top_level.txt +0 -0
|
@@ -42,23 +42,33 @@ class V1LambdaLabsDirectV1(object):
|
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'credentials_secret_id': 'str',
|
|
45
|
-
'parent_cluster_id': 'str'
|
|
45
|
+
'parent_cluster_id': 'str',
|
|
46
|
+
'primary_region': 'str',
|
|
47
|
+
'regions': 'list[str]'
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
attribute_map = {
|
|
49
51
|
'credentials_secret_id': 'credentialsSecretId',
|
|
50
|
-
'parent_cluster_id': 'parentClusterId'
|
|
52
|
+
'parent_cluster_id': 'parentClusterId',
|
|
53
|
+
'primary_region': 'primaryRegion',
|
|
54
|
+
'regions': 'regions'
|
|
51
55
|
}
|
|
52
56
|
|
|
53
|
-
def __init__(self, credentials_secret_id: 'str' =None, parent_cluster_id: 'str' =None): # noqa: E501
|
|
57
|
+
def __init__(self, credentials_secret_id: 'str' =None, parent_cluster_id: 'str' =None, primary_region: 'str' =None, regions: 'list[str]' =None): # noqa: E501
|
|
54
58
|
"""V1LambdaLabsDirectV1 - a model defined in Swagger""" # noqa: E501
|
|
55
59
|
self._credentials_secret_id = None
|
|
56
60
|
self._parent_cluster_id = None
|
|
61
|
+
self._primary_region = None
|
|
62
|
+
self._regions = None
|
|
57
63
|
self.discriminator = None
|
|
58
64
|
if credentials_secret_id is not None:
|
|
59
65
|
self.credentials_secret_id = credentials_secret_id
|
|
60
66
|
if parent_cluster_id is not None:
|
|
61
67
|
self.parent_cluster_id = parent_cluster_id
|
|
68
|
+
if primary_region is not None:
|
|
69
|
+
self.primary_region = primary_region
|
|
70
|
+
if regions is not None:
|
|
71
|
+
self.regions = regions
|
|
62
72
|
|
|
63
73
|
@property
|
|
64
74
|
def credentials_secret_id(self) -> 'str':
|
|
@@ -106,6 +116,48 @@ class V1LambdaLabsDirectV1(object):
|
|
|
106
116
|
|
|
107
117
|
self._parent_cluster_id = parent_cluster_id
|
|
108
118
|
|
|
119
|
+
@property
|
|
120
|
+
def primary_region(self) -> 'str':
|
|
121
|
+
"""Gets the primary_region of this V1LambdaLabsDirectV1. # noqa: E501
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
:return: The primary_region of this V1LambdaLabsDirectV1. # noqa: E501
|
|
125
|
+
:rtype: str
|
|
126
|
+
"""
|
|
127
|
+
return self._primary_region
|
|
128
|
+
|
|
129
|
+
@primary_region.setter
|
|
130
|
+
def primary_region(self, primary_region: 'str'):
|
|
131
|
+
"""Sets the primary_region of this V1LambdaLabsDirectV1.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:param primary_region: The primary_region of this V1LambdaLabsDirectV1. # noqa: E501
|
|
135
|
+
:type: str
|
|
136
|
+
"""
|
|
137
|
+
|
|
138
|
+
self._primary_region = primary_region
|
|
139
|
+
|
|
140
|
+
@property
|
|
141
|
+
def regions(self) -> 'list[str]':
|
|
142
|
+
"""Gets the regions of this V1LambdaLabsDirectV1. # noqa: E501
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
:return: The regions of this V1LambdaLabsDirectV1. # noqa: E501
|
|
146
|
+
:rtype: list[str]
|
|
147
|
+
"""
|
|
148
|
+
return self._regions
|
|
149
|
+
|
|
150
|
+
@regions.setter
|
|
151
|
+
def regions(self, regions: 'list[str]'):
|
|
152
|
+
"""Sets the regions of this V1LambdaLabsDirectV1.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
:param regions: The regions of this V1LambdaLabsDirectV1. # noqa: E501
|
|
156
|
+
:type: list[str]
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
self._regions = regions
|
|
160
|
+
|
|
109
161
|
def to_dict(self) -> dict:
|
|
110
162
|
"""Returns the model properties as a dict"""
|
|
111
163
|
result = {}
|
|
@@ -0,0 +1,231 @@
|
|
|
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 V1ListLitRegistryRepositoryImageArtifactVersionsResponse(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
|
+
'artifacts': 'list[V1LitRegistryArtifact]',
|
|
45
|
+
'latest_artifact': 'V1LitRegistryArtifact',
|
|
46
|
+
'latest_tag_name': 'str',
|
|
47
|
+
'lit_repo_name': 'str',
|
|
48
|
+
'project_id': 'str'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
attribute_map = {
|
|
52
|
+
'artifacts': 'artifacts',
|
|
53
|
+
'latest_artifact': 'latestArtifact',
|
|
54
|
+
'latest_tag_name': 'latestTagName',
|
|
55
|
+
'lit_repo_name': 'litRepoName',
|
|
56
|
+
'project_id': 'projectId'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
def __init__(self, artifacts: 'list[V1LitRegistryArtifact]' =None, latest_artifact: 'V1LitRegistryArtifact' =None, latest_tag_name: 'str' =None, lit_repo_name: 'str' =None, project_id: 'str' =None): # noqa: E501
|
|
60
|
+
"""V1ListLitRegistryRepositoryImageArtifactVersionsResponse - a model defined in Swagger""" # noqa: E501
|
|
61
|
+
self._artifacts = None
|
|
62
|
+
self._latest_artifact = None
|
|
63
|
+
self._latest_tag_name = None
|
|
64
|
+
self._lit_repo_name = None
|
|
65
|
+
self._project_id = None
|
|
66
|
+
self.discriminator = None
|
|
67
|
+
if artifacts is not None:
|
|
68
|
+
self.artifacts = artifacts
|
|
69
|
+
if latest_artifact is not None:
|
|
70
|
+
self.latest_artifact = latest_artifact
|
|
71
|
+
if latest_tag_name is not None:
|
|
72
|
+
self.latest_tag_name = latest_tag_name
|
|
73
|
+
if lit_repo_name is not None:
|
|
74
|
+
self.lit_repo_name = lit_repo_name
|
|
75
|
+
if project_id is not None:
|
|
76
|
+
self.project_id = project_id
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def artifacts(self) -> 'list[V1LitRegistryArtifact]':
|
|
80
|
+
"""Gets the artifacts of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
81
|
+
|
|
82
|
+
will contain all artifacts and tags excluding the latest. # noqa: E501
|
|
83
|
+
|
|
84
|
+
:return: The artifacts of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
85
|
+
:rtype: list[V1LitRegistryArtifact]
|
|
86
|
+
"""
|
|
87
|
+
return self._artifacts
|
|
88
|
+
|
|
89
|
+
@artifacts.setter
|
|
90
|
+
def artifacts(self, artifacts: 'list[V1LitRegistryArtifact]'):
|
|
91
|
+
"""Sets the artifacts of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse.
|
|
92
|
+
|
|
93
|
+
will contain all artifacts and tags excluding the latest. # noqa: E501
|
|
94
|
+
|
|
95
|
+
:param artifacts: The artifacts of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
96
|
+
:type: list[V1LitRegistryArtifact]
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
self._artifacts = artifacts
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def latest_artifact(self) -> 'V1LitRegistryArtifact':
|
|
103
|
+
"""Gets the latest_artifact of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
:return: The latest_artifact of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
107
|
+
:rtype: V1LitRegistryArtifact
|
|
108
|
+
"""
|
|
109
|
+
return self._latest_artifact
|
|
110
|
+
|
|
111
|
+
@latest_artifact.setter
|
|
112
|
+
def latest_artifact(self, latest_artifact: 'V1LitRegistryArtifact'):
|
|
113
|
+
"""Sets the latest_artifact of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse.
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
:param latest_artifact: The latest_artifact of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
117
|
+
:type: V1LitRegistryArtifact
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
self._latest_artifact = latest_artifact
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def latest_tag_name(self) -> 'str':
|
|
124
|
+
"""Gets the latest_tag_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
125
|
+
|
|
126
|
+
We'll search for artifacts where artifacts[0].tags[X].name == latest else, most recent push_time. Also, latest_tag_name is allowed to be empty since you don't technically have to tag any of your artifacts. If this is empty we will fallback to entering in \"latest\" inside the versions table in the UI. # noqa: E501
|
|
127
|
+
|
|
128
|
+
:return: The latest_tag_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
129
|
+
:rtype: str
|
|
130
|
+
"""
|
|
131
|
+
return self._latest_tag_name
|
|
132
|
+
|
|
133
|
+
@latest_tag_name.setter
|
|
134
|
+
def latest_tag_name(self, latest_tag_name: 'str'):
|
|
135
|
+
"""Sets the latest_tag_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse.
|
|
136
|
+
|
|
137
|
+
We'll search for artifacts where artifacts[0].tags[X].name == latest else, most recent push_time. Also, latest_tag_name is allowed to be empty since you don't technically have to tag any of your artifacts. If this is empty we will fallback to entering in \"latest\" inside the versions table in the UI. # noqa: E501
|
|
138
|
+
|
|
139
|
+
:param latest_tag_name: The latest_tag_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
140
|
+
:type: str
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
self._latest_tag_name = latest_tag_name
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def lit_repo_name(self) -> 'str':
|
|
147
|
+
"""Gets the lit_repo_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
:return: The lit_repo_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
151
|
+
:rtype: str
|
|
152
|
+
"""
|
|
153
|
+
return self._lit_repo_name
|
|
154
|
+
|
|
155
|
+
@lit_repo_name.setter
|
|
156
|
+
def lit_repo_name(self, lit_repo_name: 'str'):
|
|
157
|
+
"""Sets the lit_repo_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse.
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
:param lit_repo_name: The lit_repo_name of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
161
|
+
:type: str
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
self._lit_repo_name = lit_repo_name
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def project_id(self) -> 'str':
|
|
168
|
+
"""Gets the project_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
:return: The project_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
172
|
+
:rtype: str
|
|
173
|
+
"""
|
|
174
|
+
return self._project_id
|
|
175
|
+
|
|
176
|
+
@project_id.setter
|
|
177
|
+
def project_id(self, project_id: 'str'):
|
|
178
|
+
"""Sets the project_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse.
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
:param project_id: The project_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
|
|
182
|
+
:type: str
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
self._project_id = project_id
|
|
186
|
+
|
|
187
|
+
def to_dict(self) -> dict:
|
|
188
|
+
"""Returns the model properties as a dict"""
|
|
189
|
+
result = {}
|
|
190
|
+
|
|
191
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
192
|
+
value = getattr(self, attr)
|
|
193
|
+
if isinstance(value, list):
|
|
194
|
+
result[attr] = list(map(
|
|
195
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
196
|
+
value
|
|
197
|
+
))
|
|
198
|
+
elif hasattr(value, "to_dict"):
|
|
199
|
+
result[attr] = value.to_dict()
|
|
200
|
+
elif isinstance(value, dict):
|
|
201
|
+
result[attr] = dict(map(
|
|
202
|
+
lambda item: (item[0], item[1].to_dict())
|
|
203
|
+
if hasattr(item[1], "to_dict") else item,
|
|
204
|
+
value.items()
|
|
205
|
+
))
|
|
206
|
+
else:
|
|
207
|
+
result[attr] = value
|
|
208
|
+
if issubclass(V1ListLitRegistryRepositoryImageArtifactVersionsResponse, dict):
|
|
209
|
+
for key, value in self.items():
|
|
210
|
+
result[key] = value
|
|
211
|
+
|
|
212
|
+
return result
|
|
213
|
+
|
|
214
|
+
def to_str(self) -> str:
|
|
215
|
+
"""Returns the string representation of the model"""
|
|
216
|
+
return pprint.pformat(self.to_dict())
|
|
217
|
+
|
|
218
|
+
def __repr__(self) -> str:
|
|
219
|
+
"""For `print` and `pprint`"""
|
|
220
|
+
return self.to_str()
|
|
221
|
+
|
|
222
|
+
def __eq__(self, other: 'V1ListLitRegistryRepositoryImageArtifactVersionsResponse') -> bool:
|
|
223
|
+
"""Returns true if both objects are equal"""
|
|
224
|
+
if not isinstance(other, V1ListLitRegistryRepositoryImageArtifactVersionsResponse):
|
|
225
|
+
return False
|
|
226
|
+
|
|
227
|
+
return self.__dict__ == other.__dict__
|
|
228
|
+
|
|
229
|
+
def __ne__(self, other: 'V1ListLitRegistryRepositoryImageArtifactVersionsResponse') -> bool:
|
|
230
|
+
"""Returns true if both objects are not equal"""
|
|
231
|
+
return not self == other
|
|
@@ -0,0 +1,253 @@
|
|
|
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 V1LitRegistryArtifact(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
|
+
'full_hash_digest': 'str',
|
|
45
|
+
'pull_time': 'datetime',
|
|
46
|
+
'push_time': 'datetime',
|
|
47
|
+
'short_hash_digest': 'str',
|
|
48
|
+
'size': 'str',
|
|
49
|
+
'tag_name': 'str'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
attribute_map = {
|
|
53
|
+
'full_hash_digest': 'fullHashDigest',
|
|
54
|
+
'pull_time': 'pullTime',
|
|
55
|
+
'push_time': 'pushTime',
|
|
56
|
+
'short_hash_digest': 'shortHashDigest',
|
|
57
|
+
'size': 'size',
|
|
58
|
+
'tag_name': 'tagName'
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
def __init__(self, full_hash_digest: 'str' =None, pull_time: 'datetime' =None, push_time: 'datetime' =None, short_hash_digest: 'str' =None, size: 'str' =None, tag_name: 'str' =None): # noqa: E501
|
|
62
|
+
"""V1LitRegistryArtifact - a model defined in Swagger""" # noqa: E501
|
|
63
|
+
self._full_hash_digest = None
|
|
64
|
+
self._pull_time = None
|
|
65
|
+
self._push_time = None
|
|
66
|
+
self._short_hash_digest = None
|
|
67
|
+
self._size = None
|
|
68
|
+
self._tag_name = None
|
|
69
|
+
self.discriminator = None
|
|
70
|
+
if full_hash_digest is not None:
|
|
71
|
+
self.full_hash_digest = full_hash_digest
|
|
72
|
+
if pull_time is not None:
|
|
73
|
+
self.pull_time = pull_time
|
|
74
|
+
if push_time is not None:
|
|
75
|
+
self.push_time = push_time
|
|
76
|
+
if short_hash_digest is not None:
|
|
77
|
+
self.short_hash_digest = short_hash_digest
|
|
78
|
+
if size is not None:
|
|
79
|
+
self.size = size
|
|
80
|
+
if tag_name is not None:
|
|
81
|
+
self.tag_name = tag_name
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def full_hash_digest(self) -> 'str':
|
|
85
|
+
"""Gets the full_hash_digest of this V1LitRegistryArtifact. # noqa: E501
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:return: The full_hash_digest of this V1LitRegistryArtifact. # noqa: E501
|
|
89
|
+
:rtype: str
|
|
90
|
+
"""
|
|
91
|
+
return self._full_hash_digest
|
|
92
|
+
|
|
93
|
+
@full_hash_digest.setter
|
|
94
|
+
def full_hash_digest(self, full_hash_digest: 'str'):
|
|
95
|
+
"""Sets the full_hash_digest of this V1LitRegistryArtifact.
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
:param full_hash_digest: The full_hash_digest of this V1LitRegistryArtifact. # noqa: E501
|
|
99
|
+
:type: str
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
self._full_hash_digest = full_hash_digest
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def pull_time(self) -> 'datetime':
|
|
106
|
+
"""Gets the pull_time of this V1LitRegistryArtifact. # noqa: E501
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
:return: The pull_time of this V1LitRegistryArtifact. # noqa: E501
|
|
110
|
+
:rtype: datetime
|
|
111
|
+
"""
|
|
112
|
+
return self._pull_time
|
|
113
|
+
|
|
114
|
+
@pull_time.setter
|
|
115
|
+
def pull_time(self, pull_time: 'datetime'):
|
|
116
|
+
"""Sets the pull_time of this V1LitRegistryArtifact.
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
:param pull_time: The pull_time of this V1LitRegistryArtifact. # noqa: E501
|
|
120
|
+
:type: datetime
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
self._pull_time = pull_time
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def push_time(self) -> 'datetime':
|
|
127
|
+
"""Gets the push_time of this V1LitRegistryArtifact. # noqa: E501
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
:return: The push_time of this V1LitRegistryArtifact. # noqa: E501
|
|
131
|
+
:rtype: datetime
|
|
132
|
+
"""
|
|
133
|
+
return self._push_time
|
|
134
|
+
|
|
135
|
+
@push_time.setter
|
|
136
|
+
def push_time(self, push_time: 'datetime'):
|
|
137
|
+
"""Sets the push_time of this V1LitRegistryArtifact.
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
:param push_time: The push_time of this V1LitRegistryArtifact. # noqa: E501
|
|
141
|
+
:type: datetime
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
self._push_time = push_time
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def short_hash_digest(self) -> 'str':
|
|
148
|
+
"""Gets the short_hash_digest of this V1LitRegistryArtifact. # noqa: E501
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
:return: The short_hash_digest of this V1LitRegistryArtifact. # noqa: E501
|
|
152
|
+
:rtype: str
|
|
153
|
+
"""
|
|
154
|
+
return self._short_hash_digest
|
|
155
|
+
|
|
156
|
+
@short_hash_digest.setter
|
|
157
|
+
def short_hash_digest(self, short_hash_digest: 'str'):
|
|
158
|
+
"""Sets the short_hash_digest of this V1LitRegistryArtifact.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
:param short_hash_digest: The short_hash_digest of this V1LitRegistryArtifact. # noqa: E501
|
|
162
|
+
:type: str
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
self._short_hash_digest = short_hash_digest
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def size(self) -> 'str':
|
|
169
|
+
"""Gets the size of this V1LitRegistryArtifact. # noqa: E501
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
:return: The size of this V1LitRegistryArtifact. # noqa: E501
|
|
173
|
+
:rtype: str
|
|
174
|
+
"""
|
|
175
|
+
return self._size
|
|
176
|
+
|
|
177
|
+
@size.setter
|
|
178
|
+
def size(self, size: 'str'):
|
|
179
|
+
"""Sets the size of this V1LitRegistryArtifact.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
:param size: The size of this V1LitRegistryArtifact. # noqa: E501
|
|
183
|
+
:type: str
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
self._size = size
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def tag_name(self) -> 'str':
|
|
190
|
+
"""Gets the tag_name of this V1LitRegistryArtifact. # noqa: E501
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
:return: The tag_name of this V1LitRegistryArtifact. # noqa: E501
|
|
194
|
+
:rtype: str
|
|
195
|
+
"""
|
|
196
|
+
return self._tag_name
|
|
197
|
+
|
|
198
|
+
@tag_name.setter
|
|
199
|
+
def tag_name(self, tag_name: 'str'):
|
|
200
|
+
"""Sets the tag_name of this V1LitRegistryArtifact.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
:param tag_name: The tag_name of this V1LitRegistryArtifact. # noqa: E501
|
|
204
|
+
:type: str
|
|
205
|
+
"""
|
|
206
|
+
|
|
207
|
+
self._tag_name = tag_name
|
|
208
|
+
|
|
209
|
+
def to_dict(self) -> dict:
|
|
210
|
+
"""Returns the model properties as a dict"""
|
|
211
|
+
result = {}
|
|
212
|
+
|
|
213
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
214
|
+
value = getattr(self, attr)
|
|
215
|
+
if isinstance(value, list):
|
|
216
|
+
result[attr] = list(map(
|
|
217
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
218
|
+
value
|
|
219
|
+
))
|
|
220
|
+
elif hasattr(value, "to_dict"):
|
|
221
|
+
result[attr] = value.to_dict()
|
|
222
|
+
elif isinstance(value, dict):
|
|
223
|
+
result[attr] = dict(map(
|
|
224
|
+
lambda item: (item[0], item[1].to_dict())
|
|
225
|
+
if hasattr(item[1], "to_dict") else item,
|
|
226
|
+
value.items()
|
|
227
|
+
))
|
|
228
|
+
else:
|
|
229
|
+
result[attr] = value
|
|
230
|
+
if issubclass(V1LitRegistryArtifact, dict):
|
|
231
|
+
for key, value in self.items():
|
|
232
|
+
result[key] = value
|
|
233
|
+
|
|
234
|
+
return result
|
|
235
|
+
|
|
236
|
+
def to_str(self) -> str:
|
|
237
|
+
"""Returns the string representation of the model"""
|
|
238
|
+
return pprint.pformat(self.to_dict())
|
|
239
|
+
|
|
240
|
+
def __repr__(self) -> str:
|
|
241
|
+
"""For `print` and `pprint`"""
|
|
242
|
+
return self.to_str()
|
|
243
|
+
|
|
244
|
+
def __eq__(self, other: 'V1LitRegistryArtifact') -> bool:
|
|
245
|
+
"""Returns true if both objects are equal"""
|
|
246
|
+
if not isinstance(other, V1LitRegistryArtifact):
|
|
247
|
+
return False
|
|
248
|
+
|
|
249
|
+
return self.__dict__ == other.__dict__
|
|
250
|
+
|
|
251
|
+
def __ne__(self, other: 'V1LitRegistryArtifact') -> bool:
|
|
252
|
+
"""Returns true if both objects are not equal"""
|
|
253
|
+
return not self == other
|