lightning-sdk 0.2.8__py3-none-any.whl → 0.2.10__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.
Files changed (60) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/cluster_api.py +22 -0
  3. lightning_sdk/api/deployment_api.py +1 -0
  4. lightning_sdk/api/lit_container_api.py +24 -5
  5. lightning_sdk/api/teamspace_api.py +22 -17
  6. lightning_sdk/api/utils.py +1 -1
  7. lightning_sdk/cli/clusters_menu.py +46 -0
  8. lightning_sdk/cli/entrypoint.py +2 -2
  9. lightning_sdk/cli/list.py +25 -5
  10. lightning_sdk/cli/serve.py +232 -24
  11. lightning_sdk/cli/upload.py +4 -1
  12. lightning_sdk/deployment/deployment.py +5 -2
  13. lightning_sdk/lightning_cloud/openapi/__init__.py +10 -0
  14. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +303 -0
  15. lightning_sdk/lightning_cloud/openapi/models/__init__.py +10 -0
  16. lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_systemmetrics_body.py +149 -0
  17. lightning_sdk/lightning_cloud/openapi/models/cluster_id_capacityreservations_body.py +55 -3
  18. lightning_sdk/lightning_cloud/openapi/models/create.py +53 -1
  19. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +55 -3
  20. lightning_sdk/lightning_cloud/openapi/models/update.py +27 -1
  21. lightning_sdk/lightning_cloud/openapi/models/v1_billing_tier.py +1 -0
  22. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +53 -1
  23. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_cold_start_metrics.py +53 -1
  24. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_cold_start_metrics_stats.py +357 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +29 -3
  26. lightning_sdk/lightning_cloud/openapi/models/v1_cloudflare_v1.py +227 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +55 -3
  29. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +79 -1
  30. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
  31. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +29 -3
  32. lightning_sdk/lightning_cloud/openapi/models/v1_create_cluster_capacity_reservation_response.py +27 -1
  33. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +53 -1
  34. lightning_sdk/lightning_cloud/openapi/models/v1_gcp_direct_vpc.py +149 -0
  35. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_cold_start_metrics_stats_response.py +123 -0
  36. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_instance_system_metrics_aggregate_response.py +123 -0
  37. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +53 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +43 -17
  39. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +55 -3
  40. lightning_sdk/lightning_cloud/openapi/models/v1_project_cluster_binding.py +27 -1
  41. lightning_sdk/lightning_cloud/openapi/models/v1_r2_data_connection.py +253 -0
  42. lightning_sdk/lightning_cloud/openapi/models/v1_report_cloud_space_instance_system_metrics_response.py +97 -0
  43. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_phase.py +1 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_system_metrics_aggregated.py +227 -0
  45. lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +27 -1
  46. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +104 -208
  47. lightning_sdk/lightning_cloud/openapi/models/v1_validate_data_connection_response.py +27 -1
  48. lightning_sdk/lightning_cloud/openapi/models/v1_weka_data_connection.py +201 -0
  49. lightning_sdk/lightning_cloud/openapi/models/validate.py +27 -1
  50. lightning_sdk/lit_container.py +25 -7
  51. lightning_sdk/models.py +26 -8
  52. lightning_sdk/serve.py +3 -20
  53. lightning_sdk/teamspace.py +21 -4
  54. lightning_sdk/utils/resolve.py +11 -4
  55. {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.10.dist-info}/METADATA +1 -1
  56. {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.10.dist-info}/RECORD +60 -48
  57. {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.10.dist-info}/LICENSE +0 -0
  58. {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.10.dist-info}/WHEEL +0 -0
  59. {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.10.dist-info}/entry_points.txt +0 -0
  60. {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.10.dist-info}/top_level.txt +0 -0
@@ -43,20 +43,23 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
43
43
  swagger_types = {
44
44
  'machine_image_version': 'str',
45
45
  'name': 'str',
46
- 'org_id': 'str'
46
+ 'org_id': 'str',
47
+ 'setup_script_text': 'str'
47
48
  }
48
49
 
49
50
  attribute_map = {
50
51
  'machine_image_version': 'machineImageVersion',
51
52
  'name': 'name',
52
- 'org_id': 'orgId'
53
+ 'org_id': 'orgId',
54
+ 'setup_script_text': 'setupScriptText'
53
55
  }
54
56
 
55
- def __init__(self, machine_image_version: 'str' =None, name: 'str' =None, org_id: 'str' =None): # noqa: E501
57
+ def __init__(self, machine_image_version: 'str' =None, name: 'str' =None, org_id: 'str' =None, setup_script_text: 'str' =None): # noqa: E501
56
58
  """V1CreateCloudSpaceEnvironmentTemplateRequest - a model defined in Swagger""" # noqa: E501
57
59
  self._machine_image_version = None
58
60
  self._name = None
59
61
  self._org_id = None
62
+ self._setup_script_text = None
60
63
  self.discriminator = None
61
64
  if machine_image_version is not None:
62
65
  self.machine_image_version = machine_image_version
@@ -64,6 +67,8 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
64
67
  self.name = name
65
68
  if org_id is not None:
66
69
  self.org_id = org_id
70
+ if setup_script_text is not None:
71
+ self.setup_script_text = setup_script_text
67
72
 
68
73
  @property
69
74
  def machine_image_version(self) -> 'str':
@@ -128,6 +133,27 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
128
133
 
129
134
  self._org_id = org_id
130
135
 
136
+ @property
137
+ def setup_script_text(self) -> 'str':
138
+ """Gets the setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
139
+
140
+
141
+ :return: The setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
142
+ :rtype: str
143
+ """
144
+ return self._setup_script_text
145
+
146
+ @setup_script_text.setter
147
+ def setup_script_text(self, setup_script_text: 'str'):
148
+ """Sets the setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest.
149
+
150
+
151
+ :param setup_script_text: The setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
152
+ :type: str
153
+ """
154
+
155
+ self._setup_script_text = setup_script_text
156
+
131
157
  def to_dict(self) -> dict:
132
158
  """Returns the model properties as a dict"""
133
159
  result = {}
@@ -42,24 +42,29 @@ class V1CreateClusterCapacityReservationResponse(object):
42
42
  """
43
43
  swagger_types = {
44
44
  'cloud_provider_capacity_reservation_id': 'str',
45
+ 'full_cloud_provider_reservation_string': 'str',
45
46
  'id': 'str',
46
47
  'match_pattern': 'str'
47
48
  }
48
49
 
49
50
  attribute_map = {
50
51
  'cloud_provider_capacity_reservation_id': 'cloudProviderCapacityReservationId',
52
+ 'full_cloud_provider_reservation_string': 'fullCloudProviderReservationString',
51
53
  'id': 'id',
52
54
  'match_pattern': 'matchPattern'
53
55
  }
54
56
 
55
- def __init__(self, cloud_provider_capacity_reservation_id: 'str' =None, id: 'str' =None, match_pattern: 'str' =None): # noqa: E501
57
+ def __init__(self, cloud_provider_capacity_reservation_id: 'str' =None, full_cloud_provider_reservation_string: 'str' =None, id: 'str' =None, match_pattern: 'str' =None): # noqa: E501
56
58
  """V1CreateClusterCapacityReservationResponse - a model defined in Swagger""" # noqa: E501
57
59
  self._cloud_provider_capacity_reservation_id = None
60
+ self._full_cloud_provider_reservation_string = None
58
61
  self._id = None
59
62
  self._match_pattern = None
60
63
  self.discriminator = None
61
64
  if cloud_provider_capacity_reservation_id is not None:
62
65
  self.cloud_provider_capacity_reservation_id = cloud_provider_capacity_reservation_id
66
+ if full_cloud_provider_reservation_string is not None:
67
+ self.full_cloud_provider_reservation_string = full_cloud_provider_reservation_string
63
68
  if id is not None:
64
69
  self.id = id
65
70
  if match_pattern is not None:
@@ -86,6 +91,27 @@ class V1CreateClusterCapacityReservationResponse(object):
86
91
 
87
92
  self._cloud_provider_capacity_reservation_id = cloud_provider_capacity_reservation_id
88
93
 
94
+ @property
95
+ def full_cloud_provider_reservation_string(self) -> 'str':
96
+ """Gets the full_cloud_provider_reservation_string of this V1CreateClusterCapacityReservationResponse. # noqa: E501
97
+
98
+
99
+ :return: The full_cloud_provider_reservation_string of this V1CreateClusterCapacityReservationResponse. # noqa: E501
100
+ :rtype: str
101
+ """
102
+ return self._full_cloud_provider_reservation_string
103
+
104
+ @full_cloud_provider_reservation_string.setter
105
+ def full_cloud_provider_reservation_string(self, full_cloud_provider_reservation_string: 'str'):
106
+ """Sets the full_cloud_provider_reservation_string of this V1CreateClusterCapacityReservationResponse.
107
+
108
+
109
+ :param full_cloud_provider_reservation_string: The full_cloud_provider_reservation_string of this V1CreateClusterCapacityReservationResponse. # noqa: E501
110
+ :type: str
111
+ """
112
+
113
+ self._full_cloud_provider_reservation_string = full_cloud_provider_reservation_string
114
+
89
115
  @property
90
116
  def id(self) -> 'str':
91
117
  """Gets the id of this V1CreateClusterCapacityReservationResponse. # noqa: E501
@@ -58,6 +58,7 @@ class V1DataConnection(object):
58
58
  'name': 'str',
59
59
  'number_of_files': 'str',
60
60
  'project_id': 'str',
61
+ 'r2': 'V1R2DataConnection',
61
62
  'run_cmds': 'list[str]',
62
63
  's3_folder': 'V1S3FolderDataConnection',
63
64
  'snowflake': 'V1SnowflakeDataConnection',
@@ -65,6 +66,7 @@ class V1DataConnection(object):
65
66
  'total_size_bytes': 'str',
66
67
  'type': 'str',
67
68
  'updated_at': 'datetime',
69
+ 'weka': 'V1WekaDataConnection',
68
70
  'writable': 'bool'
69
71
  }
70
72
 
@@ -86,6 +88,7 @@ class V1DataConnection(object):
86
88
  'name': 'name',
87
89
  'number_of_files': 'numberOfFiles',
88
90
  'project_id': 'projectId',
91
+ 'r2': 'r2',
89
92
  'run_cmds': 'runCmds',
90
93
  's3_folder': 's3Folder',
91
94
  'snowflake': 'snowflake',
@@ -93,10 +96,11 @@ class V1DataConnection(object):
93
96
  'total_size_bytes': 'totalSizeBytes',
94
97
  'type': 'type',
95
98
  'updated_at': 'updatedAt',
99
+ 'weka': 'weka',
96
100
  'writable': 'writable'
97
101
  }
98
102
 
99
- def __init__(self, access_cluster_ids: 'list[str]' =None, accessible: 'bool' =None, aws: 'V1AwsDataConnection' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, efs: 'V1EfsConfig' =None, error: 'str' =None, filestore: 'V1FilestoreDataConnection' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, id: 'str' =None, index: 'V1Index' =None, is_managed: 'bool' =None, lock_out: 'bool' =None, name: 'str' =None, number_of_files: 'str' =None, project_id: 'str' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, state: 'V1DataConnectionState' =None, total_size_bytes: 'str' =None, type: 'str' =None, updated_at: 'datetime' =None, writable: 'bool' =None): # noqa: E501
103
+ def __init__(self, access_cluster_ids: 'list[str]' =None, accessible: 'bool' =None, aws: 'V1AwsDataConnection' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, efs: 'V1EfsConfig' =None, error: 'str' =None, filestore: 'V1FilestoreDataConnection' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, id: 'str' =None, index: 'V1Index' =None, is_managed: 'bool' =None, lock_out: 'bool' =None, name: 'str' =None, number_of_files: 'str' =None, project_id: 'str' =None, r2: 'V1R2DataConnection' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, state: 'V1DataConnectionState' =None, total_size_bytes: 'str' =None, type: 'str' =None, updated_at: 'datetime' =None, weka: 'V1WekaDataConnection' =None, writable: 'bool' =None): # noqa: E501
100
104
  """V1DataConnection - a model defined in Swagger""" # noqa: E501
101
105
  self._access_cluster_ids = None
102
106
  self._accessible = None
@@ -115,6 +119,7 @@ class V1DataConnection(object):
115
119
  self._name = None
116
120
  self._number_of_files = None
117
121
  self._project_id = None
122
+ self._r2 = None
118
123
  self._run_cmds = None
119
124
  self._s3_folder = None
120
125
  self._snowflake = None
@@ -122,6 +127,7 @@ class V1DataConnection(object):
122
127
  self._total_size_bytes = None
123
128
  self._type = None
124
129
  self._updated_at = None
130
+ self._weka = None
125
131
  self._writable = None
126
132
  self.discriminator = None
127
133
  if access_cluster_ids is not None:
@@ -158,6 +164,8 @@ class V1DataConnection(object):
158
164
  self.number_of_files = number_of_files
159
165
  if project_id is not None:
160
166
  self.project_id = project_id
167
+ if r2 is not None:
168
+ self.r2 = r2
161
169
  if run_cmds is not None:
162
170
  self.run_cmds = run_cmds
163
171
  if s3_folder is not None:
@@ -172,6 +180,8 @@ class V1DataConnection(object):
172
180
  self.type = type
173
181
  if updated_at is not None:
174
182
  self.updated_at = updated_at
183
+ if weka is not None:
184
+ self.weka = weka
175
185
  if writable is not None:
176
186
  self.writable = writable
177
187
 
@@ -532,6 +542,27 @@ class V1DataConnection(object):
532
542
 
533
543
  self._project_id = project_id
534
544
 
545
+ @property
546
+ def r2(self) -> 'V1R2DataConnection':
547
+ """Gets the r2 of this V1DataConnection. # noqa: E501
548
+
549
+
550
+ :return: The r2 of this V1DataConnection. # noqa: E501
551
+ :rtype: V1R2DataConnection
552
+ """
553
+ return self._r2
554
+
555
+ @r2.setter
556
+ def r2(self, r2: 'V1R2DataConnection'):
557
+ """Sets the r2 of this V1DataConnection.
558
+
559
+
560
+ :param r2: The r2 of this V1DataConnection. # noqa: E501
561
+ :type: V1R2DataConnection
562
+ """
563
+
564
+ self._r2 = r2
565
+
535
566
  @property
536
567
  def run_cmds(self) -> 'list[str]':
537
568
  """Gets the run_cmds of this V1DataConnection. # noqa: E501
@@ -679,6 +710,27 @@ class V1DataConnection(object):
679
710
 
680
711
  self._updated_at = updated_at
681
712
 
713
+ @property
714
+ def weka(self) -> 'V1WekaDataConnection':
715
+ """Gets the weka of this V1DataConnection. # noqa: E501
716
+
717
+
718
+ :return: The weka of this V1DataConnection. # noqa: E501
719
+ :rtype: V1WekaDataConnection
720
+ """
721
+ return self._weka
722
+
723
+ @weka.setter
724
+ def weka(self, weka: 'V1WekaDataConnection'):
725
+ """Sets the weka of this V1DataConnection.
726
+
727
+
728
+ :param weka: The weka of this V1DataConnection. # noqa: E501
729
+ :type: V1WekaDataConnection
730
+ """
731
+
732
+ self._weka = weka
733
+
682
734
  @property
683
735
  def writable(self) -> 'bool':
684
736
  """Gets the writable of this V1DataConnection. # 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 V1GCPDirectVPC(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
+ 'network_name': 'str',
45
+ 'subnet_name': 'str'
46
+ }
47
+
48
+ attribute_map = {
49
+ 'network_name': 'networkName',
50
+ 'subnet_name': 'subnetName'
51
+ }
52
+
53
+ def __init__(self, network_name: 'str' =None, subnet_name: 'str' =None): # noqa: E501
54
+ """V1GCPDirectVPC - a model defined in Swagger""" # noqa: E501
55
+ self._network_name = None
56
+ self._subnet_name = None
57
+ self.discriminator = None
58
+ if network_name is not None:
59
+ self.network_name = network_name
60
+ if subnet_name is not None:
61
+ self.subnet_name = subnet_name
62
+
63
+ @property
64
+ def network_name(self) -> 'str':
65
+ """Gets the network_name of this V1GCPDirectVPC. # noqa: E501
66
+
67
+
68
+ :return: The network_name of this V1GCPDirectVPC. # noqa: E501
69
+ :rtype: str
70
+ """
71
+ return self._network_name
72
+
73
+ @network_name.setter
74
+ def network_name(self, network_name: 'str'):
75
+ """Sets the network_name of this V1GCPDirectVPC.
76
+
77
+
78
+ :param network_name: The network_name of this V1GCPDirectVPC. # noqa: E501
79
+ :type: str
80
+ """
81
+
82
+ self._network_name = network_name
83
+
84
+ @property
85
+ def subnet_name(self) -> 'str':
86
+ """Gets the subnet_name of this V1GCPDirectVPC. # noqa: E501
87
+
88
+
89
+ :return: The subnet_name of this V1GCPDirectVPC. # noqa: E501
90
+ :rtype: str
91
+ """
92
+ return self._subnet_name
93
+
94
+ @subnet_name.setter
95
+ def subnet_name(self, subnet_name: 'str'):
96
+ """Sets the subnet_name of this V1GCPDirectVPC.
97
+
98
+
99
+ :param subnet_name: The subnet_name of this V1GCPDirectVPC. # noqa: E501
100
+ :type: str
101
+ """
102
+
103
+ self._subnet_name = subnet_name
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(V1GCPDirectVPC, 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: 'V1GCPDirectVPC') -> bool:
141
+ """Returns true if both objects are equal"""
142
+ if not isinstance(other, V1GCPDirectVPC):
143
+ return False
144
+
145
+ return self.__dict__ == other.__dict__
146
+
147
+ def __ne__(self, other: 'V1GCPDirectVPC') -> bool:
148
+ """Returns true if both objects are not equal"""
149
+ 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 V1GetCloudSpaceColdStartMetricsStatsResponse(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
+ 'metrics': 'list[V1CloudSpaceColdStartMetricsStats]'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'metrics': 'metrics'
49
+ }
50
+
51
+ def __init__(self, metrics: 'list[V1CloudSpaceColdStartMetricsStats]' =None): # noqa: E501
52
+ """V1GetCloudSpaceColdStartMetricsStatsResponse - a model defined in Swagger""" # noqa: E501
53
+ self._metrics = None
54
+ self.discriminator = None
55
+ if metrics is not None:
56
+ self.metrics = metrics
57
+
58
+ @property
59
+ def metrics(self) -> 'list[V1CloudSpaceColdStartMetricsStats]':
60
+ """Gets the metrics of this V1GetCloudSpaceColdStartMetricsStatsResponse. # noqa: E501
61
+
62
+
63
+ :return: The metrics of this V1GetCloudSpaceColdStartMetricsStatsResponse. # noqa: E501
64
+ :rtype: list[V1CloudSpaceColdStartMetricsStats]
65
+ """
66
+ return self._metrics
67
+
68
+ @metrics.setter
69
+ def metrics(self, metrics: 'list[V1CloudSpaceColdStartMetricsStats]'):
70
+ """Sets the metrics of this V1GetCloudSpaceColdStartMetricsStatsResponse.
71
+
72
+
73
+ :param metrics: The metrics of this V1GetCloudSpaceColdStartMetricsStatsResponse. # noqa: E501
74
+ :type: list[V1CloudSpaceColdStartMetricsStats]
75
+ """
76
+
77
+ self._metrics = metrics
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(V1GetCloudSpaceColdStartMetricsStatsResponse, 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: 'V1GetCloudSpaceColdStartMetricsStatsResponse') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1GetCloudSpaceColdStartMetricsStatsResponse):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1GetCloudSpaceColdStartMetricsStatsResponse') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ 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 V1GetCloudSpaceInstanceSystemMetricsAggregateResponse(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
+ 'metrics': 'list[V1SystemMetricsAggregated]'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'metrics': 'metrics'
49
+ }
50
+
51
+ def __init__(self, metrics: 'list[V1SystemMetricsAggregated]' =None): # noqa: E501
52
+ """V1GetCloudSpaceInstanceSystemMetricsAggregateResponse - a model defined in Swagger""" # noqa: E501
53
+ self._metrics = None
54
+ self.discriminator = None
55
+ if metrics is not None:
56
+ self.metrics = metrics
57
+
58
+ @property
59
+ def metrics(self) -> 'list[V1SystemMetricsAggregated]':
60
+ """Gets the metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse. # noqa: E501
61
+
62
+
63
+ :return: The metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse. # noqa: E501
64
+ :rtype: list[V1SystemMetricsAggregated]
65
+ """
66
+ return self._metrics
67
+
68
+ @metrics.setter
69
+ def metrics(self, metrics: 'list[V1SystemMetricsAggregated]'):
70
+ """Sets the metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse.
71
+
72
+
73
+ :param metrics: The metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse. # noqa: E501
74
+ :type: list[V1SystemMetricsAggregated]
75
+ """
76
+
77
+ self._metrics = metrics
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(V1GetCloudSpaceInstanceSystemMetricsAggregateResponse, 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: 'V1GetCloudSpaceInstanceSystemMetricsAggregateResponse') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1GetCloudSpaceInstanceSystemMetricsAggregateResponse):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1GetCloudSpaceInstanceSystemMetricsAggregateResponse') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other