lightning-sdk 0.2.12__py3-none-any.whl → 0.2.13__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/llm_api.py +17 -5
- lightning_sdk/api/studio_api.py +17 -0
- lightning_sdk/cli/entrypoint.py +1 -1
- lightning_sdk/cli/serve.py +149 -39
- lightning_sdk/deployment/deployment.py +2 -2
- lightning_sdk/lightning_cloud/openapi/__init__.py +6 -0
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/git_credentials_service_api.py +497 -0
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +14 -5
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +5 -0
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_git_credentials_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_git_credentials_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_state.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_git_credentials.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_git_credentials_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_job_resources_response.py +15 -15
- lightning_sdk/lightning_cloud/openapi/models/v1_nebius_direct_v1.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -1
- lightning_sdk/llm/llm.py +92 -30
- lightning_sdk/plugin.py +19 -0
- lightning_sdk/studio.py +33 -0
- {lightning_sdk-0.2.12.dist-info → lightning_sdk-0.2.13.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.12.dist-info → lightning_sdk-0.2.13.dist-info}/RECORD +34 -28
- /lightning_sdk/cli/{docker.py → docker_cli.py} +0 -0
- {lightning_sdk-0.2.12.dist-info → lightning_sdk-0.2.13.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.12.dist-info → lightning_sdk-0.2.13.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.12.dist-info → lightning_sdk-0.2.13.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.12.dist-info → lightning_sdk-0.2.13.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
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 V1GitCredentials(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
|
+
'created_at': 'datetime',
|
|
45
|
+
'git_username': 'str',
|
|
46
|
+
'id': 'str',
|
|
47
|
+
'last_modified': 'datetime',
|
|
48
|
+
'registry_url': 'str'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
attribute_map = {
|
|
52
|
+
'created_at': 'createdAt',
|
|
53
|
+
'git_username': 'gitUsername',
|
|
54
|
+
'id': 'id',
|
|
55
|
+
'last_modified': 'lastModified',
|
|
56
|
+
'registry_url': 'registryUrl'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
def __init__(self, created_at: 'datetime' =None, git_username: 'str' =None, id: 'str' =None, last_modified: 'datetime' =None, registry_url: 'str' =None): # noqa: E501
|
|
60
|
+
"""V1GitCredentials - a model defined in Swagger""" # noqa: E501
|
|
61
|
+
self._created_at = None
|
|
62
|
+
self._git_username = None
|
|
63
|
+
self._id = None
|
|
64
|
+
self._last_modified = None
|
|
65
|
+
self._registry_url = None
|
|
66
|
+
self.discriminator = None
|
|
67
|
+
if created_at is not None:
|
|
68
|
+
self.created_at = created_at
|
|
69
|
+
if git_username is not None:
|
|
70
|
+
self.git_username = git_username
|
|
71
|
+
if id is not None:
|
|
72
|
+
self.id = id
|
|
73
|
+
if last_modified is not None:
|
|
74
|
+
self.last_modified = last_modified
|
|
75
|
+
if registry_url is not None:
|
|
76
|
+
self.registry_url = registry_url
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def created_at(self) -> 'datetime':
|
|
80
|
+
"""Gets the created_at of this V1GitCredentials. # noqa: E501
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:return: The created_at of this V1GitCredentials. # noqa: E501
|
|
84
|
+
:rtype: datetime
|
|
85
|
+
"""
|
|
86
|
+
return self._created_at
|
|
87
|
+
|
|
88
|
+
@created_at.setter
|
|
89
|
+
def created_at(self, created_at: 'datetime'):
|
|
90
|
+
"""Sets the created_at of this V1GitCredentials.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
:param created_at: The created_at of this V1GitCredentials. # noqa: E501
|
|
94
|
+
:type: datetime
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
self._created_at = created_at
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def git_username(self) -> 'str':
|
|
101
|
+
"""Gets the git_username of this V1GitCredentials. # noqa: E501
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:return: The git_username of this V1GitCredentials. # noqa: E501
|
|
105
|
+
:rtype: str
|
|
106
|
+
"""
|
|
107
|
+
return self._git_username
|
|
108
|
+
|
|
109
|
+
@git_username.setter
|
|
110
|
+
def git_username(self, git_username: 'str'):
|
|
111
|
+
"""Sets the git_username of this V1GitCredentials.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
:param git_username: The git_username of this V1GitCredentials. # noqa: E501
|
|
115
|
+
:type: str
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
self._git_username = git_username
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def id(self) -> 'str':
|
|
122
|
+
"""Gets the id of this V1GitCredentials. # noqa: E501
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:return: The id of this V1GitCredentials. # noqa: E501
|
|
126
|
+
:rtype: str
|
|
127
|
+
"""
|
|
128
|
+
return self._id
|
|
129
|
+
|
|
130
|
+
@id.setter
|
|
131
|
+
def id(self, id: 'str'):
|
|
132
|
+
"""Sets the id of this V1GitCredentials.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param id: The id of this V1GitCredentials. # noqa: E501
|
|
136
|
+
:type: str
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
self._id = id
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def last_modified(self) -> 'datetime':
|
|
143
|
+
"""Gets the last_modified of this V1GitCredentials. # noqa: E501
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
:return: The last_modified of this V1GitCredentials. # noqa: E501
|
|
147
|
+
:rtype: datetime
|
|
148
|
+
"""
|
|
149
|
+
return self._last_modified
|
|
150
|
+
|
|
151
|
+
@last_modified.setter
|
|
152
|
+
def last_modified(self, last_modified: 'datetime'):
|
|
153
|
+
"""Sets the last_modified of this V1GitCredentials.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
:param last_modified: The last_modified of this V1GitCredentials. # noqa: E501
|
|
157
|
+
:type: datetime
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
self._last_modified = last_modified
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def registry_url(self) -> 'str':
|
|
164
|
+
"""Gets the registry_url of this V1GitCredentials. # noqa: E501
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
:return: The registry_url of this V1GitCredentials. # noqa: E501
|
|
168
|
+
:rtype: str
|
|
169
|
+
"""
|
|
170
|
+
return self._registry_url
|
|
171
|
+
|
|
172
|
+
@registry_url.setter
|
|
173
|
+
def registry_url(self, registry_url: 'str'):
|
|
174
|
+
"""Sets the registry_url of this V1GitCredentials.
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
:param registry_url: The registry_url of this V1GitCredentials. # noqa: E501
|
|
178
|
+
:type: str
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
self._registry_url = registry_url
|
|
182
|
+
|
|
183
|
+
def to_dict(self) -> dict:
|
|
184
|
+
"""Returns the model properties as a dict"""
|
|
185
|
+
result = {}
|
|
186
|
+
|
|
187
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
188
|
+
value = getattr(self, attr)
|
|
189
|
+
if isinstance(value, list):
|
|
190
|
+
result[attr] = list(map(
|
|
191
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
192
|
+
value
|
|
193
|
+
))
|
|
194
|
+
elif hasattr(value, "to_dict"):
|
|
195
|
+
result[attr] = value.to_dict()
|
|
196
|
+
elif isinstance(value, dict):
|
|
197
|
+
result[attr] = dict(map(
|
|
198
|
+
lambda item: (item[0], item[1].to_dict())
|
|
199
|
+
if hasattr(item[1], "to_dict") else item,
|
|
200
|
+
value.items()
|
|
201
|
+
))
|
|
202
|
+
else:
|
|
203
|
+
result[attr] = value
|
|
204
|
+
if issubclass(V1GitCredentials, dict):
|
|
205
|
+
for key, value in self.items():
|
|
206
|
+
result[key] = value
|
|
207
|
+
|
|
208
|
+
return result
|
|
209
|
+
|
|
210
|
+
def to_str(self) -> str:
|
|
211
|
+
"""Returns the string representation of the model"""
|
|
212
|
+
return pprint.pformat(self.to_dict())
|
|
213
|
+
|
|
214
|
+
def __repr__(self) -> str:
|
|
215
|
+
"""For `print` and `pprint`"""
|
|
216
|
+
return self.to_str()
|
|
217
|
+
|
|
218
|
+
def __eq__(self, other: 'V1GitCredentials') -> bool:
|
|
219
|
+
"""Returns true if both objects are equal"""
|
|
220
|
+
if not isinstance(other, V1GitCredentials):
|
|
221
|
+
return False
|
|
222
|
+
|
|
223
|
+
return self.__dict__ == other.__dict__
|
|
224
|
+
|
|
225
|
+
def __ne__(self, other: 'V1GitCredentials') -> bool:
|
|
226
|
+
"""Returns true if both objects are not equal"""
|
|
227
|
+
return not self == other
|
|
@@ -0,0 +1,123 @@
|
|
|
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 V1ListGitCredentialsResponse(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
|
+
'credentials': 'list[V1GitCredentials]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'credentials': 'credentials'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, credentials: 'list[V1GitCredentials]' =None): # noqa: E501
|
|
52
|
+
"""V1ListGitCredentialsResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._credentials = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if credentials is not None:
|
|
56
|
+
self.credentials = credentials
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def credentials(self) -> 'list[V1GitCredentials]':
|
|
60
|
+
"""Gets the credentials of this V1ListGitCredentialsResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The credentials of this V1ListGitCredentialsResponse. # noqa: E501
|
|
64
|
+
:rtype: list[V1GitCredentials]
|
|
65
|
+
"""
|
|
66
|
+
return self._credentials
|
|
67
|
+
|
|
68
|
+
@credentials.setter
|
|
69
|
+
def credentials(self, credentials: 'list[V1GitCredentials]'):
|
|
70
|
+
"""Sets the credentials of this V1ListGitCredentialsResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param credentials: The credentials of this V1ListGitCredentialsResponse. # noqa: E501
|
|
74
|
+
:type: list[V1GitCredentials]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._credentials = credentials
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict:
|
|
80
|
+
"""Returns the model properties as a dict"""
|
|
81
|
+
result = {}
|
|
82
|
+
|
|
83
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
84
|
+
value = getattr(self, attr)
|
|
85
|
+
if isinstance(value, list):
|
|
86
|
+
result[attr] = list(map(
|
|
87
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
88
|
+
value
|
|
89
|
+
))
|
|
90
|
+
elif hasattr(value, "to_dict"):
|
|
91
|
+
result[attr] = value.to_dict()
|
|
92
|
+
elif isinstance(value, dict):
|
|
93
|
+
result[attr] = dict(map(
|
|
94
|
+
lambda item: (item[0], item[1].to_dict())
|
|
95
|
+
if hasattr(item[1], "to_dict") else item,
|
|
96
|
+
value.items()
|
|
97
|
+
))
|
|
98
|
+
else:
|
|
99
|
+
result[attr] = value
|
|
100
|
+
if issubclass(V1ListGitCredentialsResponse, dict):
|
|
101
|
+
for key, value in self.items():
|
|
102
|
+
result[key] = value
|
|
103
|
+
|
|
104
|
+
return result
|
|
105
|
+
|
|
106
|
+
def to_str(self) -> str:
|
|
107
|
+
"""Returns the string representation of the model"""
|
|
108
|
+
return pprint.pformat(self.to_dict())
|
|
109
|
+
|
|
110
|
+
def __repr__(self) -> str:
|
|
111
|
+
"""For `print` and `pprint`"""
|
|
112
|
+
return self.to_str()
|
|
113
|
+
|
|
114
|
+
def __eq__(self, other: 'V1ListGitCredentialsResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1ListGitCredentialsResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1ListGitCredentialsResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -41,40 +41,40 @@ class V1ListJobResourcesResponse(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
-
'
|
|
44
|
+
'job_resources': 'list[V1JobResource]'
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
attribute_map = {
|
|
48
|
-
'
|
|
48
|
+
'job_resources': 'jobResources'
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
def __init__(self,
|
|
51
|
+
def __init__(self, job_resources: 'list[V1JobResource]' =None): # noqa: E501
|
|
52
52
|
"""V1ListJobResourcesResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
-
self.
|
|
53
|
+
self._job_resources = None
|
|
54
54
|
self.discriminator = None
|
|
55
|
-
if
|
|
56
|
-
self.
|
|
55
|
+
if job_resources is not None:
|
|
56
|
+
self.job_resources = job_resources
|
|
57
57
|
|
|
58
58
|
@property
|
|
59
|
-
def
|
|
60
|
-
"""Gets the
|
|
59
|
+
def job_resources(self) -> 'list[V1JobResource]':
|
|
60
|
+
"""Gets the job_resources of this V1ListJobResourcesResponse. # noqa: E501
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
:return: The
|
|
63
|
+
:return: The job_resources of this V1ListJobResourcesResponse. # noqa: E501
|
|
64
64
|
:rtype: list[V1JobResource]
|
|
65
65
|
"""
|
|
66
|
-
return self.
|
|
66
|
+
return self._job_resources
|
|
67
67
|
|
|
68
|
-
@
|
|
69
|
-
def
|
|
70
|
-
"""Sets the
|
|
68
|
+
@job_resources.setter
|
|
69
|
+
def job_resources(self, job_resources: 'list[V1JobResource]'):
|
|
70
|
+
"""Sets the job_resources of this V1ListJobResourcesResponse.
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
:param
|
|
73
|
+
:param job_resources: The job_resources of this V1ListJobResourcesResponse. # noqa: E501
|
|
74
74
|
:type: list[V1JobResource]
|
|
75
75
|
"""
|
|
76
76
|
|
|
77
|
-
self.
|
|
77
|
+
self._job_resources = job_resources
|
|
78
78
|
|
|
79
79
|
def to_dict(self) -> dict:
|
|
80
80
|
"""Returns the model properties as a dict"""
|
|
@@ -0,0 +1,149 @@
|
|
|
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 V1NebiusDirectV1(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
|
+
'primary_region': 'str',
|
|
45
|
+
'regions': 'list[str]'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'primary_region': 'primaryRegion',
|
|
50
|
+
'regions': 'regions'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, primary_region: 'str' =None, regions: 'list[str]' =None): # noqa: E501
|
|
54
|
+
"""V1NebiusDirectV1 - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._primary_region = None
|
|
56
|
+
self._regions = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if primary_region is not None:
|
|
59
|
+
self.primary_region = primary_region
|
|
60
|
+
if regions is not None:
|
|
61
|
+
self.regions = regions
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def primary_region(self) -> 'str':
|
|
65
|
+
"""Gets the primary_region of this V1NebiusDirectV1. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The primary_region of this V1NebiusDirectV1. # noqa: E501
|
|
69
|
+
:rtype: str
|
|
70
|
+
"""
|
|
71
|
+
return self._primary_region
|
|
72
|
+
|
|
73
|
+
@primary_region.setter
|
|
74
|
+
def primary_region(self, primary_region: 'str'):
|
|
75
|
+
"""Sets the primary_region of this V1NebiusDirectV1.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param primary_region: The primary_region of this V1NebiusDirectV1. # noqa: E501
|
|
79
|
+
:type: str
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._primary_region = primary_region
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def regions(self) -> 'list[str]':
|
|
86
|
+
"""Gets the regions of this V1NebiusDirectV1. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The regions of this V1NebiusDirectV1. # noqa: E501
|
|
90
|
+
:rtype: list[str]
|
|
91
|
+
"""
|
|
92
|
+
return self._regions
|
|
93
|
+
|
|
94
|
+
@regions.setter
|
|
95
|
+
def regions(self, regions: 'list[str]'):
|
|
96
|
+
"""Sets the regions of this V1NebiusDirectV1.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param regions: The regions of this V1NebiusDirectV1. # noqa: E501
|
|
100
|
+
:type: list[str]
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._regions = regions
|
|
104
|
+
|
|
105
|
+
def to_dict(self) -> dict:
|
|
106
|
+
"""Returns the model properties as a dict"""
|
|
107
|
+
result = {}
|
|
108
|
+
|
|
109
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
110
|
+
value = getattr(self, attr)
|
|
111
|
+
if isinstance(value, list):
|
|
112
|
+
result[attr] = list(map(
|
|
113
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
114
|
+
value
|
|
115
|
+
))
|
|
116
|
+
elif hasattr(value, "to_dict"):
|
|
117
|
+
result[attr] = value.to_dict()
|
|
118
|
+
elif isinstance(value, dict):
|
|
119
|
+
result[attr] = dict(map(
|
|
120
|
+
lambda item: (item[0], item[1].to_dict())
|
|
121
|
+
if hasattr(item[1], "to_dict") else item,
|
|
122
|
+
value.items()
|
|
123
|
+
))
|
|
124
|
+
else:
|
|
125
|
+
result[attr] = value
|
|
126
|
+
if issubclass(V1NebiusDirectV1, dict):
|
|
127
|
+
for key, value in self.items():
|
|
128
|
+
result[key] = value
|
|
129
|
+
|
|
130
|
+
return result
|
|
131
|
+
|
|
132
|
+
def to_str(self) -> str:
|
|
133
|
+
"""Returns the string representation of the model"""
|
|
134
|
+
return pprint.pformat(self.to_dict())
|
|
135
|
+
|
|
136
|
+
def __repr__(self) -> str:
|
|
137
|
+
"""For `print` and `pprint`"""
|
|
138
|
+
return self.to_str()
|
|
139
|
+
|
|
140
|
+
def __eq__(self, other: 'V1NebiusDirectV1') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1NebiusDirectV1):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1NebiusDirectV1') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|