lightning-sdk 2025.10.8__py3-none-any.whl → 2025.10.22__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/cloud_account_api.py +0 -2
- lightning_sdk/api/license_api.py +26 -59
- lightning_sdk/api/studio_api.py +15 -2
- lightning_sdk/base_studio.py +30 -17
- lightning_sdk/cli/base_studio/list.py +1 -3
- lightning_sdk/cli/entrypoint.py +8 -34
- 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 +71 -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/job.py +5 -0
- lightning_sdk/job/v1.py +8 -0
- lightning_sdk/job/v2.py +8 -0
- lightning_sdk/lightning_cloud/login.py +260 -10
- lightning_sdk/lightning_cloud/openapi/__init__.py +30 -3
- 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/auth_service_api.py +97 -0
- 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/product_license_service_api.py +108 -108
- lightning_sdk/lightning_cloud/openapi/api/sdk_command_history_service_api.py +141 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +29 -3
- 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/create_machine_request_represents_the_request_to_create_a_machine.py +27 -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 +79 -1
- lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -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/license_key_validate_body.py +123 -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_license_request.py +175 -0
- 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_delete_license_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_group_pod_metrics.py +1241 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +565 -0
- 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_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_license.py +227 -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_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +79 -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_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 +209 -131
- 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 +2 -1
- lightning_sdk/studio.py +22 -2
- lightning_sdk/utils/license.py +13 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/RECORD +94 -64
- lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
- lightning_sdk/services/license.py +0 -363
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/top_level.txt +0 -0
|
@@ -41,23 +41,28 @@ class IdForkBody1(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'new_name': 'str',
|
|
44
45
|
'target_cluster_id': 'str',
|
|
45
46
|
'target_project_id': 'str',
|
|
46
47
|
'version_id': 'str'
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
attribute_map = {
|
|
51
|
+
'new_name': 'newName',
|
|
50
52
|
'target_cluster_id': 'targetClusterId',
|
|
51
53
|
'target_project_id': 'targetProjectId',
|
|
52
54
|
'version_id': 'versionId'
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
def __init__(self, target_cluster_id: 'str' =None, target_project_id: 'str' =None, version_id: 'str' =None): # noqa: E501
|
|
57
|
+
def __init__(self, new_name: 'str' =None, target_cluster_id: 'str' =None, target_project_id: 'str' =None, version_id: 'str' =None): # noqa: E501
|
|
56
58
|
"""IdForkBody1 - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self._new_name = None
|
|
57
60
|
self._target_cluster_id = None
|
|
58
61
|
self._target_project_id = None
|
|
59
62
|
self._version_id = None
|
|
60
63
|
self.discriminator = None
|
|
64
|
+
if new_name is not None:
|
|
65
|
+
self.new_name = new_name
|
|
61
66
|
if target_cluster_id is not None:
|
|
62
67
|
self.target_cluster_id = target_cluster_id
|
|
63
68
|
if target_project_id is not None:
|
|
@@ -65,6 +70,27 @@ class IdForkBody1(object):
|
|
|
65
70
|
if version_id is not None:
|
|
66
71
|
self.version_id = version_id
|
|
67
72
|
|
|
73
|
+
@property
|
|
74
|
+
def new_name(self) -> 'str':
|
|
75
|
+
"""Gets the new_name of this IdForkBody1. # noqa: E501
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:return: The new_name of this IdForkBody1. # noqa: E501
|
|
79
|
+
:rtype: str
|
|
80
|
+
"""
|
|
81
|
+
return self._new_name
|
|
82
|
+
|
|
83
|
+
@new_name.setter
|
|
84
|
+
def new_name(self, new_name: 'str'):
|
|
85
|
+
"""Sets the new_name of this IdForkBody1.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:param new_name: The new_name of this IdForkBody1. # noqa: E501
|
|
89
|
+
:type: str
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
self._new_name = new_name
|
|
93
|
+
|
|
68
94
|
@property
|
|
69
95
|
def target_cluster_id(self) -> 'str':
|
|
70
96
|
"""Gets the target_cluster_id of this IdForkBody1. # noqa: E501
|
|
@@ -41,20 +41,72 @@ class IdTransferBody(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'compute_config': 'V1UserRequestedComputeConfig',
|
|
45
|
+
'start_after_transfer': 'bool',
|
|
44
46
|
'target_cluster_id': 'str'
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
attribute_map = {
|
|
50
|
+
'compute_config': 'computeConfig',
|
|
51
|
+
'start_after_transfer': 'startAfterTransfer',
|
|
48
52
|
'target_cluster_id': 'targetClusterId'
|
|
49
53
|
}
|
|
50
54
|
|
|
51
|
-
def __init__(self, target_cluster_id: 'str' =None): # noqa: E501
|
|
55
|
+
def __init__(self, compute_config: 'V1UserRequestedComputeConfig' =None, start_after_transfer: 'bool' =None, target_cluster_id: 'str' =None): # noqa: E501
|
|
52
56
|
"""IdTransferBody - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._compute_config = None
|
|
58
|
+
self._start_after_transfer = None
|
|
53
59
|
self._target_cluster_id = None
|
|
54
60
|
self.discriminator = None
|
|
61
|
+
if compute_config is not None:
|
|
62
|
+
self.compute_config = compute_config
|
|
63
|
+
if start_after_transfer is not None:
|
|
64
|
+
self.start_after_transfer = start_after_transfer
|
|
55
65
|
if target_cluster_id is not None:
|
|
56
66
|
self.target_cluster_id = target_cluster_id
|
|
57
67
|
|
|
68
|
+
@property
|
|
69
|
+
def compute_config(self) -> 'V1UserRequestedComputeConfig':
|
|
70
|
+
"""Gets the compute_config of this IdTransferBody. # noqa: E501
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:return: The compute_config of this IdTransferBody. # noqa: E501
|
|
74
|
+
:rtype: V1UserRequestedComputeConfig
|
|
75
|
+
"""
|
|
76
|
+
return self._compute_config
|
|
77
|
+
|
|
78
|
+
@compute_config.setter
|
|
79
|
+
def compute_config(self, compute_config: 'V1UserRequestedComputeConfig'):
|
|
80
|
+
"""Sets the compute_config of this IdTransferBody.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:param compute_config: The compute_config of this IdTransferBody. # noqa: E501
|
|
84
|
+
:type: V1UserRequestedComputeConfig
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
self._compute_config = compute_config
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def start_after_transfer(self) -> 'bool':
|
|
91
|
+
"""Gets the start_after_transfer of this IdTransferBody. # noqa: E501
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:return: The start_after_transfer of this IdTransferBody. # noqa: E501
|
|
95
|
+
:rtype: bool
|
|
96
|
+
"""
|
|
97
|
+
return self._start_after_transfer
|
|
98
|
+
|
|
99
|
+
@start_after_transfer.setter
|
|
100
|
+
def start_after_transfer(self, start_after_transfer: 'bool'):
|
|
101
|
+
"""Sets the start_after_transfer of this IdTransferBody.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:param start_after_transfer: The start_after_transfer of this IdTransferBody. # noqa: E501
|
|
105
|
+
:type: bool
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
self._start_after_transfer = start_after_transfer
|
|
109
|
+
|
|
58
110
|
@property
|
|
59
111
|
def target_cluster_id(self) -> 'str':
|
|
60
112
|
"""Gets the target_cluster_id of this IdTransferBody. # noqa: E501
|
|
@@ -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,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 LicenseKeyValidateBody(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
|
+
'product_id': 'str'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'product_id': 'productId'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, product_id: 'str' =None): # noqa: E501
|
|
52
|
+
"""LicenseKeyValidateBody - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._product_id = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if product_id is not None:
|
|
56
|
+
self.product_id = product_id
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def product_id(self) -> 'str':
|
|
60
|
+
"""Gets the product_id of this LicenseKeyValidateBody. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The product_id of this LicenseKeyValidateBody. # noqa: E501
|
|
64
|
+
:rtype: str
|
|
65
|
+
"""
|
|
66
|
+
return self._product_id
|
|
67
|
+
|
|
68
|
+
@product_id.setter
|
|
69
|
+
def product_id(self, product_id: 'str'):
|
|
70
|
+
"""Sets the product_id of this LicenseKeyValidateBody.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param product_id: The product_id of this LicenseKeyValidateBody. # noqa: E501
|
|
74
|
+
:type: str
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._product_id = product_id
|
|
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(LicenseKeyValidateBody, 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: 'LicenseKeyValidateBody') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, LicenseKeyValidateBody):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'LicenseKeyValidateBody') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|