lightning-sdk 0.1.41__py3-none-any.whl → 0.1.43__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 (77) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/ai_hub.py +8 -3
  3. lightning_sdk/api/ai_hub_api.py +3 -3
  4. lightning_sdk/api/deployment_api.py +6 -6
  5. lightning_sdk/api/job_api.py +32 -6
  6. lightning_sdk/api/mmt_api.py +59 -19
  7. lightning_sdk/api/studio_api.py +37 -19
  8. lightning_sdk/api/teamspace_api.py +34 -29
  9. lightning_sdk/api/utils.py +46 -34
  10. lightning_sdk/cli/ai_hub.py +3 -3
  11. lightning_sdk/cli/entrypoint.py +3 -1
  12. lightning_sdk/cli/run.py +122 -12
  13. lightning_sdk/cli/serve.py +218 -0
  14. lightning_sdk/deployment/deployment.py +18 -12
  15. lightning_sdk/job/base.py +118 -24
  16. lightning_sdk/job/job.py +98 -9
  17. lightning_sdk/job/v1.py +75 -18
  18. lightning_sdk/job/v2.py +51 -15
  19. lightning_sdk/job/work.py +36 -7
  20. lightning_sdk/lightning_cloud/openapi/__init__.py +12 -0
  21. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +215 -5
  22. lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +218 -0
  23. lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +226 -0
  24. lightning_sdk/lightning_cloud/openapi/api/snowflake_service_api.py +21 -1
  25. lightning_sdk/lightning_cloud/openapi/models/__init__.py +12 -0
  26. lightning_sdk/lightning_cloud/openapi/models/deploymenttemplates_id_body.py +27 -1
  27. lightning_sdk/lightning_cloud/openapi/models/id_visibility_body.py +123 -0
  28. lightning_sdk/lightning_cloud/openapi/models/model_id_versions_body.py +29 -3
  29. lightning_sdk/lightning_cloud/openapi/models/project_id_multimachinejobs_body.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/project_id_snowflake_body.py +15 -67
  31. lightning_sdk/lightning_cloud/openapi/models/query_query_id_body.py +17 -69
  32. lightning_sdk/lightning_cloud/openapi/models/snowflake_export_body.py +29 -81
  33. lightning_sdk/lightning_cloud/openapi/models/snowflake_query_body.py +17 -69
  34. lightning_sdk/lightning_cloud/openapi/models/v1_get_model_file_url_response.py +27 -1
  35. lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_response.py +17 -17
  36. lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_url_response.py +149 -0
  37. lightning_sdk/lightning_cloud/openapi/models/v1_get_project_balance_response.py +27 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_list_multi_machine_job_events_response.py +123 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
  40. lightning_sdk/lightning_cloud/openapi/models/v1_model_file.py +175 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event.py +331 -0
  43. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event_type.py +104 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance.py +149 -0
  45. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance_strategy.py +105 -0
  46. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_status.py +27 -1
  47. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_snowflake_data_connection.py +29 -81
  49. lightning_sdk/lightning_cloud/openapi/models/v1_system_metrics.py +29 -3
  50. lightning_sdk/lightning_cloud/openapi/models/v1_trainium_system_metrics.py +175 -0
  51. lightning_sdk/lightning_cloud/openapi/models/v1_update_metrics_stream_visibility_response.py +97 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -53
  53. lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_request.py +149 -0
  54. lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_response.py +97 -0
  55. lightning_sdk/lightning_cloud/rest_client.py +2 -0
  56. lightning_sdk/mmt/__init__.py +4 -0
  57. lightning_sdk/mmt/base.py +278 -0
  58. lightning_sdk/mmt/mmt.py +267 -0
  59. lightning_sdk/mmt/v1.py +181 -0
  60. lightning_sdk/mmt/v2.py +188 -0
  61. lightning_sdk/plugin.py +43 -16
  62. lightning_sdk/services/file_endpoint.py +11 -5
  63. lightning_sdk/studio.py +16 -9
  64. lightning_sdk/teamspace.py +21 -8
  65. lightning_sdk/utils/resolve.py +18 -0
  66. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/METADATA +4 -1
  67. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/RECORD +71 -59
  68. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/entry_points.txt +0 -1
  69. lightning_sdk/_mmt/__init__.py +0 -3
  70. lightning_sdk/_mmt/base.py +0 -180
  71. lightning_sdk/_mmt/mmt.py +0 -161
  72. lightning_sdk/_mmt/v1.py +0 -69
  73. lightning_sdk/_mmt/v2.py +0 -141
  74. lightning_sdk/cli/mmt.py +0 -137
  75. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/LICENSE +0 -0
  76. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/WHEEL +0 -0
  77. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.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 V1GetModelFilesUrlResponse(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
+ 'files': 'list[V1ModelFile]',
45
+ 'offset': 'str'
46
+ }
47
+
48
+ attribute_map = {
49
+ 'files': 'files',
50
+ 'offset': 'offset'
51
+ }
52
+
53
+ def __init__(self, files: 'list[V1ModelFile]' =None, offset: 'str' =None): # noqa: E501
54
+ """V1GetModelFilesUrlResponse - a model defined in Swagger""" # noqa: E501
55
+ self._files = None
56
+ self._offset = None
57
+ self.discriminator = None
58
+ if files is not None:
59
+ self.files = files
60
+ if offset is not None:
61
+ self.offset = offset
62
+
63
+ @property
64
+ def files(self) -> 'list[V1ModelFile]':
65
+ """Gets the files of this V1GetModelFilesUrlResponse. # noqa: E501
66
+
67
+
68
+ :return: The files of this V1GetModelFilesUrlResponse. # noqa: E501
69
+ :rtype: list[V1ModelFile]
70
+ """
71
+ return self._files
72
+
73
+ @files.setter
74
+ def files(self, files: 'list[V1ModelFile]'):
75
+ """Sets the files of this V1GetModelFilesUrlResponse.
76
+
77
+
78
+ :param files: The files of this V1GetModelFilesUrlResponse. # noqa: E501
79
+ :type: list[V1ModelFile]
80
+ """
81
+
82
+ self._files = files
83
+
84
+ @property
85
+ def offset(self) -> 'str':
86
+ """Gets the offset of this V1GetModelFilesUrlResponse. # noqa: E501
87
+
88
+
89
+ :return: The offset of this V1GetModelFilesUrlResponse. # noqa: E501
90
+ :rtype: str
91
+ """
92
+ return self._offset
93
+
94
+ @offset.setter
95
+ def offset(self, offset: 'str'):
96
+ """Sets the offset of this V1GetModelFilesUrlResponse.
97
+
98
+
99
+ :param offset: The offset of this V1GetModelFilesUrlResponse. # noqa: E501
100
+ :type: str
101
+ """
102
+
103
+ self._offset = offset
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(V1GetModelFilesUrlResponse, 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: 'V1GetModelFilesUrlResponse') -> bool:
141
+ """Returns true if both objects are equal"""
142
+ if not isinstance(other, V1GetModelFilesUrlResponse):
143
+ return False
144
+
145
+ return self.__dict__ == other.__dict__
146
+
147
+ def __ne__(self, other: 'V1GetModelFilesUrlResponse') -> bool:
148
+ """Returns true if both objects are not equal"""
149
+ return not self == other
@@ -43,6 +43,7 @@ class V1GetProjectBalanceResponse(object):
43
43
  swagger_types = {
44
44
  'account_id': 'str',
45
45
  'balance': 'float',
46
+ 'next_free_credits_grant_at': 'datetime',
46
47
  'project_id': 'str',
47
48
  'transactions': 'list[V1Transaction]'
48
49
  }
@@ -50,14 +51,16 @@ class V1GetProjectBalanceResponse(object):
50
51
  attribute_map = {
51
52
  'account_id': 'accountId',
52
53
  'balance': 'balance',
54
+ 'next_free_credits_grant_at': 'nextFreeCreditsGrantAt',
53
55
  'project_id': 'projectId',
54
56
  'transactions': 'transactions'
55
57
  }
56
58
 
57
- def __init__(self, account_id: 'str' =None, balance: 'float' =None, project_id: 'str' =None, transactions: 'list[V1Transaction]' =None): # noqa: E501
59
+ def __init__(self, account_id: 'str' =None, balance: 'float' =None, next_free_credits_grant_at: 'datetime' =None, project_id: 'str' =None, transactions: 'list[V1Transaction]' =None): # noqa: E501
58
60
  """V1GetProjectBalanceResponse - a model defined in Swagger""" # noqa: E501
59
61
  self._account_id = None
60
62
  self._balance = None
63
+ self._next_free_credits_grant_at = None
61
64
  self._project_id = None
62
65
  self._transactions = None
63
66
  self.discriminator = None
@@ -65,6 +68,8 @@ class V1GetProjectBalanceResponse(object):
65
68
  self.account_id = account_id
66
69
  if balance is not None:
67
70
  self.balance = balance
71
+ if next_free_credits_grant_at is not None:
72
+ self.next_free_credits_grant_at = next_free_credits_grant_at
68
73
  if project_id is not None:
69
74
  self.project_id = project_id
70
75
  if transactions is not None:
@@ -112,6 +117,27 @@ class V1GetProjectBalanceResponse(object):
112
117
 
113
118
  self._balance = balance
114
119
 
120
+ @property
121
+ def next_free_credits_grant_at(self) -> 'datetime':
122
+ """Gets the next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
123
+
124
+
125
+ :return: The next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
126
+ :rtype: datetime
127
+ """
128
+ return self._next_free_credits_grant_at
129
+
130
+ @next_free_credits_grant_at.setter
131
+ def next_free_credits_grant_at(self, next_free_credits_grant_at: 'datetime'):
132
+ """Sets the next_free_credits_grant_at of this V1GetProjectBalanceResponse.
133
+
134
+
135
+ :param next_free_credits_grant_at: The next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
136
+ :type: datetime
137
+ """
138
+
139
+ self._next_free_credits_grant_at = next_free_credits_grant_at
140
+
115
141
  @property
116
142
  def project_id(self) -> 'str':
117
143
  """Gets the project_id of this V1GetProjectBalanceResponse. # noqa: E501
@@ -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 V1ListMultiMachineJobEventsResponse(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
+ 'events': 'list[V1MultiMachineJobEvent]'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'events': 'events'
49
+ }
50
+
51
+ def __init__(self, events: 'list[V1MultiMachineJobEvent]' =None): # noqa: E501
52
+ """V1ListMultiMachineJobEventsResponse - a model defined in Swagger""" # noqa: E501
53
+ self._events = None
54
+ self.discriminator = None
55
+ if events is not None:
56
+ self.events = events
57
+
58
+ @property
59
+ def events(self) -> 'list[V1MultiMachineJobEvent]':
60
+ """Gets the events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
61
+
62
+
63
+ :return: The events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
64
+ :rtype: list[V1MultiMachineJobEvent]
65
+ """
66
+ return self._events
67
+
68
+ @events.setter
69
+ def events(self, events: 'list[V1MultiMachineJobEvent]'):
70
+ """Sets the events of this V1ListMultiMachineJobEventsResponse.
71
+
72
+
73
+ :param events: The events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
74
+ :type: list[V1MultiMachineJobEvent]
75
+ """
76
+
77
+ self._events = events
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(V1ListMultiMachineJobEventsResponse, 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: 'V1ListMultiMachineJobEventsResponse') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1ListMultiMachineJobEventsResponse):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1ListMultiMachineJobEventsResponse') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other
@@ -66,6 +66,7 @@ class V1MetricsStream(object):
66
66
  'user_id': 'str',
67
67
  'version': 'datetime',
68
68
  'version_number': 'int',
69
+ 'visibility': 'V1ResourceVisibility',
69
70
  'work_id': 'str'
70
71
  }
71
72
 
@@ -95,10 +96,11 @@ class V1MetricsStream(object):
95
96
  'user_id': 'userId',
96
97
  'version': 'version',
97
98
  'version_number': 'versionNumber',
99
+ 'visibility': 'visibility',
98
100
  'work_id': 'workId'
99
101
  }
100
102
 
101
- def __init__(self, app_id: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, dark_color: 'str' =None, id: 'str' =None, job_name: 'str' =None, light_color: 'str' =None, name: 'str' =None, persisted: 'bool' =None, phase: 'V1PhaseType' =None, plugin_id: 'str' =None, project_id: 'str' =None, source_id: 'str' =None, stopped_at: 'datetime' =None, store_created_at: 'bool' =None, store_step: 'bool' =None, system_info: 'V1SystemInfo' =None, tags: 'list[V1MetricsTags]' =None, trackers: 'dict(str, V1MetricsTracker)' =None, updated_at: 'datetime' =None, updates_counter: 'int' =None, user_id: 'str' =None, version: 'datetime' =None, version_number: 'int' =None, work_id: 'str' =None): # noqa: E501
103
+ def __init__(self, app_id: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, dark_color: 'str' =None, id: 'str' =None, job_name: 'str' =None, light_color: 'str' =None, name: 'str' =None, persisted: 'bool' =None, phase: 'V1PhaseType' =None, plugin_id: 'str' =None, project_id: 'str' =None, source_id: 'str' =None, stopped_at: 'datetime' =None, store_created_at: 'bool' =None, store_step: 'bool' =None, system_info: 'V1SystemInfo' =None, tags: 'list[V1MetricsTags]' =None, trackers: 'dict(str, V1MetricsTracker)' =None, updated_at: 'datetime' =None, updates_counter: 'int' =None, user_id: 'str' =None, version: 'datetime' =None, version_number: 'int' =None, visibility: 'V1ResourceVisibility' =None, work_id: 'str' =None): # noqa: E501
102
104
  """V1MetricsStream - a model defined in Swagger""" # noqa: E501
103
105
  self._app_id = None
104
106
  self._cloudspace_id = None
@@ -125,6 +127,7 @@ class V1MetricsStream(object):
125
127
  self._user_id = None
126
128
  self._version = None
127
129
  self._version_number = None
130
+ self._visibility = None
128
131
  self._work_id = None
129
132
  self.discriminator = None
130
133
  if app_id is not None:
@@ -177,6 +180,8 @@ class V1MetricsStream(object):
177
180
  self.version = version
178
181
  if version_number is not None:
179
182
  self.version_number = version_number
183
+ if visibility is not None:
184
+ self.visibility = visibility
180
185
  if work_id is not None:
181
186
  self.work_id = work_id
182
187
 
@@ -705,6 +710,27 @@ class V1MetricsStream(object):
705
710
 
706
711
  self._version_number = version_number
707
712
 
713
+ @property
714
+ def visibility(self) -> 'V1ResourceVisibility':
715
+ """Gets the visibility of this V1MetricsStream. # noqa: E501
716
+
717
+
718
+ :return: The visibility of this V1MetricsStream. # noqa: E501
719
+ :rtype: V1ResourceVisibility
720
+ """
721
+ return self._visibility
722
+
723
+ @visibility.setter
724
+ def visibility(self, visibility: 'V1ResourceVisibility'):
725
+ """Sets the visibility of this V1MetricsStream.
726
+
727
+
728
+ :param visibility: The visibility of this V1MetricsStream. # noqa: E501
729
+ :type: V1ResourceVisibility
730
+ """
731
+
732
+ self._visibility = visibility
733
+
708
734
  @property
709
735
  def work_id(self) -> 'str':
710
736
  """Gets the work_id of this V1MetricsStream. # noqa: E501
@@ -0,0 +1,175 @@
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 V1ModelFile(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
+ 'filepath': 'str',
45
+ 'size': 'str',
46
+ 'url': 'str'
47
+ }
48
+
49
+ attribute_map = {
50
+ 'filepath': 'filepath',
51
+ 'size': 'size',
52
+ 'url': 'url'
53
+ }
54
+
55
+ def __init__(self, filepath: 'str' =None, size: 'str' =None, url: 'str' =None): # noqa: E501
56
+ """V1ModelFile - a model defined in Swagger""" # noqa: E501
57
+ self._filepath = None
58
+ self._size = None
59
+ self._url = None
60
+ self.discriminator = None
61
+ if filepath is not None:
62
+ self.filepath = filepath
63
+ if size is not None:
64
+ self.size = size
65
+ if url is not None:
66
+ self.url = url
67
+
68
+ @property
69
+ def filepath(self) -> 'str':
70
+ """Gets the filepath of this V1ModelFile. # noqa: E501
71
+
72
+
73
+ :return: The filepath of this V1ModelFile. # noqa: E501
74
+ :rtype: str
75
+ """
76
+ return self._filepath
77
+
78
+ @filepath.setter
79
+ def filepath(self, filepath: 'str'):
80
+ """Sets the filepath of this V1ModelFile.
81
+
82
+
83
+ :param filepath: The filepath of this V1ModelFile. # noqa: E501
84
+ :type: str
85
+ """
86
+
87
+ self._filepath = filepath
88
+
89
+ @property
90
+ def size(self) -> 'str':
91
+ """Gets the size of this V1ModelFile. # noqa: E501
92
+
93
+
94
+ :return: The size of this V1ModelFile. # noqa: E501
95
+ :rtype: str
96
+ """
97
+ return self._size
98
+
99
+ @size.setter
100
+ def size(self, size: 'str'):
101
+ """Sets the size of this V1ModelFile.
102
+
103
+
104
+ :param size: The size of this V1ModelFile. # noqa: E501
105
+ :type: str
106
+ """
107
+
108
+ self._size = size
109
+
110
+ @property
111
+ def url(self) -> 'str':
112
+ """Gets the url of this V1ModelFile. # noqa: E501
113
+
114
+
115
+ :return: The url of this V1ModelFile. # noqa: E501
116
+ :rtype: str
117
+ """
118
+ return self._url
119
+
120
+ @url.setter
121
+ def url(self, url: 'str'):
122
+ """Sets the url of this V1ModelFile.
123
+
124
+
125
+ :param url: The url of this V1ModelFile. # noqa: E501
126
+ :type: str
127
+ """
128
+
129
+ self._url = url
130
+
131
+ def to_dict(self) -> dict:
132
+ """Returns the model properties as a dict"""
133
+ result = {}
134
+
135
+ for attr, _ in six.iteritems(self.swagger_types):
136
+ value = getattr(self, attr)
137
+ if isinstance(value, list):
138
+ result[attr] = list(map(
139
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
+ value
141
+ ))
142
+ elif hasattr(value, "to_dict"):
143
+ result[attr] = value.to_dict()
144
+ elif isinstance(value, dict):
145
+ result[attr] = dict(map(
146
+ lambda item: (item[0], item[1].to_dict())
147
+ if hasattr(item[1], "to_dict") else item,
148
+ value.items()
149
+ ))
150
+ else:
151
+ result[attr] = value
152
+ if issubclass(V1ModelFile, dict):
153
+ for key, value in self.items():
154
+ result[key] = value
155
+
156
+ return result
157
+
158
+ def to_str(self) -> str:
159
+ """Returns the string representation of the model"""
160
+ return pprint.pformat(self.to_dict())
161
+
162
+ def __repr__(self) -> str:
163
+ """For `print` and `pprint`"""
164
+ return self.to_str()
165
+
166
+ def __eq__(self, other: 'V1ModelFile') -> bool:
167
+ """Returns true if both objects are equal"""
168
+ if not isinstance(other, V1ModelFile):
169
+ return False
170
+
171
+ return self.__dict__ == other.__dict__
172
+
173
+ def __ne__(self, other: 'V1ModelFile') -> bool:
174
+ """Returns true if both objects are not equal"""
175
+ return not self == other
@@ -44,6 +44,7 @@ class V1MultiMachineJob(object):
44
44
  'cloudspace_id': 'str',
45
45
  'created_at': 'datetime',
46
46
  'desired_state': 'V1MultiMachineJobState',
47
+ 'fault_tolerance': 'V1MultiMachineJobFaultTolerance',
47
48
  'id': 'str',
48
49
  'machines': 'int',
49
50
  'message': 'str',
@@ -60,6 +61,7 @@ class V1MultiMachineJob(object):
60
61
  'cloudspace_id': 'cloudspaceId',
61
62
  'created_at': 'createdAt',
62
63
  'desired_state': 'desiredState',
64
+ 'fault_tolerance': 'faultTolerance',
63
65
  'id': 'id',
64
66
  'machines': 'machines',
65
67
  'message': 'message',
@@ -72,11 +74,12 @@ class V1MultiMachineJob(object):
72
74
  'user_id': 'userId'
73
75
  }
74
76
 
75
- def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, desired_state: 'V1MultiMachineJobState' =None, id: 'str' =None, machines: 'int' =None, message: 'str' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None, state: 'V1MultiMachineJobState' =None, status: 'V1MultiMachineJobStatus' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
77
+ def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, desired_state: 'V1MultiMachineJobState' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, id: 'str' =None, machines: 'int' =None, message: 'str' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None, state: 'V1MultiMachineJobState' =None, status: 'V1MultiMachineJobStatus' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
76
78
  """V1MultiMachineJob - a model defined in Swagger""" # noqa: E501
77
79
  self._cloudspace_id = None
78
80
  self._created_at = None
79
81
  self._desired_state = None
82
+ self._fault_tolerance = None
80
83
  self._id = None
81
84
  self._machines = None
82
85
  self._message = None
@@ -94,6 +97,8 @@ class V1MultiMachineJob(object):
94
97
  self.created_at = created_at
95
98
  if desired_state is not None:
96
99
  self.desired_state = desired_state
100
+ if fault_tolerance is not None:
101
+ self.fault_tolerance = fault_tolerance
97
102
  if id is not None:
98
103
  self.id = id
99
104
  if machines is not None:
@@ -178,6 +183,27 @@ class V1MultiMachineJob(object):
178
183
 
179
184
  self._desired_state = desired_state
180
185
 
186
+ @property
187
+ def fault_tolerance(self) -> 'V1MultiMachineJobFaultTolerance':
188
+ """Gets the fault_tolerance of this V1MultiMachineJob. # noqa: E501
189
+
190
+
191
+ :return: The fault_tolerance of this V1MultiMachineJob. # noqa: E501
192
+ :rtype: V1MultiMachineJobFaultTolerance
193
+ """
194
+ return self._fault_tolerance
195
+
196
+ @fault_tolerance.setter
197
+ def fault_tolerance(self, fault_tolerance: 'V1MultiMachineJobFaultTolerance'):
198
+ """Sets the fault_tolerance of this V1MultiMachineJob.
199
+
200
+
201
+ :param fault_tolerance: The fault_tolerance of this V1MultiMachineJob. # noqa: E501
202
+ :type: V1MultiMachineJobFaultTolerance
203
+ """
204
+
205
+ self._fault_tolerance = fault_tolerance
206
+
181
207
  @property
182
208
  def id(self) -> 'str':
183
209
  """Gets the id of this V1MultiMachineJob. # noqa: E501