lightning-sdk 2025.9.30__py3-none-any.whl → 2025.10.14__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/cloud_account_api.py +0 -2
- lightning_sdk/api/studio_api.py +8 -0
- lightning_sdk/base_studio.py +23 -12
- lightning_sdk/cli/base_studio/__init__.py +10 -0
- lightning_sdk/cli/base_studio/list.py +45 -0
- lightning_sdk/cli/entrypoint.py +2 -0
- lightning_sdk/cli/groups.py +7 -0
- lightning_sdk/cli/studio/connect.py +117 -22
- lightning_sdk/cli/studio/ssh.py +3 -6
- lightning_sdk/cli/utils/ssh_connection.py +8 -0
- lightning_sdk/job/job.py +5 -0
- lightning_sdk/job/v1.py +8 -0
- lightning_sdk/job/v2.py +8 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +20 -0
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +19 -19
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +1463 -240
- lightning_sdk/lightning_cloud/openapi/api/sdk_command_history_service_api.py +141 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +19 -0
- lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_visibility_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/id_transfer_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/incident_id_messages_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/incidents_id_body.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/messages_message_id_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_incidents_body.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/storage_complete_body.py +15 -15
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_transfer_metadata.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_request.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_message_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_group_pod_metrics.py +1241 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +539 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_message.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kai_scheduler_queue_metrics.py +627 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_group_pod_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_messages_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incidents_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kai_scheduler_queues_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_severity.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +157 -53
- lightning_sdk/machine.py +0 -1
- lightning_sdk/studio.py +42 -5
- lightning_sdk/utils/progress.py +32 -33
- {lightning_sdk-2025.9.30.dist-info → lightning_sdk-2025.10.14.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.9.30.dist-info → lightning_sdk-2025.10.14.dist-info}/RECORD +69 -47
- {lightning_sdk-2025.9.30.dist-info → lightning_sdk-2025.10.14.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.9.30.dist-info → lightning_sdk-2025.10.14.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.9.30.dist-info → lightning_sdk-2025.10.14.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.9.30.dist-info → lightning_sdk-2025.10.14.dist-info}/top_level.txt +0 -0
|
@@ -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 IncidentIdMessagesBody(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
|
+
'message': 'str',
|
|
45
|
+
'user_id': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'message': 'message',
|
|
50
|
+
'user_id': 'userId'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, message: 'str' =None, user_id: 'str' =None): # noqa: E501
|
|
54
|
+
"""IncidentIdMessagesBody - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._message = None
|
|
56
|
+
self._user_id = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if message is not None:
|
|
59
|
+
self.message = message
|
|
60
|
+
if user_id is not None:
|
|
61
|
+
self.user_id = user_id
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def message(self) -> 'str':
|
|
65
|
+
"""Gets the message of this IncidentIdMessagesBody. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The message of this IncidentIdMessagesBody. # noqa: E501
|
|
69
|
+
:rtype: str
|
|
70
|
+
"""
|
|
71
|
+
return self._message
|
|
72
|
+
|
|
73
|
+
@message.setter
|
|
74
|
+
def message(self, message: 'str'):
|
|
75
|
+
"""Sets the message of this IncidentIdMessagesBody.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param message: The message of this IncidentIdMessagesBody. # noqa: E501
|
|
79
|
+
:type: str
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._message = message
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def user_id(self) -> 'str':
|
|
86
|
+
"""Gets the user_id of this IncidentIdMessagesBody. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The user_id of this IncidentIdMessagesBody. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._user_id
|
|
93
|
+
|
|
94
|
+
@user_id.setter
|
|
95
|
+
def user_id(self, user_id: 'str'):
|
|
96
|
+
"""Sets the user_id of this IncidentIdMessagesBody.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param user_id: The user_id of this IncidentIdMessagesBody. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._user_id = user_id
|
|
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(IncidentIdMessagesBody, 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: 'IncidentIdMessagesBody') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, IncidentIdMessagesBody):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'IncidentIdMessagesBody') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|
|
@@ -0,0 +1,279 @@
|
|
|
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 IncidentsIdBody(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
|
+
'message': 'str',
|
|
45
|
+
'resolution_notes': 'str',
|
|
46
|
+
'resource': 'str',
|
|
47
|
+
'severity': 'V1IncidentSeverity',
|
|
48
|
+
'status': 'str',
|
|
49
|
+
'title': 'str',
|
|
50
|
+
'type': 'V1IncidentType'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
attribute_map = {
|
|
54
|
+
'message': 'message',
|
|
55
|
+
'resolution_notes': 'resolutionNotes',
|
|
56
|
+
'resource': 'resource',
|
|
57
|
+
'severity': 'severity',
|
|
58
|
+
'status': 'status',
|
|
59
|
+
'title': 'title',
|
|
60
|
+
'type': 'type'
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
def __init__(self, message: 'str' =None, resolution_notes: 'str' =None, resource: 'str' =None, severity: 'V1IncidentSeverity' =None, status: 'str' =None, title: 'str' =None, type: 'V1IncidentType' =None): # noqa: E501
|
|
64
|
+
"""IncidentsIdBody - a model defined in Swagger""" # noqa: E501
|
|
65
|
+
self._message = None
|
|
66
|
+
self._resolution_notes = None
|
|
67
|
+
self._resource = None
|
|
68
|
+
self._severity = None
|
|
69
|
+
self._status = None
|
|
70
|
+
self._title = None
|
|
71
|
+
self._type = None
|
|
72
|
+
self.discriminator = None
|
|
73
|
+
if message is not None:
|
|
74
|
+
self.message = message
|
|
75
|
+
if resolution_notes is not None:
|
|
76
|
+
self.resolution_notes = resolution_notes
|
|
77
|
+
if resource is not None:
|
|
78
|
+
self.resource = resource
|
|
79
|
+
if severity is not None:
|
|
80
|
+
self.severity = severity
|
|
81
|
+
if status is not None:
|
|
82
|
+
self.status = status
|
|
83
|
+
if title is not None:
|
|
84
|
+
self.title = title
|
|
85
|
+
if type is not None:
|
|
86
|
+
self.type = type
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def message(self) -> 'str':
|
|
90
|
+
"""Gets the message of this IncidentsIdBody. # noqa: E501
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
:return: The message of this IncidentsIdBody. # noqa: E501
|
|
94
|
+
:rtype: str
|
|
95
|
+
"""
|
|
96
|
+
return self._message
|
|
97
|
+
|
|
98
|
+
@message.setter
|
|
99
|
+
def message(self, message: 'str'):
|
|
100
|
+
"""Sets the message of this IncidentsIdBody.
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
:param message: The message of this IncidentsIdBody. # noqa: E501
|
|
104
|
+
:type: str
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
self._message = message
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def resolution_notes(self) -> 'str':
|
|
111
|
+
"""Gets the resolution_notes of this IncidentsIdBody. # noqa: E501
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
:return: The resolution_notes of this IncidentsIdBody. # noqa: E501
|
|
115
|
+
:rtype: str
|
|
116
|
+
"""
|
|
117
|
+
return self._resolution_notes
|
|
118
|
+
|
|
119
|
+
@resolution_notes.setter
|
|
120
|
+
def resolution_notes(self, resolution_notes: 'str'):
|
|
121
|
+
"""Sets the resolution_notes of this IncidentsIdBody.
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
:param resolution_notes: The resolution_notes of this IncidentsIdBody. # noqa: E501
|
|
125
|
+
:type: str
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
self._resolution_notes = resolution_notes
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def resource(self) -> 'str':
|
|
132
|
+
"""Gets the resource of this IncidentsIdBody. # noqa: E501
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:return: The resource of this IncidentsIdBody. # noqa: E501
|
|
136
|
+
:rtype: str
|
|
137
|
+
"""
|
|
138
|
+
return self._resource
|
|
139
|
+
|
|
140
|
+
@resource.setter
|
|
141
|
+
def resource(self, resource: 'str'):
|
|
142
|
+
"""Sets the resource of this IncidentsIdBody.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
:param resource: The resource of this IncidentsIdBody. # noqa: E501
|
|
146
|
+
:type: str
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
self._resource = resource
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
def severity(self) -> 'V1IncidentSeverity':
|
|
153
|
+
"""Gets the severity of this IncidentsIdBody. # noqa: E501
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
:return: The severity of this IncidentsIdBody. # noqa: E501
|
|
157
|
+
:rtype: V1IncidentSeverity
|
|
158
|
+
"""
|
|
159
|
+
return self._severity
|
|
160
|
+
|
|
161
|
+
@severity.setter
|
|
162
|
+
def severity(self, severity: 'V1IncidentSeverity'):
|
|
163
|
+
"""Sets the severity of this IncidentsIdBody.
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
:param severity: The severity of this IncidentsIdBody. # noqa: E501
|
|
167
|
+
:type: V1IncidentSeverity
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
self._severity = severity
|
|
171
|
+
|
|
172
|
+
@property
|
|
173
|
+
def status(self) -> 'str':
|
|
174
|
+
"""Gets the status of this IncidentsIdBody. # noqa: E501
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
:return: The status of this IncidentsIdBody. # noqa: E501
|
|
178
|
+
:rtype: str
|
|
179
|
+
"""
|
|
180
|
+
return self._status
|
|
181
|
+
|
|
182
|
+
@status.setter
|
|
183
|
+
def status(self, status: 'str'):
|
|
184
|
+
"""Sets the status of this IncidentsIdBody.
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
:param status: The status of this IncidentsIdBody. # noqa: E501
|
|
188
|
+
:type: str
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
self._status = status
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def title(self) -> 'str':
|
|
195
|
+
"""Gets the title of this IncidentsIdBody. # noqa: E501
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
:return: The title of this IncidentsIdBody. # noqa: E501
|
|
199
|
+
:rtype: str
|
|
200
|
+
"""
|
|
201
|
+
return self._title
|
|
202
|
+
|
|
203
|
+
@title.setter
|
|
204
|
+
def title(self, title: 'str'):
|
|
205
|
+
"""Sets the title of this IncidentsIdBody.
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
:param title: The title of this IncidentsIdBody. # noqa: E501
|
|
209
|
+
:type: str
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
self._title = title
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def type(self) -> 'V1IncidentType':
|
|
216
|
+
"""Gets the type of this IncidentsIdBody. # noqa: E501
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
:return: The type of this IncidentsIdBody. # noqa: E501
|
|
220
|
+
:rtype: V1IncidentType
|
|
221
|
+
"""
|
|
222
|
+
return self._type
|
|
223
|
+
|
|
224
|
+
@type.setter
|
|
225
|
+
def type(self, type: 'V1IncidentType'):
|
|
226
|
+
"""Sets the type of this IncidentsIdBody.
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
:param type: The type of this IncidentsIdBody. # noqa: E501
|
|
230
|
+
:type: V1IncidentType
|
|
231
|
+
"""
|
|
232
|
+
|
|
233
|
+
self._type = type
|
|
234
|
+
|
|
235
|
+
def to_dict(self) -> dict:
|
|
236
|
+
"""Returns the model properties as a dict"""
|
|
237
|
+
result = {}
|
|
238
|
+
|
|
239
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
240
|
+
value = getattr(self, attr)
|
|
241
|
+
if isinstance(value, list):
|
|
242
|
+
result[attr] = list(map(
|
|
243
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
244
|
+
value
|
|
245
|
+
))
|
|
246
|
+
elif hasattr(value, "to_dict"):
|
|
247
|
+
result[attr] = value.to_dict()
|
|
248
|
+
elif isinstance(value, dict):
|
|
249
|
+
result[attr] = dict(map(
|
|
250
|
+
lambda item: (item[0], item[1].to_dict())
|
|
251
|
+
if hasattr(item[1], "to_dict") else item,
|
|
252
|
+
value.items()
|
|
253
|
+
))
|
|
254
|
+
else:
|
|
255
|
+
result[attr] = value
|
|
256
|
+
if issubclass(IncidentsIdBody, dict):
|
|
257
|
+
for key, value in self.items():
|
|
258
|
+
result[key] = value
|
|
259
|
+
|
|
260
|
+
return result
|
|
261
|
+
|
|
262
|
+
def to_str(self) -> str:
|
|
263
|
+
"""Returns the string representation of the model"""
|
|
264
|
+
return pprint.pformat(self.to_dict())
|
|
265
|
+
|
|
266
|
+
def __repr__(self) -> str:
|
|
267
|
+
"""For `print` and `pprint`"""
|
|
268
|
+
return self.to_str()
|
|
269
|
+
|
|
270
|
+
def __eq__(self, other: 'IncidentsIdBody') -> bool:
|
|
271
|
+
"""Returns true if both objects are equal"""
|
|
272
|
+
if not isinstance(other, IncidentsIdBody):
|
|
273
|
+
return False
|
|
274
|
+
|
|
275
|
+
return self.__dict__ == other.__dict__
|
|
276
|
+
|
|
277
|
+
def __ne__(self, other: 'IncidentsIdBody') -> bool:
|
|
278
|
+
"""Returns true if both objects are not equal"""
|
|
279
|
+
return not self == other
|
|
@@ -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 MessagesMessageIdBody(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
|
+
'message': 'str',
|
|
45
|
+
'user_id': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'message': 'message',
|
|
50
|
+
'user_id': 'userId'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, message: 'str' =None, user_id: 'str' =None): # noqa: E501
|
|
54
|
+
"""MessagesMessageIdBody - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._message = None
|
|
56
|
+
self._user_id = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if message is not None:
|
|
59
|
+
self.message = message
|
|
60
|
+
if user_id is not None:
|
|
61
|
+
self.user_id = user_id
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def message(self) -> 'str':
|
|
65
|
+
"""Gets the message of this MessagesMessageIdBody. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The message of this MessagesMessageIdBody. # noqa: E501
|
|
69
|
+
:rtype: str
|
|
70
|
+
"""
|
|
71
|
+
return self._message
|
|
72
|
+
|
|
73
|
+
@message.setter
|
|
74
|
+
def message(self, message: 'str'):
|
|
75
|
+
"""Sets the message of this MessagesMessageIdBody.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param message: The message of this MessagesMessageIdBody. # noqa: E501
|
|
79
|
+
:type: str
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._message = message
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def user_id(self) -> 'str':
|
|
86
|
+
"""Gets the user_id of this MessagesMessageIdBody. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The user_id of this MessagesMessageIdBody. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._user_id
|
|
93
|
+
|
|
94
|
+
@user_id.setter
|
|
95
|
+
def user_id(self, user_id: 'str'):
|
|
96
|
+
"""Sets the user_id of this MessagesMessageIdBody.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param user_id: The user_id of this MessagesMessageIdBody. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._user_id = user_id
|
|
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(MessagesMessageIdBody, 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: 'MessagesMessageIdBody') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, MessagesMessageIdBody):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'MessagesMessageIdBody') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|